Skip to content

Bridges & integrations ​

np_darts talks to the framework and the inventory through bridges in bridge/, and to every np_* sibling directly with a wrapped export call. Each sibling is checked with GetResourceState when it is used (and its Config.UseNp* switch), so a missing resource degrades a feature instead of breaking a handler. Hard dependencies are oxmysql and the two handlers.

Framework ​

Bridge Resource Character id Pub owners by job Staff fallback
esx es_extended xPlayer.identifier job.name, job.grade, boss = grade name boss xPlayer.getGroup() in Config.Admin.groups
qbx qbx_core citizenid job name, grade, isboss none (identifiers, np_discord roles)
qb qb-core citizenid job name, grade, isboss none (identifiers, np_discord roles)
standalone none the active np_character character, else the license none (owners by identifiers) none

Auto-detection order (Config.Framework = 'auto'): es_extended → qbx_core → qb-core → standalone. es_extended is the first target. The bridge provides the character id and name, the job, cash and bank (getMoney, addMoney, removeMoney, used when np_payments isn't running and for payouts) and the character load / unload / job events. Standalone keeps an in-memory wallet per character seeded from Config.StandaloneMoney ({ cash = 500, bank = 5000 }); use a framework or np_payments with a banking resource for a real economy.

Inventory ​

Bridge Resource Metadata Notes
np_inventory np_inventory yes Items registered at runtime, builds and wear in the item, tooltips, the coffee / water hook, the busy lock
ox ox_inventory yes Add the items
qb qb-inventory (and the forks ps-inventory, lj-inventory) yes (info) Add the items
esx the default ESX inventory no One item per set, builds and wear in the profile (items)
none none – House darts, sets kept in the profile

Auto-detection order (Config.Inventory = 'auto'): np_inventory → ox_inventory → qb-inventory → ESX → none.

Required handlers ​

Both are hard dependencies (np_prophandler 1.1.0+). There is no fallback: np_darts spawns no objects or peds of its own.

Handler Used for Exports
np_prophandler Cabinets of spawned boards (config spawn = true and boards placed in game) as streamed props np_darts:<board>, registered by the server in the board's routing bucket, removed with the board and registered again on np_prophandler:ready. The darts on the board, the dart in flight and the placement ghost as immediate local props. The dart in your hand as a synced attachment (key dart), so spectators see it registerProps, removeProps (server); createLocal, getLocalEntity, deleteLocal, attach, getAttachedEntity, detach (client)
np_npchandler The house regular as an immediate local ped, not frozen so it walks to the oche createLocalPed, deleteLocalPed (client)

np_* siblings ​

Sibling Used for Exports Without it
np_admin Permission nodes (npAdmin.can), Resource settings, staff tools, audit log (npAdmin.log), the server theme (npAdmin.onTheme) the vendored lib bridge/np_admin.lua The staff fallback; no theme (plain Nimbus)
np_inventory Dart sets and flights, set builds and wear, tooltips, free pints, coffee / water steady the hand, no inventory while playing RegisterItem, displayMetadata, registerHook (afterUse), setBusy (client), the inventory functions of the bridge The other inventory bridges
np_payments Every charge as a checkout sheet (stakes, rental, shop, parts, sisal, boards, league and cup entries), refunds, the busy check, drinks revenue Request, Refund, IsBusy, the np_payments:paid event The framework account (Config.Payments)
np_hud Toasts, prompts, zone claims while throwing and in the menus, server-wide announcements Notify, ShowPrompt, HidePrompt, ClaimZones, Announce np_darts draws its own Nimbus toasts; prompts as GTA help text
np_phone The Oche app, the live score island, notifications registerStoreApp, registerAppRpc, sendAppMessage, notify, notifyAll, isAppInstalled, setIsland, clearIsland No app; toasts only
np_menu Third-eye options on the cabinets: play, chalk your name, watch, dart case, stats addContextOption The E / Q / G prompts
np_drugs Blood alcohol for the sway model GetBodyState The other intoxication sources
np_character Character ids and names on standalone servers, character load / unload np_character:loaded, np_character:unloaded The license as character id
np_minigames Guards your turn: games other resources start for you are refused (or let through with the clock held), and the input pauses while any game is open. See below RegisterHook; client IsActive Nothing to guard
np_discord Logs for matches, payouts, refunds, staff actions, board placements; staff by Discord role without np_admin Log, HasAnyRole Console and np_admin audit log only

Each Config.UseNp* switch (UseNpHud, UseNpMenu, UseNpInventory, UseNpDiscord, Phone.enabled) is 'auto', true or false.

Other resources ​

Resource Used for
esx_status (esx_optionalneeds) The drunk status for the sway model (Config.Intox.esxStatus)
Your bar scripts Report drinks sales during darts with AddPubRevenue
Player state bags drunk, alcohol, intoxication, bac on Player(src).state as intoxication sources

Theme ​

The UI follows np_admin's server theme (brand colour, strength, material). Config.Material ('frosted' or 'liquid') and Config.Theme override it for np_darts alone.

np_minigames ​

np_minigames took the steady-aim mechanic as its sway game. np_darts keeps its own throw (aim, breath, release, server-side sway and grouping); the two only make sure they don't fight over the screen:

  • Your turn is guarded. np_darts registers a beforeStart hook with np_minigames (again whenever np_minigames restarts). While it is your dart, a game another resource starts for you (a heist door, a staff Send a minigame, the np_minigames arcade) is refused with result.reason = 'busy', and you get one toast. Games np_darts starts itself and those from allowFrom always pass.
  • Or it is let through. With whilePlaying = 'allow' (or for an allowFrom resource) the game opens and the server holds the dart timer (a fresh Match.dartTimeout after it) until np_minigames reports the result (holdClock).
  • Any game open on screen pauses your input (pauseAim): it freezes the aim; the dart then restarts with a new server token. This also covers local client games the hook never sees.
lua
Config.UseNpMinigames = 'auto'   -- false: no hook, no pause
Config.Minigames = {
  whilePlaying = 'refuse',       -- 'refuse' | 'allow'
  scope = 'turn',                -- 'turn' (your dart is up) or 'match' (any time you are in a match, also while you wait)
  allowFrom = {},                -- resources whose games always get through, e.g. { 'np_banking' } ('np_minigames' = staff sends + arcade)
  reason = 'busy',               -- refusal reason the caller gets back
  notify = true,                 -- toast the player when a game was turned down (once per 10 s)
  holdClock = true,
  pauseAim = true,
}

Without np_minigames nothing changes.