> 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/illenium-setup.md).

# illenium-appearance setup

Connect illenium-appearance to Vision Advanced Clothing in about 5 minutes. Every change only adds lines.

Vision Advanced Clothing is the **interface**: shops, barbers, tattoo parlours, the surgeon, wardrobes and the character creator. **illenium-appearance** stays the **backend** that applies and saves every appearance.

Already running illenium-appearance? Good: your players' skins, saved outfits and illenium's outfit codes keep working, because Vision Clothing reads and writes the same tables (`playerskins`, `player_outfits`, `player_outfit_codes`). The four small changes below hand illenium's menus to Vision Clothing.

{% hint style="info" %}
Every change only **adds** lines or switches a setting off, so undoing it is just deleting them again. Search for `Vision Advanced Clothing` in illenium's files to find everything you added.
{% endhint %}

| Step           | File in `illenium-appearance/` | Needed for                                                                         |
| -------------- | ------------------------------ | ---------------------------------------------------------------------------------- |
| 1              | None                           | Install illenium and its SQL                                                       |
| 2              | `shared/config.lua`            | Removes illenium's own shop zones, peds and ped menu (no double prompts)           |
| 3              | `client/client.lua`            | Every illenium menu **and** the new-character creator open Vision Clothing instead |
| 4 *(optional)* | `game/util.lua`                | Add-on peds given with `/giveped` save under their real model name                 |

{% stepper %}
{% step %}

### Install illenium-appearance

