# Multichar integration guide

{% hint style="danger" %}
This guide is only for multicharacter authors to integrate rcore\_clothing with their system. If you are not a multicharacter author, you can ignore this guide.
{% endhint %}

This guide will help you integrate rcore\_clothing with your multicharacter system.

## Step 1 - Getting the skin

In your multicharacter system, you will need to get the skin of the character. For that you will need to call the `getSkinByIdentifier` function from rcore\_clothing and pass the identifier of the character.

* this event can be called either on client or server side
* return structure is a table with `ped_model` and `skin` keys

```lua
local skin = exports["rcore_clothing"]:getSkinByIdentifier(identifier)
```

## Step 2 - Setting the skin

After you have the skin, you will need to set it on the player. For that you will need to call the `setPedSkin` function from rcore\_clothing and pass the ped and the skin.

```lua
exports.rcore_clothing:setPedSkin(ped, skin)
```

## Step 3 - Opening the char creator

Character creator can be opened by calling the following events (which your multichar probably already calls)

**ESX:**

```lua
TriggerEvent('esx_skin:resetFirstSpawn')
TriggerEvent('esx_skin:playerRegistered')
```

**QBCore:**

```lua
TriggerEvent('qb-clothes:client:CreateFirstCharacter')
```

**Or open directly:**

```lua
TriggerEvent('rcore_clothing:openCharCreator')
```


---

# 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://documentation.rcore.cz/paid-resources/rcore_clothing/impl/integration_guide.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.
