> ## Documentation Index
> Fetch the complete documentation index at: https://rust-co.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Clothing

> Commands, exports and events for hats, masks, shirts, coats, boots, sleeves, collars and radial-menu integrations.

Quick Clothing is for **temporary gameplay changes**: take a hat off, open a collar, roll sleeves, remove a coat, and put it back later.

It is deliberately separate from the saved appearance. A radial menu should not have to rewrite a character's wardrobe every time they take their hat off.

## Available actions

```text theme={"dark"}
hat
mask
eyewear
shirt
vest
coat
gloves
pants
boots
chaps
sleeves
collar
```

The first ten are visibility toggles. `sleeves` and `collar` are garment transforms and only work when the current MP garment exposes a compatible wearable state.

## Built-in commands

Players can use:

```text theme={"dark"}
/hat
/mask
/eyewear
/shirt
/vest
/coat
/gloves
/pants
/boots
/chaps
/sleeves
/collar
```

For a basic radial menu, calling the command is valid:

```lua theme={"dark"}
ExecuteCommand('hat')
```

For programmatic integrations, prefer the exports below because you get a success value and failure reason.

## Client exports

```lua theme={"dark"}
local ok, reason = exports['rco-appearance']:ToggleClothing('hat')
local ok, reason = exports['rco-appearance']:SetClothingVisible('coat', false)

local ok, reason = exports['rco-appearance']:ToggleSleeves()
local ok, reason = exports['rco-appearance']:SetSleeves('rolled')

local ok, reason = exports['rco-appearance']:ToggleCollar()
local ok, reason = exports['rco-appearance']:SetCollar('open')

local ok, reason = exports['rco-appearance']:ResetClothingToggles()

local state = exports['rco-appearance']:GetClothingToggleState()
local visible = exports['rco-appearance']:IsClothingVisible('hat')
```

### Sleeve values

Use the semantic state rather than a MetaPed hash:

```lua theme={"dark"}
exports['rco-appearance']:SetSleeves('rolled')
exports['rco-appearance']:SetSleeves('full')
```

### Collar values

```lua theme={"dark"}
exports['rco-appearance']:SetCollar('open')
exports['rco-appearance']:SetCollar('closed')
```

RCO resolves the actual wearable state exposed by the current garment. Your radial resource should not hardcode RDR2 wearable-state hashes.

## Local client events

If your radial/menu system is event-based:

```lua theme={"dark"}
TriggerEvent('rco-appearance:client:ToggleClothing', 'hat')
TriggerEvent('rco-appearance:client:SetClothingVisible', 'hat', false)
TriggerEvent('rco-appearance:client:ToggleSleeves')
TriggerEvent('rco-appearance:client:SetSleeves', 'rolled')
TriggerEvent('rco-appearance:client:ToggleCollar')
TriggerEvent('rco-appearance:client:SetCollar', 'open')
TriggerEvent('rco-appearance:client:ResetClothingToggles')
```

These are **local client events** (`AddEventHandler`), not network events.

## Server exports

Server-side scripts such as medical/job systems can change the same semantic state without inventing their own client protocol:

```lua theme={"dark"}
local state = exports['rco-appearance']:GetPlayerClothingToggleState(source)

local ok, reason = exports['rco-appearance']:SetPlayerClothingVisible(source, 'hat', false)
local ok, reason = exports['rco-appearance']:TogglePlayerClothing(source, 'coat')
local ok, reason = exports['rco-appearance']:SetPlayerClothingTransform(source, 'sleeves', 'rolled')
local ok, reason = exports['rco-appearance']:ResetPlayerClothingToggles(source)
```

## Why some combinations are blocked

Quick Clothing is intentionally conservative. If removing one item would expose an invalid body composition, RCO returns a reason instead of forcing the change.

Examples include a shirt under certain visible vests/coats, pants with lower-body layers that depend on them, gloves under gauntlets, or boots with compatible dependent pieces.

Common reasons include:

```text theme={"dark"}
invalid_category
invalid_argument
no_component
blocked_by_coat
blocked_by_vest
blocked_by_boots
blocked_by_chaps
blocked_by_gauntlets
blocked_by_spats
blocked_by_spurs
unsupported
unsupported_npc_clothing
unknown_body_state
editor_open
dead
busy
superseded
rollback_failed
```

Treat the reason as a normal rejected action, not as a crash condition.

## NPC clothing behavior

Visibility toggles understand RCO's NPC clothing pipeline, but **sleeves/collar transforms are not invented for NPC meshes**. When the current garment cannot safely expose that transform, the API returns `unsupported_npc_clothing`.

That is intentional. A fake sleeve transform that visually works on one NPC shirt and removes the player's arms on another would be worse than refusing the action.

## Editor, wardrobe and `/reloadskin`

Quick Clothing state is semantic and temporary.

When the player opens Creator, a tailor or wardrobe, RCO works from the **real base appearance**, not the temporarily hidden version. After the editor closes, compatible toggles are revalidated and reapplied.

Example:

```text theme={"dark"}
Player hides hat
  ↓
Opens tailor and buys a different hat
  ↓
Saves
  ↓
Quick Clothing state still says "hat hidden"
  ↓
New hat remains hidden until the player toggles it back on
```

If the new garment no longer supports a previous transform such as rolled sleeves, only that invalid transform is cleared.

## OneSync / replication

RCO replicates **semantic intent** through player state, not full appearance snapshots or raw shop hashes.

Conceptually:

```lua theme={"dark"}
{
    hidden = {
        hat = true,
        coat = true,
    },
    transforms = {
        sleeves = 'rolled',
        collar = 'open',
    }
}
```

This avoids per-frame player scans and avoids caching another player's old garment hash after they change outfit. The appearance engine remains the authority for reconstructing the actual visual state.
