Opens the clothing NUI. Only works when the player is on foot, alive, and not cuffed. Key is configurable via MBT.MenuKey.
Debug Commands
Available only when MBT.Debug = true in config.lua. Intended for server developers when configuring default drawable/prop values.
Command
Arguments
Description
/setprop
<propIndex> <drawable>
Applies a prop to slot propIndex with the given drawable. Pass -1 as propIndex to clear prop 0.
/setdraw
<componentIndex> <drawable> [texture] [palette]
Applies a drawable to the given component index.
/getdraw
<componentIndex>
Developer Reference
Client → Server events
Event
Payload
Description
mbt_metaclothes:giveDress
{ Item, Index, Sex, Drawable, Texture, Palette }
Adds a single drawable clothing item to the player's ox_inventory with full metadata.
mbt_metaclothes:giveDressKit
{ Item, Sex, Kit: { Arms,
Server → Client events
These are triggered by your useItem callbacks when a player uses a clothing item from their inventory:
Event
Payload
Description
mbt_metaclothes:applyDress
{ index, drawable, texture, palette }
Applies a single drawable component to the player's ped and saves the appearance.
mbt_metaclothes:applyKitDress
[{ index, drawable, texture, palette }, ...]
Applies multiple drawable components (for the kit) and saves the appearance.
NUI Callbacks (HTML → Lua)
Callback
Payload
Description
handleDress
{ Index }
Player clicked a drawable slot. Index 8 triggers the full top kit removal (handleTorsoUndress); all other indices trigger single slot removal (handleUndress).
handleProps
{ Index }
Player clicked a prop slot. Triggers for the given prop index.
NUI Messages (Lua → HTML)
action
Payload
Description
"ui"
status (boolean)
Shows or hides the clothing NUI grid.
"sendUiState"
status: false
Hides the NUI after an undress action completes.
Item Metadata Structure
Drawable item (e.g. trousers, shoes, jacket)
{ description = "Piece of clothing belonging to PlayerName", index = 4, -- GTA component index sex = "male", -- "male" / "female" drawable = 12, -- drawable variation texture = 0, palette = 0,}
Prop item (e.g. hat, glasses, watch)
{ description = "Accessory belonging to PlayerName", index = 0, -- GTA prop index sex = "male", drawable = 5, texture = 0,}
Top outfit kit (topdress)
{ description = "Piece of clothing belonging to PlayerName", sex = "male", Arms = { index = 3, drawable = 15, texture = 0, palette = 0 }, Tshirt = { index = 8, drawable = 22, texture = 1, palette = 0 }, Jacket = { index = 11, drawable = 8, texture = 0, palette = 0 },}
Undress Logic
The client checks isAbleToUndress before every removal:
Reads the current drawable/prop index from the ped
Checks if it appears in MBT.Drawables[index].Default[sex] or MBT.Props[index].Default[sex]
If the value is in the defaults array → the slot is empty → shows "nothing to take off"
If not in defaults → the slot has a custom piece → the animation plays and the item is granted
Special case — T-shirt (component 8): a T-shirt can only be removed if the jacket (component 11) is also at its default. If a jacket is worn, the player must remove the jacket first.
Appearance Saving
After every successful undress or re-wear, saveOutfitCache() is called automatically on the client. It detects the running appearance resource and calls the appropriate save method — no manual trigger is required.
Prints the current drawable, texture, and palette for a component to the F8 console.
/getprop
<propIndex>
Prints the current prop drawable and texture for a prop slot to the F8 console.
/pcloth
—
Prints all currently tracked drawables and props in playerWearing to the F8 console.
Tshirt
,
Jacket
} }
Adds the topdress kit item with nested metadata for all three top components.
mbt_metaclothes:giveProp
{ Item, Index, Sex, Drawable, Texture }
Adds a prop item to the player's ox_inventory with metadata.
topdress
mbt_metaclothes:applyProps
{ index, drawable, texture }
Applies a prop to the player's ped and saves the appearance.
mbt_metaclothes:checkDress
{ type, index, sex, cb }
Asks the client whether the ped is currently wearing the default for a given slot. The cb callback receives true if default, false if non-default.