Installation
Install Multicharacter by MrPoulpi Labs: server.cfg order, database, ESX Legacy, QBCore and Qbox settings, and a first test.
Steps
Copy the folder into
resourceswithout renaming it:mrpoulpi_multicharacter.Remove your framework’s previous character selection (see below). Two selections at once get in each other’s way.
Add the resource to
server.cfg, after oxmysql, the framework and the appearance system:ensure oxmysql ensure es_extended ensure illenium-appearance ensure mrpoulpi_multicharacterDatabase: tables are created on first start. If your SQL user cannot create tables, import
sql/install.sql.Set at least the language, slots and shop in
config/shared.lua. The supplied store address is an example and stays blocked until you change it.Restart the whole server after changing the framework configuration.
Framework settings
- Remove
esx_multicharacterandesx_identityfromserver.cfg. - In
es_extended/shared/config/main.lua, force multicharacter mode:
Config.Multichar = true- In
config/server.lua,ServerConfig.ESX.DateFormatmust match the date of birth format in youruserstable (DD/MM/YYYYwith esx_identity). - If you come from esx_multicharacter, keep
ServerConfig.ESX.Prefix = 'char': your characters show up directly. - Add to
ServerConfig.ESX.DeleteTablesthe tables of your scripts storing per-character data (phone, houses, garages…).
- Remove
qb-multicharacterandqb-spawnfromserver.cfg. The spawn point choice is handled by the resource. - Nothing to change in qb-core.
- The items of
QBCore.Shared.StarterItemsare given at creation. To give nothing:ServerConfig.QB.StarterItems = false.
No starter apartment is assigned at creation.
- In
qbx_core/config/client.lua, hand the selection over to an external resource:
characters = {
useExternalCharacters = true,
-- your other settings
},- Starter items are those of
ServerConfig.QBX.StarterItems(a phone by default), given through ox_inventory.
First test
- The console shows
[multicharacter] 1.0.0 · framework: esx(orqb,qbx) in green, with no red line. - On connection, the scene shows with your existing characters.
- Create a character: it spawns at the airport and the appearance editor opens.
- Type
/relog: you go back to the selection with the new character. - Play with “Last position”: you respawn where you were.
- Delete a test character: it disappears from the list.
If it does not work
- The player goes straight into the game:
Config.Multichar(ESX) oruseExternalCharacters(Qbox) is not enabled, or another selection is still running. - Black screen on connection: the resource starts before the framework.
- Old ESX characters missing:
ServerConfig.ESX.Prefixdoes not match your identifiers. - No appearance editor: the appearance system starts after the resource.
More cases in Troubleshooting.
Updating
Back up config/, locales/ and bridge/ if you changed them. Replace the folder, then carry your settings over into the new files. SQL tables are kept.