# Player Outfits (Clothing)

When a player is sentenced to **Community Service**, they are automatically dressed in a prisoner outfit. Their original clothing is restored on release.

***

### How It Works

The clothing is applied using the `qb-clothing` event:

```lua
TriggerEvent('qb-clothing:client:loadOutfit', outfitData)
```

On release, the original skin is restored:

```lua
TriggerServerEvent("qb-clothes:loadPlayerSkin")
```

***

### Default Prisoner Outfits

The outfits are defined in `client.lua` inside the `ApplyPrisonerSkin()` function.

#### Male Outfit

```lua
local DataMale = { outfitData = {
    ['t-shirt'] = { item = 15,  texture = 0  },
    ['torso2']  = { item = 146, texture = 0  },
    ['decals']  = { item = 0,   texutre = 0  },
    ['arms']    = { item = 119, texture = 0  },
    ['pants']   = { item = 3,   texture = 7  },
    ['shoes']   = { item = 12,  texture = 12 },
    ['vest']    = { item = 0,   texture = 0  },
    ['bag']     = { item = 0,   texture = 0  },
    ['mask']    = { item = 0,   texture = 0  },
    ['hat']     = { item = 0,   texture = 0  },
}}
```

#### Female Outfit

```lua
local DataFemale = { outfitData = {
    ['t-shirt'] = { item = 3,   texture = 0  },
    ['torso2']  = { item = 38,  texture = 3  },
    ['decals']  = { item = 0,   texutre = 0  },
    ['arms']    = { item = 120, texture = 0  },
    ['pants']   = { item = 3,   texture = 15 },
    ['shoes']   = { item = 66,  texture = 5  },
    ['vest']    = { item = 0,   texture = 0  },
    ['bag']     = { item = 0,   texture = 0  },
    ['mask']    = { item = 0,   texture = 0  },
    ['hat']     = { item = 0,   texture = 0  },
}}
```

***

### How to Change the Outfit

Open `client.lua` and find the `ApplyPrisonerSkin()` function. Edit the `item` and `texture` values to match your desired clothing components.

#### Finding Clothing IDs

Use a QBCore clothing resource or a GTA V model viewer to find clothing component IDs. The format is:

* `item` = the clothing component/drawable index
* `texture` = the texture variant index

#### Outfit Component Keys

| Key       | GTA Component                   | Description        |
| --------- | ------------------------------- | ------------------ |
| `t-shirt` | Undershirt (component 8)        | Base layer shirt   |
| `torso2`  | Torso (component 11)            | Jacket / outer top |
| `arms`    | Arms (component 3)              | Arm sleeves        |
| `pants`   | Legs (component 4)              | Trousers           |
| `shoes`   | Feet (component 6)              | Footwear           |
| `vest`    | Body armor / vest (component 9) | Vest layer         |
| `bag`     | Parachute / bag (component 5)   | Bag accessory      |
| `mask`    | Mask (component 1)              | Face mask          |
| `hat`     | Hat (component 0)               | Headwear           |
| `decals`  | Decals (component 10)           | Decal overlays     |

***

### Example — Orange Prison Jumpsuit

To use a bright orange prisoner jumpsuit (if available in your clothing resource):

```lua
local DataMale = { outfitData = {
    ['torso2'] = { item = 5,  texture = 3 },  -- Orange top
    ['pants']  = { item = 5,  texture = 3 },  -- Orange pants
    ['shoes']  = { item = 34, texture = 0 },  -- Prison shoes
    -- ... other components
}}
```

> Values depend on your server's clothing packs. Test in-game using a clothing menu to find the right IDs.

***

### Disabling Outfit Change

If you don't want the outfit to change (e.g. you handle it separately), open `client.lua` and remove or comment out the `ApplyPrisonerSkin()` call inside the `moh-communityssssservice:inCommunityService` event handler.

***


---

# 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://mohssins.gitbook.io/mohscriptsdocs/moh-stoptroll/player-outfits-clothing.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.
