# Clothing Framework

### qb-clothing

{% hint style="warning" %}
If you're using qb-clothing, I suggest using Config.EnableThreadCheck in the configuration file since qb-clothing doesn't export the skinData array where significant changes are needed. The blacklisted checker of this script might fail if you don't use Config.EnableThreadCheck.
{% endhint %}

#### Save Skin Exports

*Step 1: Navigate to **qb-clothing/client/main.lua***

*Step 2: Find* local function ***SaveSkin()***

*Step 3: Replace the whole function. (Exports will be added)*

```lua
local function SaveSkin()
    local model = GetEntityModel(PlayerPedId())
    local clothing = json.encode(skinData)
    TriggerServerEvent("qb-clothing:saveSkin", model, clothing)
end
exports('SaveSkin', SaveSkin)
```

### illenium-appearance

#### Skin Checks Exports

Step 1: Navigate to ***illenium-appearance/client/framework/(your\_framework)/main.lua***

Step 2: Find ***Framework.CachePed()***

Step 3: Replace the whole function. (Check skin exports added)

```lua
// ESX
function Framework.CachePed()
    ESX.SetPlayerData("ped", cache.ped)
    exports['cfx-praryo-clperms']:verifyPlayerSkin(true)
end

// QBCore
function Framework.CachePed()
    exports['cfx-praryo-clperms']:verifyPlayerSkin(true)
    return nil
end
```

#### Enabling Illenium Blacklist Function

Step 1: Navigate to ***illenium-appearance/game/customization.lua***

Step 2: Find ***getComponentSettings*** function

Step 3: Replace the following code from the function.

{% code fullWidth="false" %}

```lua
// Old code
blacklistSettings = filterBlacklistSettings(componentBlacklistMap(gender, componentId), drawableId)

// New code
blacklistSettings = exports["cfx-praryo-clperms"]:filterBlacklistSettings(exports["cfx-praryo-clperms"]:componentBlacklistMap(gender, componentId), drawableId)
```

{% endcode %}

Step 4: Find ***getPropSettings*** function

Step 5: Replace the following code from the function.

{% code fullWidth="false" %}

```lua
// Old  code
blacklistSettings = filterBlacklistSettings(propBlacklistMap(gender, propId), drawableId)

// New code
blacklistSettings = exports["cfx-praryo-clperms"]:filterBlacklistSettings(exports["cfx-praryo-clperms"]:propBlacklistMap(gender, propId), drawableId)
```

{% endcode %}

&#x20;Step 6: Find ***getHairSettings*** function

Step 7: Replace the following code from the function

{% code fullWidth="false" %}

```lua
// Old code
blacklistSettings = filterBlacklistSettings(Config.Blacklist[gender].hair, GetPedDrawableVariation(ped, 2))

// New code
blacklistSettings = exports["cfx-praryo-clperms"]:getHairBlacklist(ped, gender)
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://praryo.gitbook.io/documentation/paid-resources/cfx-praryo-clperms/clothing-framework.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
