# Installation

### 1. Download Resource

To begin, download your recently purchased resource from [our store](https://corem.tebex.io/)

To do this, log in to your [cfx portal](https://portal.cfx.re/) account and navigate to the 'Asset Grants' section, where you will find your owned resources.

***

### 2. Dependencies

Before installing **Multicharacter**, you must ensure the following dependency is installed:

* **crm-core** – The core system powering all CoreM scripts. *<mark style="color:red;">(install first !)</mark>*

{% content-ref url="../crm-core/installation" %}
[installation](https://corem.gitbook.io/welcome/crm-core/installation)
{% endcontent-ref %}

***

### 3. Asset Arrangement

Place the **crm-multicharacter** package inside the \[crm-scripts] folder:

```
resources/
└── [crm-scripts]/
    ├── crm-core
    ├── crm-multicharacter
    └── ... (any other CoreM scripts)
```

In your `server.cfg`, you must:

1. **Ensure `crm-core` first**
2. Then ensure the entire `[crm-scripts]` folder

{% hint style="danger" %}
**Important**\
Ensure CoreM scripts *after* your framework (qb-core / qbx-core / es\_extended).
{% endhint %}

```
# CoreM
ensure crm-core
ensure [crm-scripts]
```

***

### 4. Database

{% hint style="info" %}
Execute the SQL queries found in the `crm-sql` folder within your database, skipping this step if no files are present.
{% endhint %}

***

### 5. Framework Setup

*Before using **crm-multicharacter**, you need to configure your framework and remove any conflicting scripts.*

<mark style="color:red;">Remove Other Multicharacter / Identity / Spawn Scripts</mark>

If you have any of the following scripts, remove them from your server:

* `esx_multicharacter, esx_identity`
* `qb-multicharacter, qb-spawn`
* Any other multicharacter, identity or spawn scripts

{% hint style="danger" %}
Keeping old scripts may cause conflicts with crm-multicharacter.
{% endhint %}

{% tabs %}
{% tab title="ESX" %}
**ESX Framework Setup**

Edit the file:

```
es_extended/shared/config/main.lua
```

Find this line:

```lua
Config.Multichar = GetResourceState("esx_multicharacter") ~= "missing"
```

Replace it with:

```lua
Config.Multichar = true
```

> ✅ This ensures ESX uses **crm-multicharacter** instead of any legacy multicharacter system.
> {% endtab %}

{% tab title="QBOX" %}
**QBOX Framework Setup**

Edit the file:

```
qbx-core/config/client.lua
```

Set the following options:

```lua
useExternalCharacters = true
startingApartment = false
```

> ✅ This ensures QBOX uses **crm-multicharacter** as the external character handler.
> {% endtab %}
> {% endtabs %}
