Studios
Appearancehouse-3.jpg

Commands & Exports

SoonAppearanceQBCore · Qbox · ESX
PAGE 06 OF 07  ·  TROUBLESHOOTING → COMMANDS & EXPORTS → CLOTHING IDENTSdocs.glitchstudios.dev
Browse docs

Commands#

Command Who What
/pedmenu [id] Config.PedMenuGroup Ped menu for yourself or another player, with a ped menu grant
/reloadskin Everyone Reload your saved look (Config.ReloadSkinCooldown)
/clearstuckprops Everyone Remove props stuck to your ped
/joboutfits, /gangoutfits Everyone Job or gang uniforms, with Config.EnableJobOutfitsCommand
/bossmanagedoutfits Job bosses on ESX Manage job uniforms, with Config.BossManagedOutfits
/clothinglocks group.admin Write locked clothing numbers to clothing_locks_male.txt and clothing_locks_female.txt
/migrateskins <qb-clothing or fivem-appearance> group.god One-time import of saved skins
clothingidents <action> Server console status, snapshot <id>, dryrun, run, finish, restore, rescan for the clothing idents migration

The shop key is a FiveM key mapping (glitch_appearance_shop, default Config.ShopKey), so players can rebind it.

Client exports#

The same as illenium-appearance. Call them on glitch-appearance or illenium-appearance.

Export What
getPedAppearance(ped) Full look table
getPedModel, getPedComponents, getPedProps, getPedHeadBlend, getPedFaceFeatures, getPedHeadOverlays, getPedHair Parts of a look
setPlayerAppearance(appearance) Apply a look to the player, model included
setPedAppearance(ped, appearance) Apply a look to a ped
setPlayerModel(model) Change the player model
setPedComponent, setPedComponents, setPedProp, setPedProps, setPedHeadBlend, setPedFaceFeatures, setPedHeadOverlays, setPedHair, setPedEyeColor, setPedTattoos Set parts of a look
applyClothing(ped, slot, isProp, what, texture) Put one item on a ped, by clothing ident or drawable number
startPlayerCustomization(callback, config) Open the editor. The callback gets the new look, or nothing when cancelled.
getClothingIdent, resolveClothingIdent, identOfDrawable, forgetClothingIdent, getClothingRegistryInfo Clothing ident helpers

A look changed with these exports is saved through the same server checks as any other save.

Server exports#

Export What
GrantPedMenu(src, minutes) Let the player save any ped they may use for minutes (default Config.PedMenuGrantMinutes). Returns true or false.
GetClothingTags() Department tags on clothing items
SetClothingTags(keys, department) Tag items with a Config.Departments key, or clear them with nil. Returns how many changed.
GetDepartments() Config.Departments
ClothingRegistryMatches() true or false for whether the registry matches the streamed clothing, nil before the first scan
GetClothingRegistryInfo() { count, generated, layout }
ParseClothingIdent(id), PositionOfIdent(id) Read a clothing ident
IdentFromCollection(gender, isProp, slot, collection, localIndex) Ident for a pack item
ClothingIdentsStatus(src), ClothingIdentsAction(src, action) The idents migration, for an admin panel

Events#

Client events your scripts can trigger, kept from illenium-appearance:

Event What
illenium-appearance:client:openClothingShop Open the clothing shop
illenium-appearance:client:OpenBarberShop Open the barber
illenium-appearance:client:OpenTattooShop Open the tattoo shop
illenium-appearance:client:OpenSurgeonShop Open the surgeon
illenium-appearance:client:openOutfitMenu Open saved outfits
illenium-appearance:client:openClothingShopMenu Open the full menu. Pass true for the ped menu after GrantPedMenu.
illenium-appearance:client:openJobOutfitsMenu Open a list of uniforms
illenium-appearance:client:loadJobOutfit Put on a uniform
illenium-appearance:client:reloadSkin Reload the saved look
illenium-appearance:client:ClearStuckProps Remove stuck props

Paid shops opened through these events still charge at checkout, and barber, surgeon and tattoo checkouts still need the player near a shop of that type.

Framework hooks it listens for include qb-clothes:client:CreateFirstCharacter (character creator for new characters), qb-clothing:client:openMenu, qb-clothing:client:openOutfitMenu and qb-clothing:client:loadOutfit, plus the ESX skinchanger and esx_skin events.

Callbacks#

The resource's lib.callback names (illenium-appearance:server:getAppearance, checkoutQuote, checkoutPay, getOutfits and others) are used by its own menu. They are not a public API.