Skip to content

Bridges & integrations ​

np_banking talks to the framework and the inventory through bridges (bridge/), and to every np_* sibling through one adapter each (integrations/). Bridges are chosen once, at load; Config.Framework / Config.Inventory force one. ESX and np_inventory are tried first and are the best supported. Every call into another resource is pcall'd, so a missing export degrades a feature instead of breaking it.

Framework ​

Bridge Resource Identifier Cash / bank / dirty Offline money Bank changes by other scripts
esx es_extended xPlayer.identifier money / bank / black_money users.accounts JSON esx:addAccountMoney / removeAccountMoney / setAccountMoney
qbx qbx_core citizenid PlayerData.money cash / bank players.money QBCore:Server:OnMoneyChange
qb qb-core citizenid PlayerData.money cash / bank players.money QBCore:Server:OnMoneyChange
standalone none license no cash, no framework bank – –

Auto-detection tries es_extended first, then qbx_core, then qb-core. On esx, qbx and qb the checking account mirrors the framework bank (see Accounts → Checking). Standalone keeps the checking balance in np_banking and has no cash; the client reports when the player is loaded.

Jobs come from the framework (name, label, grade, gradeName, isBoss, onduty). They decide job account roles, police on duty for robberies and alarms, player tellers and inside jobs.

Inventory ​

Bridge Resource Items Stashes (deposit boxes) Item metadata
np np_inventory Registered at runtime Yes, client opens vetoed by its beforeOpen hook Yes
ox ox_inventory Add them to data/items.lua Yes Yes
qb qb-inventory, ps-inventory, lj-inventory Add them to qb-core/shared/items.lua Yes Yes (info)
none none No items: cards work without them No –

See Installation → Items.

np_payments ​

np_banking is np_payments' banking provider: the checkout lists every account the player may use (checking, savings, shared, business and faction accounts) and their bank cards, charges through the ledger and checks PINs and member limits.

  • np_banking starts first (the usual order): np_payments' bridge bridge/banking/server/1_np_banking.lua loads when np_banking is started and Config.Banking is 'auto' or 'np_banking', and calls the provider contract exports.
  • np_payments was already running (np_banking restarted): np_banking registers itself with exports.np_payments:RegisterProvider('np_banking', provider) when it is ready.
np_payments calls np_banking export
accounts(src) ListAccounts(src). Account types map to np_payments kinds: checking / personal → personal, savings → savings, shared → shared, business / society → business, faction / government → faction
balance(id) GetAccount(id).balance
charge(src, id, amount, reason, meta) Charge(id, amount, meta + { reason, actor = src })
credit(id, amount, reason, meta) Credit(id, amount, meta + { reason })
society(job) GetSocietyAccount(job)
creditCid(cid, amount, reason) CreditCitizen(cid, amount, reason)
card(src, item) GetCardForItem(item.metadata, src) (with IsCardFrozen when frozen is missing)
checkPin(src, target, pin) CheckPin(src, target, pin)
block(src, target) BlockCard(target.card)
members(id) GetAccountMembers(id)

caps = { cards = true, pin = true }. limit = { used, max } on an account means np_banking manages the member's daily limit, and np_payments skips its own spend counting. Config.Accounts.pinForBankCharges = true makes np_payments ask for the PIN on bank charges too. np_payments' receipt item (receipt) is reused for ATM and counter receipts.

np_phone ​

What How
Bank app Registered as a store app (registerStoreApp) with one app RPC per screen action, again whenever np_phone (re)starts. See Bank app
Money bridge overrideBridge('framework', …) for getMoney, removeMoney, addMoney, addMoneyOffline: 'bank' goes through the ledger on the checking account (merchant np_phone), 'cash' passes through. Config.Phone.bridgeMoney = false switches it off. See Bank app → Phone money
Pushes, Live Activities, mails notify, setIsland / clearIsland, sendMail (statements, payment requests with a Pay button)
Contacts Phone numbers ↔ characters for transfers, requests and shared-account invites
Optional getSettings (np_phone streamer mode hides amounts), sendMessage (payment request bubble)

Without np_phone there is no Bank app, and notifications become toasts.

np_mdt ​

Bank and ATM alarms become MDT dispatch calls:

lua
exports.np_mdt:ReportCall({
  externalId = 'np_banking:<alarm id>', kind = 'alarm', priority = 1,
  title = '…', message = '…', caller = 'np_banking',
  location = { x = 149.9, y = -1040.6, street = '…' },
})
exports.np_mdt:ResolveCall('np_banking:<alarm id>', 'resolved')

Silent alarms are reported after their delay, loud ones at once, and resolved when the robbery ends. Without np_mdt, every on-duty player whose job is in Config.PoliceJobs gets a toast and a blip for Config.Robbery.alarmBlipSeconds. See MDT → Dispatch.

np_prophandler and np_npchandler ​

Both are required at 1.1.0+ (dependencies in the fxmanifest, start them before np_banking). They have no adapter and no fallback; np_banking creates no peds or props of its own.

Resource Used for
np_prophandler Configured ATMs with spawn = true and a model: the server registers them with registerProps as streamed props np_banking:atm_<index> (spawn distance 80 m), at start and again on np_prophandler:ready. The client finds them with getPropEntity and gives them their location's id
np_npchandler Branch tellers (Config.Branch.locations[].ped): client-only local NPCs through addLocalNpc / removeLocalNpc as np_banking:branch:<id>, invincible and frozen, with their scenario. Added again on the client np_npchandler:ready

The ripped-out ATM (Rip-out) is an np_prophandler networked prop with dynamic = true, np_banking:ripped_<id>: the server follows the entity (getPropCoords), so it stays where it was dragged, and it is registered there again on np_prophandler:ready when np_prophandler restarts.

Other siblings ​

Resource Used for Fallback
np_hud Toasts (Notify), prompts, progress bars np_banking's own toasts, prompts and progress in its NUI
np_identification hasValidDocument(src, 'id_card') at the counter and the vault; business.licence documents Everybody counts as carrying an ID
np_admin Permission nodes, live settings, staff actions, logs (vendored lib bridge/np_admin.lua) The lib's fallback: console, np_admin_fallback, ESX groups
np_minigames Every robbery minigame (hack, sync terminals, thermite, drill, ATM jackpot) as a server-validated np_minigames game. See Robberies → Minigames (np_minigames) The built-in robbery screens
np_discord HasRole for Config.AdminDiscordRoles, only while np_admin is not running Nobody is staff by Discord role

Start log and switching siblings off ​

At start np_banking prints one line per sibling: active, the fallback it uses, or a missing export. Siblings may start later or restart; np_banking re-registers items, the Bank app and the money bridge.

Switch a sibling off even when it runs:

lua
Config.Integrations = { np_phone = false }