Multicharacter
Commands and Permissions
Player and admin commands, framework group permissions, and ACE setup.
On this page3 sections
Player commands
| Command | Description |
|---|---|
/relog | Saves the character and returns to character select. Name and cooldown are in Config.Relog. |
Admin commands
Commands work in game chat with / and in the server console without /. The console always has full access.
| Command | ACE permission | Description |
|---|---|---|
getcharacters <license> | sc_multicharacter.admin | Prints all characters of a license to the server console as JSON. |
forcedeletechar <citizenid> | sc_multicharacter.admin | Deletes a character right away, without confirmation or cooldowns. |
lockchar <citizenid> <reason> | sc_multicharacter.admin | Locks a character. The player sees it with a badge and reason but cannot play it. |
unlockchar <citizenid> | sc_multicharacter.admin | Removes the lock. |
setslots <player id or identifier> <count> | sc_multicharacter.setslots | Sets a fixed slot count. 0 removes the override. |
scfixdb | sc_multicharacter.admin | Checks and repairs the database schema on demand. |
scspawnshots [force] | sc_multicharacter.admin | Takes photos of all spawn locations. force retakes them. In game only. |
scintro | sc_multicharacter.admin | Plays the airplane intro. In game only. |
setslots
setslots 12 4setslots license:1234567890abcdef1234567890abcdef12345678 4setslots 12 0- The first argument is an online player id or the identifier of an offline player.
- The count is capped at
Config.MaxSlots. - The value replaces
DefaultSlots,SlotOverrides, and Discord role slots. 0removes the override.- Saved in the
sc_slotstable.
lockchar
lockchar AB12CD34 In custody until further noticeunlockchar AB12CD34The lock is checked on the server during selection, so a modified client cannot load a locked character. Saved in sc_character_locks on every framework.
getcharacters
getcharacters license:1234567890abcdef1234567890abcdef12345678The list goes to the server console. From in game, chat only shows the number of characters found.
Permissions
A player may use an admin command when either check passes.
Framework groups
Assign commands to framework groups in config/core.lua:
Config.AdminGroups = { superadmin = '*', admin = '*', god = '*', mod = { 'getcharacters', 'lockchar', 'unlockchar' }, support = { 'getcharacters' },}'*'allows every command.- A list allows only the listed commands.
- Names:
getcharacters,forcedeletechar,lockchar,unlockchar,setslots,scfixdb,scspawnshots,scintro.
| Framework | What is checked |
|---|---|
| ESX | Player group (xPlayer.group) |
| QBCore | QBCore.Functions.HasPermission |
| Qbox | exports.qbx_core:HasPermission |
| ox_core | ox_core group |
You do not need to add admins twice. A framework group is enough.
ACE
Classic FiveM permissions work on every framework and in the console:
add_ace group.admin sc_multicharacter.admin allowadd_ace group.admin sc_multicharacter.setslots allowsc_multicharacter.setslots is separate, so you can give it to a role without the other commands.
Add a player to a group:
add_principal identifier.license:1234567890abcdef1234567890abcdef12345678 group.adminCommand access
Server commands are registered as restricted. FiveM also needs command.<name> access. Most servers already have:
add_ace group.admin command allowIf not, add the commands one by one:
add_ace group.mod command.getcharacters allowadd_ace group.mod command.lockchar allowadd_ace group.mod command.unlockchar allow