Installation ​
Requirements ​
- A recent FiveM server artifact (Lua 5.4)
- oxmysql
- np_npchandler, started before np_character. It builds the local preview peds of the select screen
- Node 18+ to build the NUI once
Optional, auto-detected at start:
| Kind | Resources | Used for |
|---|---|---|
| Framework | qbx_core, qb-core, es_extended | Character rows, login / logout, money, jobs, duty, downed state, skins. Without one, np_character is the character system itself (standalone) |
| Inventory | ox_inventory, else the framework inventory (np_inventory works through its ox / qb compatibility) |
Starter pack and the ID card item with metadata |
| Staff | np_admin | Permission nodes, live settings, log forwarding and staff actions |
Steps ​
-
Put the resource in
resources/asnp_character. The NUI callbacks usehttps://np_character/…, so keep the name. -
Build the NUI:
shcd web && npm ci && npm run buildThis creates
web/dist, whichfxmanifest.lualoads as theui_page.web/distis not committed. -
Database: with
Config.AutoCreateTables = true(the default) the tables are created at start. Otherwise importsql/np_character.sqlyourself. See Bridges → Tables for what each table holds. -
Switch off the framework's own character system:
Framework What to change qbx_core Set characters.useExternalCharacters = trueinqbx_core/config/client.luaqb-core Don't start qb-multicharacterorqb-spawnes_extended Set Config.Multichar = truein es_extended, and don't startesx_multicharacterstandalone Nothing to do. np_character uses its own np_characterstable -
Start it after oxmysql, np_npchandler, the framework and ox_inventory, because the bridge is picked once at start:
cfgensure oxmysql ensure np_npchandler ensure qbx_core # or qb-core / es_extended (optional) ensure ox_inventory # optional ensure np_admin # optional: permissions, settings, logs, staff tools ensure np_character -
Give your staff the
np_character.adminnode in np_admin. It unlocks/charadminand every staff action. There are noadd_acelines; see Permissions. -
Optional: a Discord webhook for the logs (created, deleted, purged, loaded, store, rename requests and every staff action). Use
set, notsetr, so clients never see it:cfgset np_character_webhook "https://discord.com/api/webhooks/…"The convar wins over
Config.Logs.webhook. Onlyhttps://URLs are used. While np_admin runs, the same logs also go to its audit log (categorynp_character).
Test it
Join the server: the select screen opens after the loading screen hand-off. With np_loadingscreen installed, its outro runs once character select is ready. Create a character, pick a spawn, then
type /logout to come back to select. As an admin, /charadmin <server id> opens the staff panel.
Permissions ​
np_character uses no ACE. Every check is a permission node, managed in np_admin: grant it to an np_admin group or a single player.
| Node | Grants |
|---|---|
np_character.admin |
/charadmin, the staff panel and its RPCs, and the np_admin staff actions Character admin and Set character slots |
np_character.peds |
The creator's Ped tab: non-freemode models from Config.PedModels.list |
np_character.slots.4, np_character.slots.5 |
Unlock 4 or 5 slots (Config.Slots.permissions, node → slots; add your own keys) |
np_character.group.<job> |
Standalone only: counts as a member of <job> for job spawns |
Without np_admin running, only these pass a check:
- the server console;
- identifiers in the convar
np_admin_fallback(set np_admin_fallback "license:abc…,discord:123…"); - on es_extended, the ESX groups in
np_admin_fallback_groups(defaultadmin,superadmin).
Existing servers ​
Characters that already exist in players (qb / qbx) or users (ESX) get an np_character_meta row the first time
their owner opens the select screen. The identity comes from the framework row, the appearance from playerskins /
users.skin when it is in the illenium-appearance format. See Bridges → Import.
Troubleshooting ​
| Symptom | Fix |
|---|---|
| Black screen or no select screen | web/dist is missing. Build the NUI |
| The framework's own character menu opens too | Step 4: switch off the stock multicharacter (and qb-spawn on qb) |
| Characters, money or jobs are empty | The framework started after np_character. Fix the start order, or set Config.Framework |
framework bridge "…" selected but resource "…" is … in the console |
Config.Framework names a framework that is not started |
/charadmin says "no permission" |
Grant the np_character.admin node in np_admin. Without np_admin, add your identifier to np_admin_fallback (or, on ESX, use a group from np_admin_fallback_groups) |
| No starter items | Neither ox_inventory nor a framework inventory took the items. Check the item names in Config.Starter.items |
| Accented names are rejected | Config.Names.pattern uses %a, which is ASCII only. Add the letters you need to the pattern |