Installation ​
Requirements ​
- A recent FiveM server artifact (Lua 5.4)
- Node 18+ to build the NUI once
Nothing else is required: no database, no ox_lib, no streamed assets. Optional, auto-detected at start:
| Kind | Resources | Used for |
|---|---|---|
| Framework | qbx_core, qb-core, es_extended | Jobs and groups on rows and server actions, money for the shops and "Give money", character name, death state |
| Vehicle keys | np_vehiclekeys, qbx_vehiclekeys, qb-vehiclekeys |
Server-validated lock action and key checks for the built-in lock / unlock (Config.Interact.lockMode = 'auto') |
| Inventory | ox_inventory or the framework inventory |
Repair kits for the context menu "Repair" option (Config.Context.repair.item) |
| Staff | np_admin | Permission nodes for perm, live settings, the admin menu (quick menu "Admin" tile, /devmenu) |
Steps ​
- Put the resource in
resources/asnp_menu. The NUI callbacks usehttps://np_menu/…, so keep the name. - Build the NUI:shThis creates
cd web && npm ci && npm run buildweb/dist, whichfxmanifest.lualoads as theui_page. - Start it after the framework, because the bridge is picked once at start:cfg
ensure qbx_core # or qb-core / es_extended (optional) ensure np_admin # optional: permissions, settings and the admin menu ensure np_menu ensure my_resource # resources that register menus come after np_menu
Test it
Press F1 for the quick menu, hold Left Alt for the radial wheel and hold G while looking at a vehicle for
the context menu. /menusettings opens the player settings. The admin menu (formerly F10) is part of np_admin now
(F9 / /am, or the quick menu's "Admin" tile), see Built-in menus → Admin menu.
Permissions ​
np_menu uses no FiveM ACE. Rows, radial and context options and server actions are gated with perm = 'node' (see
Server actions → Permissions); the nodes are managed in
np_admin per group or player. np_menu registers one node of its own:
| Node | Grants |
|---|---|
np_menu.group.* |
Standalone only: np_menu.group.<name> makes groups = { '<name>' } checks pass (e.g. np_menu.group.police) |
Without np_admin running, the server allows only:
- the server console;
- identifiers in the convar
np_admin_fallback; - on es_extended, the ESX groups in
np_admin_fallback_groups(defaultadmin,superadmin).
set np_admin_fallback "license:abc123,discord:123456789"
set np_admin_fallback_groups "admin,superadmin"
Clients only show perm rows while np_admin runs and grants the node. See
Concepts → Permissions.
Optional next steps ​
- Switch off built-in menus you don't want: Built-in menus.
- Set a brand colour: Theming & settings.
- Already using ox_lib menus? Turn on
Config.OxCompat: ox_lib compatibility. - Standalone servers: groups map to np_admin nodes.
groups = 'police'checksnp_menu.group.police; grant it in np_admin (see Permissions).
Using np_menu from another resource ​
Call the exports directly:
exports.np_menu:register({ id = 'my_menu', title = 'My menu', items = { ... } })
exports.np_menu:open('my_menu')
Or load the OOP wrapper in your fxmanifest.lua:
shared_script '@np_menu/import.lua'
See Creating menus. Menus, radial items and context options that a resource registered are removed automatically when that resource stops.
Troubleshooting ​
| Symptom | Fix |
|---|---|
| Nothing shows up | web/dist is missing. Build the NUI. |
| F10 does nothing | The admin menu moved to np_admin. Start np_admin and use F9 / /am (or /devmenu). |
| No "Admin" tile in the quick menu | The tile shows only while np_admin is started and you are np_admin staff. |
A perm row never shows up / action says "no permission" |
Grant the node to your group or player in np_admin. Without np_admin, perm rows stay hidden on the client and only the fallback passes on the server. |
| Shop purchases fail with "no framework" | Standalone has no money. The built-in shops need qbx, qb or ESX. |
| Jobs / groups never match | The framework started after np_menu. Fix the start order, or set Config.Framework explicitly. |
| Keys don't work | Players can rebind them in Settings → Key Bindings → FiveM. The config only sets the defaults. |
| Preview image doesn't load | The image host is not in Config.ImageHosts. |