Configuration Reference
All configuration lives in config.lua, which is escrow_ignore-listed — you always have full access to it.
General
MBT.Debug = false
MBT.Language = "EN" -- "EN" or "IT"
MBT.Framework = "OX" -- "OX" / "ESX" / "QB"
MBT.MenuKey = "J"| Option | Type | Default | Description |
|---|---|---|---|
MBT.Debug | boolean | false | Enables debug commands (/setprop, /setdraw, /getdraw, /getprop, /pcloth). Disable in production. |
MBT.Language | string | "EN" | Label language. "EN" for English, "IT" for Italian. Adding new languages is covered in the Labels section below. |
MBT.Framework | string | "OX" | Framework used for player lookups and inventory grants. "OX" = OX Core, "ESX" = ESX Legacy, "QB" = QBCore. |
MBT.MenuKey | string | "J" | Keyboard key that opens the clothing NUI. Registered via RegisterKeyMapping. |
Drawables
MBT.Drawables maps GTA ped component indices to their configuration.
MBT.Drawables = {
[4] = {
["Label"] = "Legs",
["Default"] = {
["male"] = { 21, 21 },
["female"] = { 14, 105 }
},
["Animation"] = {
["Dict"] = "re@construction",
["Anim"] = "out_of_breath",
["Flag"] = 51,
["Duration"] = 1300
},
["Item"] = "trousers"
},
...
}| Field | Type | Description |
|---|---|---|
| Key | number | GTA ped component index (3=arms, 4=legs, 6=feet, 7=torso accessory, 8=t-shirt, 11=jacket). |
Label | string | Display name shown in the NUI slot. Populated from MBT.Labels[MBT.Language]. |
Default.male | number[] | One or more drawable indices considered "default" for male peds. If the player is wearing any of these the slot cannot be removed. Multiple values are randomly selected when reverting. |
Default.female | number[] | Same as above for female peds. |
Animation.Dict | string | Animation dictionary to load for the undressing animation. |
Animation.Anim | string | Animation name within the dictionary. |
Animation.Flag | number | TaskPlayAnim flag (51 = loop + secondary task compatible). |
Animation.Duration | number | How long the animation plays in milliseconds before the component change fires. |
Item | string | ox_inventory item name given when this slot is removed. If absent (e.g. component 3 / arms), no item is given — the slot is handled as part of the topdress kit. |
Component 8 (T-shirt) triggers a full top kit removal — it removes arms (3), T-shirt (8) and jacket (11) together as a single topdress item. Do not add a separate Item key to component 8.
Default component indices reference
| Component | Slot | Male default | Female default |
|---|---|---|---|
| 3 | Arms | 15 | 15 |
| 4 | Legs | 21, 21 | 14, 105 |
| 6 | Feet | 34 | 118 |
| 7 | Torso accessory | 0 | 0 |
| 8 | T-Shirt | 15 | 15 |
| 11 | Jacket | 15 | 15 |
Props
MBT.Props maps GTA ped prop indices to their configuration. Same structure as MBT.Drawables with one difference: a prop value of -1 means "no prop equipped" (the default for all prop slots).
MBT.Props = {
[0] = {
["Label"] = "Hats",
["Default"] = {
["male"] = { -1 },
["female"] = { -1 }
},
["Animation"] = {
["Dict"] = "missheist_agency2ahelmet",
["Anim"] = "take_off_helmet_stand",
["Flag"] = 51,
["Duration"] = 600
},
["Item"] = "hat"
},
...
}| Prop index | Slot | Item name |
|---|---|---|
| 0 | Hat | hat |
| 1 | Glasses | glasses |
| 2 | Ear Accessories | earaccess |
| 6 | Watch | watch |
When a prop is removed, ClearPedProp is called. The item is added with index, sex, drawable, and texture metadata.
Labels
Two language sets are provided. Switch between them with MBT.Language.
MBT.Labels = {
["EN"] = {
["nothing_to_unwear"] = "You don't have any clothes to take off!",
["props_desc"] = "Accessory belonging to %s",
["clothes_desc"] = "Piece of clothing belonging to %s",
["ear_acc"] = "Ear Accessories",
["glasses"] = "Glasses",
["chain"] = "Torso Accessories",
["hats"] = "Hats",
["arms"] = "Arms",
["legs"] = "Legs",
["foot"] = "Foot",
["t_shirt"] = "TShirt",
["jacket"] = "Jacket",
["watch"] = "Watch",
["sett_name"] = "Clothes Menu",
},
["IT"] = { ... }
}| Key | Used for |
|---|---|
nothing_to_unwear | Notification shown when the player tries to remove a default/empty slot. |
props_desc | ox_inventory item description for props. %s is replaced with the player's name. |
clothes_desc | ox_inventory item description for drawables. %s is replaced with the player's name. |
ear_acc … watch | NUI slot labels. |
sett_name | Label shown in the GTA key mapping settings. |
To add a new language, add a new key to MBT.Labels and set MBT.Language to that key.
Notification Handler
MBT.NotifyHandler = function(text, type)
-- text = translated label string
-- type = "error" / "info" / "warning"
endFill in this function with your server's notification system. Called when a player tries to remove a slot they are not wearing. The text parameter is already translated using MBT.Language.
Appearance System Detection
The script auto-detects which appearance resource is running at startup:
| Resource running | Save method |
|---|---|
ox_appearance | exports['fivem-appearance']:getPedAppearance → ox_appearance:save |
fivem-appearance + ESX | exports['fivem-appearance']:getPedAppearance → mbt_metaclothes:saveSkin (MySQL) |
illenium-appearance + ESX | illenium-appearance get/set exports → illenium-appearance:server:saveAppearance |
qb-clothing + QBCore | (implement manually in saveOutfitCache) |
No configuration is required — the save path is chosen automatically based on GetResourceState.