> For the complete documentation index, see [llms.txt](https://tefox-scripts.gitbook.io/tefox-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tefox-scripts.gitbook.io/tefox-scripts-docs/tefox-scripts-documentation/tefox_multicharacter/installation.md). Agents can also search and read this documentation through its [MCP server](https://tefox-scripts.gitbook.io/tefox-scripts-docs/~gitbook/mcp).

# Installation

Installing the **TEFOX Multicharacter** system is quick and straightforward. Follow these steps:

1. <mark style="color:green;">Download the Script:</mark> Download the latest version of the resource from your [<mark style="color:$danger;">Keymaster</mark>](https://portal.cfx.re/assets) (Tebex) account.
2. <mark style="color:green;">Extract the Files:</mark> Extract the <mark style="color:yellow;">`tefox_multicharacter`</mark> folder into your server's <mark style="color:yellow;">`resources`</mark> directory <mark style="color:$info;">(e.g.,</mark> <mark style="color:$info;"></mark><mark style="color:$info;">`[standalone]`</mark> <mark style="color:$info;"></mark><mark style="color:$info;">or</mark> <mark style="color:$info;"></mark><mark style="color:$info;">`[tefox]`</mark><mark style="color:$info;">)</mark>.

3\. <mark style="color:green;">Framework Specific Setup (IMPORTANT):</mark>

* <mark style="color:blue;">For ESX Legacy Users:</mark> You MUST open <mark style="color:yellow;">`es_extended/shared/config/main.lua`</mark> and set <mark style="color:$info;">`Config.Multichar = true`</mark>. If this is left as <mark style="color:$info;">`false`</mark>, ESX will completely bypass the character selection screen!
* <mark style="color:blue;">Disable Default Scripts:</mark> Make sure to stop or remove any default multicharacter scripts provided by your framework <mark style="color:$info;">(e.g.,</mark> <mark style="color:$info;"></mark><mark style="color:$info;">`qb-multicharacter`</mark> or <mark style="color:$info;">`esx_multicharacter`</mark><mark style="color:$info;">)</mark> to prevent conflicts.

4. <mark style="color:green;">Database Setup (Playtime Tracking):</mark> The script includes SQL files necessary to track and display player playtime in the UI. You MUST import the correct SQL file into your database based on your framework:

* <mark style="color:blue;">For ESX:</mark> Import <mark style="color:yellow;">`sql/esx_playtime.sql`</mark>
* <mark style="color:blue;">For QBCore & Qbox:</mark> Import <mark style="color:yellow;">`sql/qbcore_playtime.sql`</mark>

5. <mark style="color:green;">Configure</mark> <mark style="color:green;"></mark><mark style="color:green;">`server.cfg`</mark><mark style="color:green;">:</mark> Add the following line to your <mark style="color:$info;">`server.cfg`</mark> file. Ensure it starts *after* your framework and database resources.

```lua
ensure oxmysql
ensure qb-core # or (es_extended / qbx_core)
ensure tefox_multicharacter
```

6. <mark style="color:green;">Disable Default Scripts</mark>: Make sure to stop or remove any default multicharacter scripts provided by your framework <mark style="color:$info;">(e.g.,</mark> <mark style="color:$info;"></mark><mark style="color:$info;">`qb-multicharacter`</mark> or <mark style="color:$info;">`esx_multicharacter`</mark><mark style="color:$info;">)</mark> to prevent overlapping.
7. <mark style="color:green;">Restart Your Server:</mark> Start your server and join to test the new experience!
