> For the complete documentation index, see [llms.txt](https://oph3zdev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oph3zdev.gitbook.io/docs/paid-scripts/inventory/appearance-and-clothing.md).

# Appearance & clothing

The inventory can turn clothing into real items - worn on the equipment slots, stored in bags, traded, dropped. For that it connects to an appearance script through a small interface called the clothing bridge.

{% hint style="danger" %} <mark style="color:orange;">**You do not need any appearance script to use this inventory.**</mark> It is not a dependency. If no appearance script is connected, the inventory runs in classic mode: the equipment slots work as simple show/hide buttons for what your ped is wearing, bags and vests still work as items, and every other feature is unaffected.

<mark style="color:green;">**An appearance script is included.**</mark> I built my own (a fully reworked illenium-appearance) for personal use, and decided to share it with everyone who buys the inventory. Install it next to the inventory and everything on this page works out of the box. If you prefer to keep your current appearance script, it can get the same features by implementing the clothing bridge - see the last section of this page.
{% endhint %}

### The switches

All of these live in <mark style="color:$primary;">config/config.lua</mark>. A switch on `true` needs an appearance script that implements the clothing bridge (the included script does) - on `false` it works without one.

#### Config.AppearanceResource

The name of the appearance resource the inventory talks to. On startup the inventory checks whether that resource implements the clothing bridge - if it does, the switches below can be used, if not, everything runs in classic mode.

```lua
Config.AppearanceResource = "illenium-appearance"
```

#### Config.MetadataClothingSystem

Decides what clothing IS on your server.

* **`true`** - every piece of clothing is a real item. Buying a shirt at the store puts a shirt item in your bag, dragging it onto the shirt slot dresses the ped, taking it off puts it back. Clothes can be stored, given, dropped and traded like any item.
* **`false`** - clothes stay part of the saved skin, like standard servers. The equipment slots become show/hide buttons instead: click the hat button to take your hat off visually, click again to put it back on. No clothing items exist.

```lua
Config.MetadataClothingSystem = true
```

#### Config.MetadataBags

Decides how bags work.

* **`true`** - the bag is a real item worn in the bag slot, visible on the ped's back using the look the bag item carries. It must be worn to open it.
* **`false`** - the bag slot disappears and becomes a show/hide button like the other clothing buttons (it toggles the bag from the saved skin). Bag items stay in the normal inventory and keep their own storage - open them with right click - Open, or with the bag key (default B, which opens the first bag found). A bag still worn in the slot from before the switch is moved into the inventory automatically.

```lua
Config.MetadataBags = true
```

#### Config.MetadataVests

Decides how armor works.

* **`true`** - the vest is a real item worn in the vest slot. It gives its armor value scaled by its durability, taking damage drains it, and at 0% it is broken and gives nothing. The vest is visible on the ped. This mode also unlocks the armor plate system, where a vest starts empty and players fill it with plates. See `Config.VestPlates` on the config page.
* **`false`** - armor is a simple consumable: use the item, get armor, the item is gone. The vest slot disappears from the equipment panel. An optional visual for this mode is `Config.ClassicVestVisual` below.

```lua
Config.MetadataVests = true
```

#### Mixing the switches

The three switches are independent - you can turn `Config.MetadataBags` or `Config.MetadataVests` on while `Config.MetadataClothingSystem` is off. Clothing then stays show/hide buttons, but the bag (or vest) is still a real worn item, visible on the ped. The only forced combination is the other way around: with `Config.MetadataClothingSystem = true`, bags and vests are always full items too and their switches are ignored. And remember - any switch on `true` needs a connected appearance script; without one, everything falls back to classic.

### What players get

With the paired script and the switches on:

* **Clothing is owned, not painted on.** Buying clothes at a store puts items in your bag - nothing auto-equips. Wearing, taking off, giving, dropping, stashing and trading clothes works like with any other item, and the ped dresses and undresses live.
* **A wardrobe** - every character's personal clothing closet, reachable at home clothing rooms (and optionally in stores). Outfits are saved looks, not copies of clothes: wearing one re-arranges pieces you actually own, missing pieces are reported, and nothing is ever duplicated.
* **Job and boss uniforms** overlay the worn look temporarily without touching any items.
* **Bags and vests from the store** - picking a bag or vest look grants the matching real container or armor item.
* **Real garment thumbnails** on clothing item tiles instead of one generic icon.
* **Store basket with per piece prices** - trying on is free, the basket is charged once, and the server only applies what was actually paid for.

### Inventory settings

These live in <mark style="color:$primary;">config/config.lua</mark> and only matter when the switches above are on.

Only for consumable armor mode (`MetadataVests = false`): optionally show a vest on the ped while armor is active, per gender.

```lua
Config.ClassicVestVisual = {
    enabled = false,
    vest = {
        male = { drawable = 4, texture = 0 },
        female = { drawable = 4, texture = 0 }
    }
}
```

Where clothing item pictures come from. `"metadata"` = real garment thumbnails loaded from the URL (any resource or web host works). `"item"` = the inventory's own `images/` folder, like every other item.

```lua
Config.ClothingImages = "metadata"
Config.ClothingImageUrl = "https://cfx-nui-illenium-appearance/images"
```

The capacity of every character's personal clothing closet.

```lua
Config.WardrobeSlots = 50
Config.WardrobeMaxWeight = 200000
Config.WardrobeGrid = { cols = 10, rows = 5 }
```

#### Advanced tables

Most servers never touch these - they describe how clothing maps onto the GTA ped.

Maps each equip slot to its GTA component or prop id.

```lua
Config.ClothingSlots = {
    hat = { prop = 0 },
    shirt = { component = 11 }
    -- one entry per equip slot
}
```

The arms drawable used for each worn top, per gender, so arms never clip.

```lua
Config.ClothingTorso = {
    fallback = 0,
    male = { [0] = 0, [1] = 33 },
    female = { [0] = 2, [1] = 7 }
}
```

What the ped wears when a clothing slot is empty, as `{ drawable, texture }` per component.

```lua
Config.ClothingNaked = {
    male = { [1] = {0, 0}, [3] = {15, 0} },
    female = { [1] = {0, 0}, [3] = {15, 0} }
}
```

The dressing animation played per slot. Mask and hat have separate on/off animations, `enabled = false` turns them all off.

```lua
Config.ClothingAnimations = {
    enabled = true,
    shirt = { dict = "missmic4", clip = "michael_tux_fidget", move = 51, duration = 1500 }
    -- one entry per slot
}
```

### Appearance script settings

These live in the paired appearance script's <mark style="color:$primary;">shared/config.lua</mark> and only apply when it is used. The mode itself is never set here - the script reads it live from the inventory, so there is one switch to flip and only the inventory to restart.

Flat prices per visit, used by shops that are not per-item.

```lua
Config.ClothingCost = 100
Config.BarberCost = 100
Config.TattooCost = 100
Config.SurgeonCost = 100
```

Per shop type: `true` = every piece has its own price and a shopping basket, `false` = the classic single flat fee. Prices are data in <mark style="color:$primary;">shared/prices.lua</mark>, and the server recomputes every basket line itself - a manipulated UI cannot change a price.

```lua
Config.PerItemPricing = {
    clothing = true,
    tattoo = true,
    barber = false,
    surgeon = false
}
```

The price to remove one existing tattoo (`0` = free), and how many copies of one piece can be bought at once.

```lua
Config.TattooRemovalCost = 0
Config.MaxBasketQuantity = 10
```

`true` = clothing options show as an image grid, `false` = number steppers.

```lua
Config.UseClothingImages = true
```

`true` = players can reach their wardrobe inside clothing stores too, not only at home.

```lua
Config.WardrobeInStores = true
```

Which real bag item each bag look grants. Looks not listed are hidden from the store picker, and a live "You get: X" line shows the item before buying. `default` is the fallback (`false` = unlisted looks hidden).

```lua
Config.BagItems = {
    default = false,
    male = {
        [40] = "bag",
        [44] = "backpack_small",
        [81] = "hiking_pack"
    },
    female = { ... }
}
```

Same for vest looks and armor items.

```lua
Config.VestItems = {
    default = "armor_vest",
    male = {
        [14] = "heavy_armor_vest", [15] = "heavy_armor_vest"
    },
    female = { ... }
}
```
