# Exports

## Client Exports:

### startPlayerCustomization

```lua
exports['yecoyz_appearance']:startPlayerCustomization(callback, config)
```

{% hint style="info" %}
Callback: A function that got triggered when the player is finished.
{% endhint %}

{% hint style="info" %}
Config(table): \
ped(boolean): Should the player be able to change to diffrent peds.\
isNewCharacter(boolean): Is it a new character thats getting created.\
allowExit(boolean): Should the player be able to close the menu without saving.\
tabs(table): What tabs should be available.
{% endhint %}

### setPedAppearance

```lua
exports['yecoyz_appearance']:setPedAppearance(ped, appearance)
```

{% hint style="info" %}
Ped: Entity id on the ped that you will change appearance on, ex PlayerPedId()
{% endhint %}

{% hint style="info" %}
Appearance: the appearance table/the clothes data.
{% endhint %}

### getPedAppearance

```lua
exports['yecoyz_appearance']:getPedAppearance(ped)
```

{% hint style="info" %}
Ped: the entity id on the ped you want to get clothes data from.
{% endhint %}

### setPlayerAppearance

```lua
exports['yecoyz_appearance']:setPlayerAppearance(appearance)
```

{% hint style="info" %}
Appearance: the table with all clothes you want the player to have.
{% endhint %}

### getPlayerAppearance

```lua
exports['yecoyz_appearance']:getPlayerAppearance()
```

{% hint style="info" %}
Get your players clothes.
{% endhint %}

### loadPlayerAppearance(callback)

```lua
exports['yecoyz_appearance']:loadPlayerAppearance(callback)
```

{% hint style="info" %}
Callback: A function that got triggered when the player is finished. (Gets the appearance table as argument)
{% endhint %}

### openClothingMenu

```lua
exports['yecoyz_appearance']:openClothingMenu(callback)
```

{% hint style="info" %}
Callback: A function that got triggered when the player is finished.
{% endhint %}

### openBarberMenu

```lua
exports['yecoyz_appearance']:openBarberMenu(callback)
```

{% hint style="info" %}
Callback: A function that got triggered when the player is finished.
{% endhint %}

### openSurgeonMenu

```lua
exports['yecoyz_appearance']:openSurgeonMenu(callback)
```

{% hint style="info" %}
Callback: A function that got triggered when the player is finished.
{% endhint %}

### openMaskMenu

```lua
exports['yecoyz_appearance']:openMaskMenu(callback)
```

{% hint style="info" %}
Callback: A function that got triggered when the player is finished.
{% endhint %}

### openPedMenu

```lua
exports['yecoyz_appearance']:openPedMenu(pedModels)
```

{% hint style="info" %}
pedModels: an array with all the peds you can change in between, if nil it will get list from Config.Peds.
{% endhint %}

### isMenuOpen

```lua
exports['yecoyz_appearance']:isMenuOpen()
```

{% hint style="info" %}
Returns a boolean if the menu is open or not.
{% endhint %}

### closeMenu

```lua
exports['yecoyz_appearance']:closeMenu()
```

{% hint style="info" %}
Force the menu to close.
{% endhint %}

### openOutfitMenu

```lua
exports['yecoyz_appearance']:openOutfitMenu()
```

{% hint style="info" %}
Opens a menu to change to saved outifts.
{% endhint %}

## Server Exports:

### getPlayerAppearance

```lua
exports['yecoyz_appearance']:getPlayerAppearance(source)
```

{% hint style="info" %}
Source: the players id.
{% endhint %}

{% hint style="info" %}
Returns a table with players appearance data.
{% endhint %}

### setPlayerAppearance

```lua
exports['yecoyz_appearance']:setPlayerAppearance(source, appearance)
```

{% hint style="info" %}
Source: the players id.&#x20;
{% endhint %}

{% hint style="info" %}
Appearance: a table with all the players clothing data.
{% endhint %}


---

# 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://yecoyz-resources.gitbook.io/yecoyz/paid-resources/appearance/exports.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.
