Skip to content

Installation ​

Requirements ​

  • A recent FiveM server artifact (cerulean, Lua 5.4)
  • Node 18+ to build the NUI once

Everything else is optional and auto-detected at start:

Kind Resources Used for
Database oxmysql Stats and leaderboards (np_minigames_stats). Without it they are kept in memory until the restart
Framework es_extended, qbx_core, qb-core Character names and identifiers for stats and the leaderboard. Without one: license identifiers, or np_character names
Inventory np_inventory, ox_inventory, qb-inventory (ps- / lj- forks), the framework's own opts.item: check, remove and wear items. Without one opts.item is ignored (a warning per item)
Staff np_admin Resource settings, permission nodes, the Send a minigame tool, logs, the server theme
Siblings np_phone, np_hud, np_menu, np_character Phone block and the Arcade app, toasts and HUD zones, closing menus and the radial item, names. See Integrations

Steps ​

  1. Put the folder into your resources as np_minigames. The NUI calls https://np_minigames/rpc, np_phone loads the Arcade app from it and other resources call exports.np_minigames, so keep the name.
  2. Build the UI once:
    sh
    cd web && npm ci && npm run build
    This creates web/dist/index.html (the game cards and the arcade) and web/dist/phone.html (the np_phone app). web/dist is not committed, so a fresh clone starts with a blank UI until you build it.
  3. Database: with oxmysql the table np_minigames_stats is created on the first start. sql/np_minigames.sql holds the same statement if you import schemas by hand.
  4. Start order in server.cfg: after the framework, oxmysql and np_admin, and before the resources that use it, so their minigames find it at start. Resources that register profiles register them again when np_minigames starts later or restarts.
    cfg
    ensure oxmysql
    ensure es_extended        # or qbx_core / qb-core
    ensure np_inventory       # or ox_inventory / qb-inventory
    ensure np_admin           # optional
    ensure np_hud             # optional siblings, any order
    ensure np_phone
    ensure np_menu
    ensure np_minigames
    ensure np_banking         # the resources that use it
    ensure np_prison
  5. Staff: nothing goes into server.cfg. See Permissions.
  6. Check shared/config/00_core.lua: at least the locale, the default difficulty and whether players may use Assist outside the arcade.

Permissions ​

np_minigames never uses ACE. Staff checks go through the np_admin lib that ships in bridge/np_admin.lua (np_admin stays optional). With np_admin the nodes show up under the category Minigames:

Node Grants
np_minigames.admin Everything below
np_minigames.send The Send a minigame staff tool: send any game at any difficulty to a player and see the result

Without np_admin the staff tool is not available; games, the arcade and the integrations work as usual.