# esx\_multicharacter OLD

{% hint style="warning" %}
This is integration for the old version of esx\_multicharacter (<1.10.9)

If this integration does not match your esx\_multicharacter version, please try the [new one](/paid-resources/rcore_clothing/impl/esx_multicharacter.md).
{% endhint %}

### Step 1

Open file `esx_multicharacter/server/main.lua` and find `characters[id] = {` (inside function `SetupCharacters`)

Paste the following code **above** it.

```lua
if GetResourceState("rcore_clothing") == "started" then
    if v then
      v.skin = json.encode(exports["rcore_clothing"]:getSkinByIdentifier(v.identifier))
    elseif result and i and result[i] then
      result[i].skin = json.encode(exports["rcore_clothing"]:getSkinByIdentifier(result[i].identifier))
    else
      print("ERROR: Unknown version of multichar")
    end
end
```

Now it should look like the following image:

![](/files/OW352xTp1GyvAVd4KX3U)

### Step 2

Open file `esx_multicharacter/client/main.lua` and find `TriggerEvent("skinchanger:loadSkin", skin)` (inside function `SetupCharacter`)

Replace the line with the following code:

```lua
if Characters[index].skin then
    exports["rcore_clothing"]:setPlayerSkin(skin)
else
    TriggerEvent("skinchanger:loadSkin", skin)
end
```

Now it should look like the following image:

![](/files/kJj4CaHsIiZ7g9HnXbNh)

### Step 3

In the same file as step 2 (`esx_multicharacter/client/main.lua`), find `TriggerEvent("skinchanger:loadSkin", Characters[index].skin)` (inside function `SetupCharacter`)

Replace the line with the following code:

```lua
exports["rcore_clothing"]:setPlayerSkin(Characters[index].skin)
```

Now it should look like the following image:

![](/files/uWhgrhMuRH6Fqqd3hT9A)

### Step 4

Open file `esx_multicharacter/server/main.lua` and find `local DB_TABLES`.

Now add these entries to the DB\_TABLES variable:

```lua
["rcore_clothing_current"] = "identifier",
["rcore_clothing_purchased"] = "identifier",
["rcore_clothing_outfits"] = "identifier",
```

Now it should look something like this (don't copy this, you may have other existing tables defined, this is just an example):

```lua
local DB_TABLES = { users = "identifier", ["rcore_clothing_current"] = "identifier", ["rcore_clothing_purchased"] = "identifier", ["rcore_clothing_outfits"] = "identifier", }
```


---

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