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

# Clothing

## aty\_clothing

A modern character customization system for FiveM with support for ESX and QBCore frameworks.

### 📋 Features

* Character creation with heritage, face features, clothing, accessories
* Multiple shop types (clothing stores, barber shops, tattoo shops)
* Wardrobe system for saving outfits
* Shop ownership system with rent and balance management
* Multi-language support (English, Turkish)
* Modern Vue.js UI with image previews

***

### 🔧 Dependencies

* **oxmysql** - Database
* **ox\_lib** - UI components and notifications
* **PolyZone** - Zone detection (optional)

***

### 🔌 Developer Integration & APIs

We provide a comprehensive, framework-agnostic integration API. All technical details, exports, events, framework compatibility layers, and practical examples have been organized into a dedicated integration guide.

#### API Capabilities Overview:

* **Customized Shop Triggers:** Open menus with restricted categories (e.g., face, hair, or tattoos only) and unique pricing.
* **Wardrobe Integrations:** Programmatically hook personal drawers for apartments, housing, and organization locker rooms.
* **Ped Skin Accessors:** Instant client-side and server-side exports to read or write ped skin data.
* **Database Utilities:** Framework-independent methods to fetch or save player skins and outfit collections.
* **Backward Compatibility:** Seamless out-of-the-box event handling compatibility for `qb-clothing`/`qb-clothes` and `esx_skin`/`skinchanger`.

***

### ⚙️ Configuration

#### Locale

Set the language in `shared/locale.lua`:

```lua
Locale = 'en'  -- English
Locale = 'tr'  -- Turkish
```

#### Shop Configuration

Configure shops in `config.lua`:

```lua
Config.Shops = {
    {
        id = "clothing_1",
        type = "market",
        label = "Clothing Store",
        coords = vector3(123.0, 456.0, 78.0),
        price = 50000,
        weeklyRent = 5000,
        allowedCategories = {"clothes", "accessories"}
    }
}
```

#### Wardrobe Configuration

Configure wardrobes in `config.lua`:

```lua
Config.Wardrobes = {
    {
        coords = vector3(123.0, 456.0, 78.0),
        job = nil,  -- nil = public, "police" = job-locked
        allowedCategories = {"clothes", "accessories"}
    }
}
```

***

### 📁 Skin Data Structure

```lua
{
    -- Model
    sex = 0,  -- 0 = male, 1 = female

    -- Heritage
    mom = 0,
    dad = 0,
    face_md_weight = 0.5,
    skin_md_weight = 0.5,

    -- Face features
    nose_1 = 0.0,
    nose_2 = 0.0,
    -- ... (all face shape values)

    -- Clothing
    tshirt_1 = 0,
    tshirt_2 = 0,
    torso_1 = 0,
    torso_2 = 0,
    pants_1 = 0,
    pants_2 = 0,
    shoes_1 = 0,
    shoes_2 = 0,
    -- ... (all clothing values)

    -- Accessories
    helmet_1 = -1,
    helmet_2 = 0,
    glasses_1 = -1,
    glasses_2 = 0,
    -- ... (all accessory values)

    -- Hair & Makeup
    hair_1 = 0,
    hair_2 = 0,
    hair_color_1 = 0,
    hair_color_2 = 0,
    beard_1 = 0,
    beard_2 = 0,
    -- ... (all hair/makeup values)
}
```
