Create Character
The character creation event varies from config. you can edit them in config.events
By default, it is qb-clothes:client:CreateFirstCharacter
for QB and tgiann-clothing:esx:createNew
for ESX.
If the config.autoOpenCreateMenu
setting is enabled, this event will be triggered automatically when the character is loaded(true for esx by default).
Copy -- QB
TriggerEvent("qb-clothes:client:CreateFirstCharacter")
-- ESX
TriggerEvent("tgiann-clothing:esx:createNew")
Open skin menu
Copy exports["tgiann-clothing"]:openMenu({
allowedMenus = { [0] = true, [1] = false, [2] = true, [3] = false [4] = false },
isBerberMenu = false,
clotheList = false
})
Parameters :
[0] = Face Feature
[1] = Clothes
[2] = Berber
[3] = Makeup
[4] = Tattoo
The customShopName name you wrote in the configs/clotheList file
Examples
Copy -- Clothhing
exports["tgiann-clothing"]:openMenu({
allowedMenus = {[0] = false, [1] = true, [2] = false, [3] = true},
isBerberMenu = false
})
-- Berber
exports["tgiann-clothing"]:openMenu({
allowedMenus = {[0] = false, [1] = false, [2] = true, [3] = false},
adminMode = false,
isBerberMenu = true
})
Copy TriggerEvent("tgiann-clothing:aesthetic", changePlayerModel)
Parameters :
true changes the gender of the character when opening the menu
Custom Script Clothe
Copy TriggerEvent("tgiann-clothing:changeScriptClothe", skinData)
Parameters :
Example
Copy local skinData = {
{ name = "bags_1", val = 0 }, { name = 'bags_2', val = 0},
{ name = "glasses_1", val = -1 }, { name = 'bags_2', val = 0},
{ name = "watches_1", val = -1 }, { name = 'watches_2', val = 0},
{ name = "bracelets_1", val = -1 }, { name = 'bracelets_2', val = 0},
{ name = "tshirt_1", val = 242 }, { name = "tshirt_2", val = 0},
{ name = "torso_1" , val = 734}, { name = "torso_2", val = 15},
{ name = "decals_1", val = 0 }, { name = "decals_2", val = 0},
{ name = "arms" , val = 19 },
{ name = "pants_1" , val = 348 }, { name = "pants_2", val = 0},
{ name = "shoes_1" , val = 25 }, { name = "shoes_2", val = 0},
{ name = "mask_1" , val = 0 }, { name = "mask_2", val = 0},
{ name = "helmet_1", val = -1 }, { name = "helmet_2", val = -1},
{ name = "chain_1" , val = 294}, { name = 'chain_2', val = 0},
{ name = "ears_1" , val = -1 }, { name = 'ears_2', val = -1},
{ name = "bproof_1", val = 85 }, { name = 'bproof_2', val = 0},
}
TriggerEvent("tgiann-clothing:changeScriptClothe", skinData)
-- Return back old skin
TriggerEvent("tgiann-clothing:changeScriptClothe")
scriptClotheIsActive
Copy exports["tgiann-clothing"]:scriptClotheIsActive()
Return :
Example
Copy local active = exports["tgiann-clothing"]:scriptClotheIsActive()
if active then
TriggerEvent("tgiann-clothing:changeScriptClothe") -- Return back old skin
end
Works if config.clothingAsItem is false in config
Copy TriggerEvent("tgiann-clothing:openOutfitMenu")
Outfit Stash
opens a stash for clothing items
Copy TriggerEvent("tgiann-clothing:openOutfitStash", stashName)
Parameters :
Example
Copy TriggerEvent("tgiann-clothing:openOutfitStash", "policeClothe")
opens the menu where you add ready-made outfits to jobs
Copy exports["tgiann-clothing"]:OpenJobOutiftMenu(outfitName)
Parameters :
Names defined in clothingRoomsOutfits.lua
Example
Copy exports["tgiann-clothing"]:OpenJobOutiftMenu("police1")
Load Ped Clothing
Edit the skin data of a ped (Non player)
You can use this event for a multi-character script
Copy TriggerEvent("tgiann-clothing:client:loadPedClothing", skinData, ped)
exports["tgiann-clothing"]:LoadPedClothing(skinData, ped)
Parameters :
SetPedAppearance
Edit the skin data of a ped
You can use this event for a multi-character script
Copy exports["tgiann-clothing"]:SetPedAppearance(ped, skinData)
Parameters :
ChangeComponentValue
if you are going to use the save export and change the clothes you should use this export
Copy exports["tgiann-clothing"]:ChangeComponentValue(component, value)
Parameters :
Copy -- Component List
-- 'sex'
-- 'ped'
-- 'mom'
-- 'dad'
-- 'dad_texture'
-- 'mom_texture'
-- 'face_md_weight'
-- 'skin_md_weight'
-- 'nose_1'
-- 'nose_2'
-- 'nose_3'
-- 'nose_4'
-- 'nose_5'
-- 'nose_6'
-- 'cheeks_1'
-- 'cheeks_2'
-- 'cheeks_3'
-- 'lip_thickness'
-- 'jaw_1'
-- 'jaw_2'
-- 'chin_1'
-- 'chin_2'
-- 'chin_3'
-- 'chin_4'
-- 'neck_thickness'
-- 'hair_1'
-- 'hair_2'
-- 'hair_color_1'
-- 'hair_color_2'
-- 'tshirt_1'
-- 'tshirt_2'
-- 'torso_1'
-- 'torso_2'
-- 'decals_1'
-- 'decals_2'
-- 'arms'
-- 'arms_2'
-- 'pants_1'
-- 'pants_2'
-- 'shoes_1'
-- 'shoes_2'
-- 'mask_1'
-- 'mask_2'
-- 'bproof_1'
-- 'bproof_2'
-- 'chain_1'
-- 'chain_2'
-- 'helmet_1'
-- 'helmet_2'
-- 'glasses_1'
-- 'glasses_2'
-- 'watches_1'
-- 'watches_2'
-- 'bracelets_1'
-- 'bracelets_2'
-- 'bags_1'
-- 'bags_2'
-- 'eye_color'
-- 'eye_squint'
-- 'eyebrows_1'
-- 'eyebrows_2'
-- 'eyebrows_3'
-- 'eyebrows_4'
-- 'eyebrows_5'
-- 'eyebrows_6'
-- 'makeup_1'
-- 'makeup_2'
-- 'makeup_3'
-- 'makeup_4'
-- 'lipstick_1'
-- 'lipstick_2'
-- 'lipstick_3'
-- 'lipstick_4'
-- 'ears_1'
-- 'ears_2'
-- 'chest_1'
-- 'chest_2'
-- 'chest_3'
-- 'bodyb_1'
-- 'bodyb_2'
-- 'bodyb_3'
-- 'bodyb_4'
-- 'age_1'
-- 'age_2'
-- 'blemishes_1'
-- 'blemishes_2'
-- 'blush_1'
-- 'blush_2'
-- 'blush_3'
-- 'complexion_1'
-- 'complexion_2'
-- 'sun_1'
-- 'sun_2'
-- 'moles_1'
-- 'moles_2'
-- 'beard_1'
-- 'beard_2'
-- 'beard_3'
-- 'beard_4'
-- 'hairOverlay'
exports["tgiann-clothing"]:ChangeComponentValue("helmet_1", 22)
SaveSkin
Saving current skin data
Copy exports["tgiann-clothing"]:SaveSkin()
RefreshSkin
Reload player skin
Copy exports["tgiann-clothing"]:RefreshSkin()
CheckMask
When export is used, it sets the character's face according to the mask. it is generally recommended to use commands like /mask
Copy exports["tgiann-clothing"]:CheckMask()