Tutorials

How can I add clothing to a player using another script?

How can I remove a player's clothing using another script?

How can I give myself a specific clothing item?

How can I add a custom name and image to a specific clothing item?

1.

Add clothing to a player:

-- 1: Clothing type - 'mask', 'helmet', 'glasses', 'ear', 'chain', 'watches', 'bracelet', 'tshirt', 'vest', 'jacket', 'decals', 'bag', 'gloves', 'pants', 'shoes'.
-- 2: Clothing number
-- 3: Clothing color
exports.fivecode_clothing:AddClothing(clothType, clothNumber, clothColor)

2.

Remove a player's clothing:

-- 1: Clothing type - 'mask', 'helmet', 'glasses', 'ear', 'chain', 'watches', 'bracelet', 'tshirt', 'vest', 'jacket', 'decals', 'bag', 'gloves', 'pants', 'shoes'.
exports.fivecode_clothing:RemoveClothing(clothType)

3.

Give yourself a specific clothing item:

-- 1: Clothing type - 'mask', 'helmet', 'glasses', 'ear', 'chain', 'watches', 'bracelet', 'tshirt', 'vest', 'jacket', 'decals', 'bag', 'gloves', 'pants', 'shoes'.
-- 2: Clothing number
-- 3: Clothing color
/giveclothing type number color

4.

Add a custom name and image to a specific clothing item:

  1. Add a custom name or image to a specific clothing item: - Simply duplicate an existing one from the config for easier setup.

Config.CustomName = {
    {
        Label = 'Gucci Pants',
        Image = 'gucci_p',
        Type = 'pants',
        Ped = 'mp_m_freemode_01',
        Clothing = {
            Type = 17,
            Color = 3
        },
    },
    {
        Label = 'Pig mask',
        Image = false,
        Type = 'mask',
        Ped = 'mp_m_freemode_01',
        Clothing = {
            Type = 1,
            Color = 2
        },
    },
    {
        Label = 'Example Name',
        Image = 'example_image',
        Type = 'shoes',
        Ped = 'mp_m_freemode_01',
        Clothing = {
            Type = 4,
            Color = 1
        },
    },
}
  1. Now after gving yourself the item with /giveclothing command or removing the clothing from your character it will have a new name, image or both.

  2. Enjoy!


If you need help with anything, do not hesitate and open a support ticket in our discord.

Last updated

Was this helpful?