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

# Installation

Get Vision Advanced Clothing running on your server, on top of illenium-appearance.

## Requirements

| Resource                                                                          | Required | Notes                                                                                                                                                                         |
| --------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**illenium-appearance**](https://github.com/iLLeniumStudios/illenium-appearance) | ✅ Yes    | The backend. **Not included**, free from its author. Folder name must be exactly `illenium-appearance`. Tested with 5.7.x.                                                    |
| [**ox\_lib**](https://github.com/overextended/ox_lib)                             | ✅ Yes    | Commands, callbacks, zones, notifications.                                                                                                                                    |
| [**oxmysql**](https://github.com/overextended/oxmysql)                            | ✅ Yes    | Outfit data, share codes, outfit bags, custom peds.                                                                                                                           |
| Framework                                                                         | Optional | `qbx_core`, `qb-core`, `es_extended` or `ox_core`, detected automatically. Without one the script runs standalone (no money, no jobs, `license:` identifier as character id). |
| ox\_target or qb-target                                                           | Optional | Without either, ox\_lib zones with an `[E]` prompt are used.                                                                                                                  |
| [**ox\_inventory**](https://github.com/overextended/ox_inventory)                 | Optional | Only for outfit bags, which also need ox\_target.                                                                                                                             |

## Install

{% stepper %}
{% step %}

### Install and connect illenium-appearance

Install illenium-appearance and make the small changes described in [illenium-appearance setup](/visionstore-docs/scripts/advanced-clothing/illenium-setup.md). They switch off illenium's own shops and hand its menus and character creator to Vision Clothing.

{% hint style="warning" %}
Do this first. Without it, players see two prompts and two blips at every shop, and new characters get illenium's creator instead of Vision Clothing's.
{% endhint %}
{% endstep %}

{% step %}

### Add the resource

Download the asset from [portal.cfx.re](https://portal.cfx.re) and put the `Chapo_advanced_clothing` folder in your `resources` folder (directly, or inside a `[category]` folder such as `resources/[clothing]/`).

{% hint style="warning" %}
Keep the folder name **exactly** `Chapo_advanced_clothing`. The interface, the illenium hand-over and the outfit bag item exports all use this name.
{% endhint %}
{% endstep %}

{% step %}

### Start it in server.cfg

Start it **after** ox\_lib, oxmysql, your framework and illenium-appearance:

```properties
ensure ox_lib
ensure oxmysql
ensure qbx_core                 # or qb-core / es_extended / ox_core
ensure illenium-appearance
ensure Chapo_advanced_clothing
```

Optional: force the language server-wide (you can also set it in `config/config.lua`):

```properties
setr Chapo_advanced_clothing:locale "en"    # "ar" = Arabic
```

{% endstep %}

{% step %}

### Database

Nothing to do. With `Config.AutoCreateTables = true` (the default) every table is created on first start.

Saved outfits live in illenium's own `player_outfits` table, so a working illenium install already has everything outfits need. Vision Clothing adds:

| Table                                 | Purpose                                                |
| ------------------------------------- | ------------------------------------------------------ |
| `Chapo_advanced_clothing_outfit_meta` | Favourite flag, tags and timestamps per outfit         |
| `Chapo_advanced_clothing_favorites`   | Favourite clothing items per character                 |
| `Chapo_advanced_clothing_share_codes` | Outfit share codes                                     |
| `Chapo_advanced_clothing_owned`       | Purchased items (only with `Config.Ownership.enabled`) |
| `Chapo_advanced_clothing_outfit_bags` | Placed outfit bags                                     |
| `Chapo_advanced_clothing_bag_outfits` | Outfits stored in a bag                                |
| `player_custom_peds`                  | The ped given to a character with `/giveped`           |

If your database user can't create tables, set `Config.AutoCreateTables = false` and import `install/chapo_advanced_clothing.sql` yourself.

{% hint style="info" %}
**Coming from an older illenium custom-ped script?** Vision Clothing reuses its `player_custom_peds` table, so existing assignments keep working. On start it adds the columns it needs (`appearance`, `verified`, `base_model`, `base_skin`). With `AutoCreateTables = false`, run the four `ALTER TABLE` lines at the end of `install/chapo_advanced_clothing.sql` (MariaDB syntax; on MySQL 8 remove `IF NOT EXISTS`).
{% endhint %}
{% endstep %}

{% step %}

### Outfit bags (optional)

Outfit bags need **ox\_inventory** and **ox\_target**.

1. Open `install/ox_inventory_items.lua` and paste the three items into `ox_inventory/data/items.lua`.
2. Add images as `ox_inventory/web/images/outfit_bag_small.png` (and `_medium`, `_large`).
3. Restart the server. Every clothing store now has a second target option, **Buy Outfit Bags**.

```lua
['outfit_bag_small'] = {
    label = 'Small Outfit Bag',
    weight = 1000,
    stack = false,
    close = true,
    consume = 0,
    description = 'Portable outfit bag with 2 outfit slots.',
    client = {
        export = 'Chapo_advanced_clothing.useOutfitBag',
    },
},
-- outfit_bag_medium (weight 1500, 4 slots) and outfit_bag_large (weight 2000, 8 slots) follow the same format
```

Keep `stack = false`, `consume = 0` and the client export: each bag carries its own id in its metadata.

Don't run ox\_inventory, or don't want bags? Set `Config.OutfitBags.enabled = false`.
{% endstep %}

{% step %}

### Give admins access

`/clothingshop` (alias `/pedmenu`) and `/giveped` are restricted to the ace group `group.admin` (`Config.Commands`). Add your admins to that group:

```properties
add_principal identifier.license:YOUR_LICENSE group.admin
```

{% endstep %}

{% step %}

### Start the server

The console prints a banner like this:

```
[Chapo_advanced_clothing] v1.0.0 started | framework: qbx | locale: en | sharing: on | ownership: off
```

Check the detected `framework:` there. You're ready: follow the [Quick start](/visionstore-docs/scripts/advanced-clothing/quick-start.md).
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**Standalone servers** have no money system, so paid checkouts can't charge anyone. Either make your shops free (`pricingProfile = false` on the entries in `config/shops.lua` charges nothing there) or connect your economy in `bridge/framework/server.lua` (see [Framework bridge](/visionstore-docs/scripts/advanced-clothing/developers/framework-bridge.md)).
{% endhint %}

## Updating

Back up `config/`, `shared/locales/`, `bridge/` and `install/`, replace the folder, then copy your changes back. If you built a colour index (`/clothingcolors`), keep the `data/colors/` folder.

After an **illenium-appearance** update, repeat steps 2 to 4 of [illenium-appearance setup](/visionstore-docs/scripts/advanced-clothing/illenium-setup.md): the update overwrites illenium's files.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://visionstore.gitbook.io/visionstore-docs/scripts/advanced-clothing/installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
