Events / Exports

openMenu

Open skin menu

exports["tgiann-clothing"]:openMenu({
    allowedMenus = {[0] = true, [1] = false, [2] = true, [3] = false},
    isBerberMenu = false,
})

Parameters :

NameTypeDescription

allowedMenus*

table

[0] = Face Feature [1] = Clothes [2] = Berber [3] = Makeup

isBerberMenu

boolen

Examples

-- 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
})

Aesthetic Menu

TriggerEvent("tgiann-clothing:aesthetic", changePlayerModel)

Parameters :

NameTypeDescription

changePlayerModel

boolen

true changes the gender of the character when opening the menu


Custom Script Clothe

TriggerEvent("tgiann-clothing:changeScriptClothe", skinData)

Parameters :

NameTypeDescription

skinData

table

skins data or nil

Example

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

exports["tgiann-clothing"]:scriptClotheIsActive()

Return :

valuetype

is Active

bool

Example

local active = exports["tgiann-clothing"]:scriptClotheIsActive()
if active then
    TriggerEvent("tgiann-clothing:changeScriptClothe") -- Return back old skin
end

Outfit Menu

Works if config.clothingAsItem is false in config

TriggerEvent("tgiann-clothing:openOutfitMenu")

Outfit Stash

opens a stash for clothing items

TriggerEvent("tgiann-clothing:openOutfitStash", stashName)

Parameters :

NameTypeDescription

stashName

string

stash name

Example

TriggerEvent("tgiann-clothing:openOutfitStash", "policeClothe")

OpenJobOutiftMenu

opens the menu where you add ready-made outfits to jobs

exports["tgiann-clothing"]:OpenJobOutiftMenu(outfitName)

Parameters :

NameTypeDescription

outfitName

string

Names defined in clothingRoomsOutfits.lua

Example

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

TriggerEvent("tgiann-clothing:client:loadPedClothing", skinData, ped)

Parameters :

NameTypeDescription

skinData

table

skin data

ped

int

Spawned ped id

SaveSkin

Saving current skin data

exports["tgiann-clothing"]:SaveSkin()

RefreshSkin

Reload player skin

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

exports["tgiann-clothing"]:CheckMask()

Last updated