> ## 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.

# API ve events

> Editor, görünüm, kıyafet, dress/undress, wardrobe ve Quick Clothing için RCO Appearance entegrasyonları.

Temel kural: **ped üzerinde görünen bir değişiklik otomatik olarak karaktere kaydedilmiş değildir**.

## Kalıcı editor açma

Güvenilir server kodundan:

```lua theme={"dark"}
exports['rco-appearance']:OpenEditor(source, { mode = 'barber' })
exports['rco-appearance']:OpenWardrobe(source)
```

Client kendi save yetkisini veremez; kalıcı client çağrıları `false, 'server_authorization_required'` döndürür. `OpenEditorLocal(options)` yalnızca local/görsel kullanım içindir.

## Görsel görünüm

```lua theme={"dark"}
exports['rco-appearance']:ApplyAppearance(snapshot)
local snapshot = exports['rco-appearance']:GetAppearance(ped)
exports['rco-appearance']:ReloadAppearance()
```

Server:

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

`ApplyAppearance` veritabanına save yapmaz.

## Kıyafet helpers

```lua theme={"dark"}
local item = exports['rco-appearance']:GetEquipped('hats')
exports['rco-appearance']:EquipCategory('hats', itemData)
exports['rco-appearance']:UnequipCategory('hats')
```

## Dress / Undress

```lua theme={"dark"}
exports['rco-appearance']:Undress()
exports['rco-appearance']:Dress()
exports['rco-appearance']:SetUndressed(true)
exports['rco-appearance']:SetUndressed(false)
```

`Undress` kıyafetleri görsel olarak çıkarır. `Dress` kaydedilmiş RCO görünümünü serverdan tekrar ister. Geçici undress kayıtlı snapshot'ı değiştirmez.

## Editor state

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

## Persistence / outfits

```lua theme={"dark"}
exports['rco-appearance']:GetAppearanceForCharacter(charId, function(snapshot, err) end)
exports['rco-appearance']:SetAppearanceForCharacter(charId, snapshot, function(ok, err) end)
exports['rco-appearance']:ListOutfits(source, function(outfits, err) end)
```

## Quick Clothing

```lua theme={"dark"}
exports['rco-appearance']:ToggleClothing('holsters')
exports['rco-appearance']:SetClothingVisible('coat', false)
exports['rco-appearance']:ToggleSleeves()
exports['rco-appearance']:SetSleeves('rolled')
exports['rco-appearance']:ToggleCollar()
exports['rco-appearance']:SetCollar('open')
exports['rco-appearance']:TogglePantsTuck()
exports['rco-appearance']:SetPantsTucked(true)
exports['rco-appearance']:ToggleGunBelt()
exports['rco-appearance']:ToggleClosedCoat()
```

Gun holsters için `holsters` kategorisini kullanın. `ToggleGunBelt()` `gunbelt` helper'ıdır; `ToggleClosedCoat()` mantıksal `coat` grubunun alias'ıdır.

Server:

```lua theme={"dark"}
exports['rco-appearance']:SetPlayerClothingVisible(source, 'hat', false)
exports['rco-appearance']:TogglePlayerClothing(source, 'holsters')
exports['rco-appearance']:SetPlayerClothingTransform(source, 'sleeves', 'rolled')
exports['rco-appearance']:ResetPlayerClothingToggles(source)
```
