> For the complete documentation index, see [llms.txt](https://cylexdev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cylexdev.gitbook.io/docs/cylex_mdt/installation-and-configuration.md).

# Installation & Configuration

#### Installation Instructions for **cylex\_multichar**

{% hint style="info" %}
Remember to choose your own framework and install accordingly!
{% endhint %}

{% stepper %}
{% step %}

### **Download the Script**

* Log in to [portal.cfx.re](https://portal.cfx.re/).
* Click on **"Granted Access"** on the left side of the page.
* Search for cylex\_mdt
* Download all the available options that appear.
  {% endstep %}

{% step %}

### **Extract the Files**

* After downloading, unzip all the **cylex\_mdt.pack**.**zip** folders.
* Move all the extracted files into the **resources** folder.
* Delete <kbd>**lb-tablet**</kbd> , <kbd>**ps-mdt**</kbd> and <kbd>**other mdt**</kbd>scripts in **resources** folder.
  {% endstep %}

{% step %}

### Set your language

* Open `editable/config.lua` and set `Config.Locale` to your preferred language:

```lua
Config.Locale = 'en'   -- 'en' for English, 'tr' for Turkish
```

* If you want date and number formatting to match your locale, also update `Config.DateLocale`:

```lua
Config.DateLocale = 'en-US'   -- BCP-47 tag, e.g. 'en-US', 'en-GB', 'tr-TR'
```

{% endstep %}

{% step %}

### Add the resource to server.cfg&#xD;&#x20;&#xD;

Open your `server.cfg` and add the `ensure` line **after** your framework resource. Cylex Multicharacter must start after **es\_extended** is fully loaded — if it starts too early, the character select screen will flash and disappear.

```
# Your framework & sql must come first
# this is a example, if you already have it, do not add again.
start es_extended / qb-core / qbx_core

# Then add Cylex Multicharacter
ensure cylex_mdt
```

{% endstep %}

{% step %}

### Adding your police jobs

In the same `editable/config.lua`, set `Config.AllowedJobs` to include every job that should be able to open the MDT:

```lua
Config.AllowedJobs = {
    ['police']  = true,
    ['sheriff'] = true,
}
```

`Config.Departments` controls which departments appear in the sidebar and on the Officers page. The default list is a multi-department LSPD/BCSO setup. Trim it to match only the departments your server actually uses, and make sure each entry's `jobName` matches a key in `Config.AllowedJobs`:

```lua
Config.Departments = {
    { id = 'police',  name = 'MRPD',  fullName = 'Mission Row Police Department', jobName = 'police',  color = '#043052', logo = 'police.png'  },
    { id = 'sheriff', name = 'PBSO',  fullName = 'Paleto Bay Sheriff Office',     jobName = 'sheriff', color = '#d47a20', logo = 'sheriff.png' },
}
```

{% hint style="danger" %}
Each key must exactly match the job name your framework uses. Any player whose current job is not in this table will be denied access.\
You need to edit Config.AllowedJobs & Config.Departments at the sametime
{% endhint %}
{% endstep %}

{% step %}

### MDT Access Configuration

#### Options

* `Config.OpenKey`\
  Key used to open the MDT.\
  Set to `false` to disable key access.
* `Config.OpenCommand`\
  Chat command used to open the MDT (`/mdt`).\
  Set to `false` to disable the command.
* `Config.UniformPopupKey`\
  Key used to show the cursor on the floating uniform popup while holding it.
* `Config.TabletItem`\
  Inventory item required to open the MDT.\
  Set to `false` to disable item requirement.

```lua
Config.OpenKey = 'F5'
Config.OpenCommand = 'mdt'
Config.UniformPopupKey = 'J'
Config.TabletItem = "tablet"
```

{% endstep %}

{% step %}

### Start the server

Start (or restart) your FiveM server. On startup, Cylex MDT will:

* **Auto-detect your framework** — scans for `qbx_core`, `qb-core`, or `es_extended` among started resources and sets the correct bridge automatically.
* **Auto-detect inventory, phone, and housing** — scans for supported resources and selects the right adapter for each.
* **Run database migrations** — creates or updates all required tables. No manual SQL is needed.
* **Print a health check** — outputs a summary to the server console. If anything is misconfigured (empty `AllowedJobs`, undetected framework, etc.), the health check tells you exactly which line in `config.lua` to fix.

{% hint style="warning" %}
If something does not look right, open `config.lua` and set `Config.Debug = true`. This enables verbose output in the server console to help you identify the issue.
{% endhint %}
{% endstep %}

{% step %}

### Open the MDT in-game

While playing as a character with a job listed in `Config.AllowedJobs`, press **F5** or type `/mdt` in chat to open the tablet. The default key and command can both be changed through `config.lua`
{% endstep %}
{% endstepper %}

By following these steps and adjusting the settings in **config.lua**, **MultiCharacter Script** will be fully configured and ready to use on your server!