1. Download the latest release from [GitHub](https://github.com/iLLeniumStudios/illenium-appearance) (tested with **5.7.x**).
2. Keep the folder name exactly **`illenium-appearance`**.
3. Import its SQL files (`illenium-appearance/sql/`) into your database.
4. In `server.cfg`, start it **before** Vision Advanced Clothing:

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

{% endstep %}

{% step %}

### Turn off illenium's own shops

Vision Clothing already creates every clothing store, barber, tattoo parlour, the surgeon and the police locker room (`config/shops.lua`), at the same places illenium uses. If illenium keeps its own, players see two prompts and two blips at each shop.

Open **`illenium-appearance/shared/config.lua`** and set these values (they already exist near the top of the file, change `true` to `false`):

```lua
Config.UseTarget = false
Config.UseRadialMenu = false
Config.EnablePedsForShops = false
Config.EnablePedsForClothingRooms = false
Config.EnablePedsForPlayerOutfitRooms = false
Config.EnablePedMenu = false            -- Vision Clothing registers /pedmenu itself (alias of /clothingshop)
Config.EnableJobOutfitsCommand = false
```

Then add these lines at the **very end** of the same file:

```lua
-- Vision Advanced Clothing owns every appearance UI; illenium stays the backend.
-- (The original tables above are kept: delete these three lines to restore them.)
Config.Stores = {}
Config.ClothingRooms = {}
Config.PlayerOutfitRooms = {}
```

{% endstep %}

{% step %}

### Hand illenium's menus and creator to Vision Clothing

Open **`illenium-appearance/client/client.lua`**.

**3a. Paste this helper at the very top of the file:**

```lua
-- Vision Advanced Clothing -------------------------------------------------------------
-- Hands illenium's appearance menus and character creator to Chapo_advanced_clothing.
-- If Chapo_advanced_clothing is stopped, illenium's own menus open exactly as before.
local CHAPO_CLOTHING = "Chapo_advanced_clothing"

function ChapoClothingOpen(kind, subType, isPedMenu, menuData)
    if GetResourceState(CHAPO_CLOTHING) ~= "started" then return false end
    local ok, handled = pcall(function()
        return exports[CHAPO_CLOTHING]:HandleIlleniumOpen(kind, subType, isPedMenu, menuData)
    end)
    return ok and handled == true
end

function ChapoClothingCreator(gender, onSubmit, onCancel)
    if GetResourceState(CHAPO_CLOTHING) ~= "started" then return false end
    local ok, handled = pcall(function()
        return exports[CHAPO_CLOTHING]:HandleIlleniumCreator(gender, onSubmit, onCancel)
    end)
    return ok and handled == true
end
-- Vision Advanced Clothing end ---------------------------------------------------------
```

**3b. Add one line as the first line of three functions.** Search the same file for each function and add the marked line. Nothing else changes.

{% tabs %}
{% tab title="InitializeCharacter (new characters)" %}
Search for `function InitializeCharacter(`:

```lua
function InitializeCharacter(gender, onSubmit, onCancel)
    if ChapoClothingCreator(gender, onSubmit, onCancel) then return end   -- add this line
    SetInitialClothes(Config.InitialPlayerClothes[gender])
    ...
```

{% endtab %}

{% tab title="OpenShop (shops and ped menu)" %}
Search for `function OpenShop(`:

```lua
function OpenShop(config, isPedMenu, shopType)
    if ChapoClothingOpen("shop", shopType, isPedMenu) then return end     -- add this line
    lib.callback("illenium-appearance:server:hasMoney", false, function(hasMoney, money)
    ...
```

{% endtab %}

{% tab title="OpenMenu (outfit rooms, job outfits)" %}
Search for `function OpenMenu(`:

```lua
function OpenMenu(isPedMenu, menuType, menuData)
    if ChapoClothingOpen("menu", menuType, isPedMenu, menuData) then return end   -- add this line
    local mainMenuID = "illenium_appearance_main_menu"
    ...
```

{% endtab %}
{% endtabs %}

That is the whole integration. It covers:

* **Character creation on every framework.** qb-core / Qbox (`qb-clothes:client:CreateFirstCharacter`), ESX (`esx_skin:openSaveableMenu`, `esx_skin:playerRegistered`) and ox\_core all end in `InitializeCharacter`, so your multicharacter needs **no changes**. When the player saves, Vision Clothing hands control back to the multicharacter exactly like illenium did.
* **Any script** that opens illenium's clothing shop, barber, tattoo, surgeon, outfit room or job outfits through illenium's events.
* **Safety**: if Vision Advanced Clothing is stopped or fails, illenium's own menu opens instead. Players are never left without an appearance menu.
  {% endstep %}

{% step %}

### Custom / add-on peds (optional)

Only needed if you give players **add-on** peds with `/giveped`. illenium only knows the peds in its own `Config.Peds` list and saves every other ped as `mp_m_freemode_01`. This lets it ask Vision Clothing for the real model name.

Open **`illenium-appearance/game/util.lua`**, find `local function getPedModel(ped)` and paste this block **directly above** its line `return pedModelsByHash[GetEntityModel(ped)]`:

```lua
    -- Vision Advanced Clothing: name add-on peds illenium does not know
    do
        local hash = GetEntityModel(ped)
        if pedModelsByHash[hash] == nil and GetResourceState("Chapo_advanced_clothing") == "started" then
            local ok, name = pcall(function()
                return exports["Chapo_advanced_clothing"]:ResolvePedModelName(hash)
            end)
            if ok and type(name) == "string" and name ~= "" and joaat(name) == hash then
                pedModelsByHash[hash] = name
            end
        end
    end
```

Without this step Vision Clothing's own menus still save custom peds correctly. It only matters for saves that go through illenium itself.
{% endstep %}
{% endstepper %}

## Check it works

1. Restart the server (both resources).
2. Walk into a clothing store: **one** prompt, and Vision Clothing's interface opens.
3. `/pedmenu` (admin) opens Vision Clothing's admin menu, not illenium's.
4. Create a new character: Vision Clothing's character creator opens, and **SAVE CHARACTER** continues your multicharacter's spawn as usual.

## After an illenium-appearance update

An update overwrites illenium's files. Repeat **steps 2 to 4**.

## Scripts that call illenium's exports directly

A script that calls illenium's `startPlayerCustomization` export directly skips the guards above. Point it at Vision Clothing's exports instead: `OpenClothingShop`, `OpenBarber`, `OpenTattooShop`, `OpenSurgeon`, `OpenWardrobe`, `OpenCharacterCreator` (see [Exports](/visionstore-docs/scripts/advanced-clothing/developers/exports.md)).

## Want illenium's menus back?

* **Temporarily**: set `Config.IlleniumIntercept.enabled = false` in `config/config.lua`. Every intercepted request goes back to illenium's own UI. Stopping Vision Clothing has the same effect.
* **For good**: delete the lines you added in steps 2 to 4 and restart. illenium-appearance works exactly as it did before.


---

# 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/illenium-setup.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.
