Installation ​
Requirements ​
- A recent FiveM server artifact (Lua 5.4)
- oxmysql, the only hard dependency. Tables are created with
CREATE TABLE IF NOT EXISTSon start; a copy of the schema is insql/np_admin.sql. - Node 18+ to build the NUI once
Optional, detected at runtime (start them before np_admin):
| Kind | Resources | Used for |
|---|---|---|
| Framework | es_extended, qbx_core, qb-core | Jobs, money and revive. Config.Framework = 'auto' picks es_extended, then qbx_core, then qb-core, then standalone |
| Inventory | np_inventory, ox_inventory | Give item, open and clear inventories |
| Menu | np_menu | The quick menu (F9). Without it, F9 opens the panel |
| Discord | np_discord | Role sync, ban sync and log routing |
| HUD | np_hud | Notifications and announcements |
| Screenshots | screenshot-basic | Player screenshots |
Steps ​
- Put the resource in
resources/asnp_admin. Other resources callexports.np_adminand the NUI useshttps://np_admin/…, so keep the name. - Build the NUI.
web/distis not committed:shcd np_admin/web && npm ci && npm run build - Add the owners and the resource to
server.cfg:cfgUseset np_admin_owners "license:0123…,discord:1759…" # always superadmin (server-only, never sent to clients) ensure oxmysql ensure np_discord # optional ensure np_menu # optional, quick menu ensure np_adminset, notsetr, so the owner list stays on the server. Owners can't be removed from the panel. - Join the server and press F10 to open the panel. Go on duty with the duty pill (or
/duty). - Grant groups in Permissions, or from the server console:
npadmin grant <id|identifier> admin
Load order doesn't matter for resources that integrate with np_admin. Their vendored lib registers permissions,
settings and actions again whenever np_admin (re)starts, through the np_admin:ready event.
No ACE lines
np_admin and the np_* resources that integrate with it need no add_ace or add_principal lines. You can remove the
old np_*.admin ace lines from server.cfg. See Permissions.
Enable and verify tracing ​
Review Resource settings → np_admin → Tracing and grant np_admin.trace.view; grant
np_admin.trace.clawback separately for recovery. Update reporting resources and validate transfers on a test server.
The trace core is still receiving final correctness fixes. See setup, defaults and coverage /
Einrichtung (Deutsch).
Default groups ​
These groups are seeded on the first start only. After that, edit them in the panel (Config.Groups is not read
again).
| Group | Priority | Inherits | Nodes | Limits |
|---|---|---|---|---|
superadmin |
100 | * |
||
admin |
80 | mod |
np_admin.*, players money and job; denies perms.manage, settings.secrets, discord.manage |
permanent bans, 20 spawns / min |
mod |
60 | support |
players.* except money and job, bans.*, logs.view, self.*, vehicle.*, world.announce, perms.view |
bans up to 7 days, 6 spawns / min |
developer |
50 | panel, duty, dev.tools, self.*, vehicle.*, world.env, server.*, settings.view, settings.edit, logs.view |
||
support |
40 | panel, duty, view / notes / teleport / spectate / freeze / heal / kick / warn players, reports.*, bans.view, self.noclip, self.ids |
bans up to 1 day, 3 spawns / min | |
vip |
10 | none | ||
user |
0 | none (Config.DefaultGroup, every player) |
Node names in the table are short for np_admin.<node>.
Convars ​
| Convar | |
|---|---|
np_admin_owners |
Owner identifiers, comma-separated (any type: license:, discord: …). Always superadmin |
np_admin_webhook_<category> |
Discord webhook per log category, used when np_discord isn't running. See Audit log |
np_admin_screenshot_url / np_admin_screenshot_token |
Upload target for player screenshots (see below) |
np_admin_fallback / np_admin_fallback_groups |
Not read by np_admin. Read by other resources' vendored lib when np_admin isn't running. See Permissions & np_admin |
Screenshot upload ​
With screenshot-basic started, Screenshot takes a JPG of the player's screen. When np_admin_screenshot_url is set,
np_admin POSTs { image = <data uri>, player, by } as JSON to it, with np_admin_screenshot_token as the
Authorization header, and stores the url (or data.url) of the response in the log. Without a URL the image is only
shown in the panel.
Troubleshooting ​
| Symptom | Fix |
|---|---|
| F10 does nothing | You aren't staff: grant a group with npadmin grant <id> <group> or add yourself to np_admin_owners. Also check the key in Settings → Key Bindings → FiveM |
| Panel is blank | web/dist is missing. Build the NUI (step 2) |
| Tools say "off duty" | Go on duty (duty pill, /duty), or turn the duty system off (Config.Duty.enabled = false or Resource settings → np_admin → Duty) |
| "database not ready yet" in the console | oxmysql isn't started or can't connect. Start it before np_admin |
| A resource's nodes or settings are missing | The resource doesn't vendor the lib, or is stopped. Settings of stopped resources only appear when they declare a schema file (see Integrating a resource) |