Skip to content

Installation ​

Requirements ​

  • A recent FiveM server artifact (Lua 5.4)
  • oxmysql
  • np_prophandler (configured ATM props, the ripped-out ATM) and np_npchandler (branch tellers), both 1.1.0+. Both must start before np_banking
  • Node 18+ to build the NUI once

Optional, auto-detected at start (GetResourceState). Each one has a fallback, see Bridges & integrations:

Kind Resources Used for
Framework es_extended (first target), qbx_core, qb-core Character identifier and name, cash, the bank money the checking account mirrors, black_money, jobs, grades and duty. Without one it runs standalone: license identifiers, np_banking keeps its own balances, no cash
Inventory np_inventory (first target), ox_inventory, qb-inventory Bank cards, cheques, keys, gold and robbery tools as items, safe deposit boxes as stashes. Without one, cards work without items and there are no boxes
HUD np_hud Toasts, prompts and progress bars. Without it np_banking draws its own
Phone np_phone The Bank app, pushes, Live Activities, mails with a Pay button. Phone bank money goes through the ledger
Payments np_payments Checkout sheet for shops; np_banking is its banking provider
Documents np_identification ID checks at the counter and the vault. Without it everybody counts as carrying an ID
Dispatch np_mdt Bank and ATM alarms as MDT calls. Without it, police jobs get a toast and a blip
Staff np_admin, np_discord Permission nodes, live settings, staff actions and logs. See Permissions
Zones np_colshape Enter and exit of the interaction points as colshapes. Needed on FiveM Legacy only, GTAV Enhanced has the natives built in. Without it, distance checks as before

Steps ​

  1. Put the resource in resources/ as np_banking. The NUI callbacks use https://np_banking/… and other resources call exports.np_banking, so keep the name.
  2. Build the NUI once:
    sh
    cd np_banking/web && npm install && npm run build
    This creates web/dist/index.html (branch counter, robbery minigames, fallback toasts), web/dist/atm.html (the ATM screen) and web/dist/phone.html (the np_phone Bank app). web/dist is not committed, so a fresh clone starts with a blank UI until you build it.
  3. Add it to server.cfg after the framework, the inventory, np_prophandler and np_npchandler, and before np_payments:
    cfg
    ensure oxmysql
    ensure es_extended        # or qbx_core / qb-core
    ensure np_inventory       # or ox_inventory / qb-inventory
    ensure np_hud
    ensure np_prophandler
    ensure np_npchandler
    ensure np_banking
    ensure np_payments
    ensure np_phone
    np_payments picks np_banking as its banking provider when it starts. If np_payments was already running (for example after restarting np_banking), np_banking registers itself with exports.np_payments:RegisterProvider. np_phone can start in any order: the Bank app and the money bridge are registered again whenever np_phone (re)starts.
  4. Database: the 16 bank_* tables are created on the first start and migrated by version. sql/install.sql holds the same statements if you prefer to import them yourself. See Tables.
  5. Optional, a secret pepper for the card PIN hashes, in server.cfg:
    cfg
    set np_banking_pin_pepper "some-long-random-string"
    Use set, never setr, and never change it afterwards: every PIN set before stops matching.
  6. Items: with np_inventory there is nothing to do. With ox_inventory or qb-inventory add the item lines (see Items).
  7. Set up staff (see Permissions) and look through the configuration: police jobs, job accounts, the branch teller job and the robbery police minimums at least.

ESX with np_inventory

This is the combination np_banking is built for. The checking account mirrors the ESX bank account, cash is the ESX money account (np_inventory's money item), marked money is ESX black_money (np_inventory's black_money item), np_inventory gets every item at runtime and safe deposit boxes are np_inventory stashes.

The checking account is the framework bank ​

Every character gets a checking account on the first login (Config.Accounts.defaultBank, Maze Bank). On esx, qbx and qb its balance is the framework's bank money: reads come from the framework, writes go through the framework, and np_banking still writes a ledger row. So np_hud's money chip, xPlayer.getAccount('bank') and every other script stay correct, and you don't migrate any balances.

When another script changes the bank (paychecks, shops, admin menus), np_banking sees the framework's money-change event and writes an external row into the statement (Config.Ledger.recordExternal). Offline changes are synced at the next login as a sync row. Savings, shared, business and job accounts are np_banking's own. See Accounts & ledger.

ESX societies ​

Config.Accounts.esxSociety = 'migrate' copies every society_<job> balance of esx_addonaccount into np_banking's job accounts once, at start. Afterwards, point your ESX society scripts at np_banking's exports (GetSocietyAccount and AddTransaction). The default 'off' leaves esx_addonaccount alone.

Items ​

Item Label Usable What for
bank_card Bank card yes At an ATM: insert it. Anywhere else: shows the card's number, expiry and state
bank_receipt Bank receipt ATM and counter receipts. np_payments' receipt item is used instead when it exists (Config.Receipt)
bank_cheque Cashier's cheque yes Issued at the counter, cashed at any branch
deposit_box_key Deposit box key Opens a safe deposit box, with the holder's ID
gold_bar Gold bar Bullion desk at the Union Depository, heist loot
blank_card, cloned_card Blank card, Bank card cloned_card Skimmer loot: write a skimmed card to a blank card
atm_skimmer Card skimmer yes Fit it on an ATM
hacking_laptop, thermite, bank_drill Hacking laptop, Thermite, Heavy drill yes Heist stages, ATM jackpotting, blowing an ATM open
vault_keycard Vault keycard Pacific Standard: taken from the manager hostage
atm_cassette ATM cassette yes Opens to marked money
tow_rope, angle_grinder, c4 Tow rope, Angle grinder, C4 charge yes ATM rip-out and explosives

np_banking adds no money items. Cash is the framework's cash and marked money is ESX black_money (Config.MarkedMoney). Two items it uses but doesn't define: phone (tap the phone at an ATM, Config.Atm.phone.items) and lockpick (ATM jackpotting, Config.Robbery.atm.jackpot.lockpickItem).

np_inventory ​

Nothing to add. np_banking registers every item at start, and again whenever np_inventory restarts, with its label, description, weight, category, icon, tint and use.

ox_inventory (also qbx) ​

Add to ox_inventory/data/items.lua. Usable items call server.export = 'np_banking.<item>'. np_banking cancels ox's own use and removes items itself, so nothing is consumed by ox.

ox_inventory item list
lua
['bank_card'] = { label = 'Bank card', weight = 5, stack = false, close = true, description = 'A debit card. Keep the PIN to yourself.', server = { export = 'np_banking.bank_card' } },
['bank_receipt'] = { label = 'Bank receipt', weight = 2, stack = false, close = false, description = 'A printed bank receipt with a reference number.' },
['bank_cheque'] = { label = 'Cashier\'s cheque', weight = 2, stack = false, close = true, description = 'A cheque issued by a bank. Cash it at any branch.', server = { export = 'np_banking.bank_cheque' } },
['deposit_box_key'] = { label = 'Deposit box key', weight = 10, stack = false, close = true, description = 'Opens a safe deposit box. Only with the holder\'s ID.' },
['gold_bar'] = { label = 'Gold bar', weight = 1000, stack = true, close = true, description = 'One kilogram of gold.' },
['blank_card'] = { label = 'Blank card', weight = 5, stack = true, close = true, description = 'A card with an empty magnetic strip.' },
['cloned_card'] = { label = 'Bank card', weight = 5, stack = false, close = true, description = 'Looks like a debit card.', server = { export = 'np_banking.cloned_card' } },
['atm_skimmer'] = { label = 'Card skimmer', weight = 150, stack = true, close = true, description = 'Fits over an ATM card slot.', server = { export = 'np_banking.atm_skimmer' } },
['hacking_laptop'] = { label = 'Hacking laptop', weight = 2200, stack = false, close = true, description = 'A laptop with some unusual software.', server = { export = 'np_banking.hacking_laptop' } },
['thermite'] = { label = 'Thermite', weight = 800, stack = true, close = true, description = 'Burns through steel.', server = { export = 'np_banking.thermite' } },
['bank_drill'] = { label = 'Heavy drill', weight = 6000, stack = false, close = true, description = 'Drills through deposit box locks. Gets hot.', server = { export = 'np_banking.bank_drill' } },
['vault_keycard'] = { label = 'Vault keycard', weight = 5, stack = false, close = true, description = 'A bank manager\'s keycard.' },
['atm_cassette'] = { label = 'ATM cassette', weight = 3500, stack = false, close = true, description = 'A locked cash cassette from an ATM.', server = { export = 'np_banking.atm_cassette' } },
['tow_rope'] = { label = 'Tow rope', weight = 2500, stack = false, close = true, description = 'A heavy steel tow rope with hooks.', server = { export = 'np_banking.tow_rope' } },
['angle_grinder'] = { label = 'Angle grinder', weight = 2800, stack = false, close = true, description = 'Cuts through sheet steel. Loud.', server = { export = 'np_banking.angle_grinder' } },
['c4'] = { label = 'C4 charge', weight = 600, stack = true, close = true, description = 'Plastic explosive with a timer.', server = { export = 'np_banking.c4' } },

qb-inventory (and ps / lj forks) ​

Add to qb-core/shared/items.lua. The info of an item is its metadata. np_banking ships no item images: point image at any PNG in your inventory's image folder.

qb-core item list
lua
bank_card = { name = 'bank_card', label = 'Bank card', weight = 5, type = 'item', image = 'bank_card.png', unique = true, useable = true, shouldClose = true, description = 'A debit card. Keep the PIN to yourself.' },
bank_receipt = { name = 'bank_receipt', label = 'Bank receipt', weight = 2, type = 'item', image = 'bank_receipt.png', unique = true, useable = false, shouldClose = false, description = 'A printed bank receipt with a reference number.' },
bank_cheque = { name = 'bank_cheque', label = 'Cashier\'s cheque', weight = 2, type = 'item', image = 'bank_cheque.png', unique = true, useable = true, shouldClose = true, description = 'A cheque issued by a bank. Cash it at any branch.' },
deposit_box_key = { name = 'deposit_box_key', label = 'Deposit box key', weight = 10, type = 'item', image = 'deposit_box_key.png', unique = true, useable = false, shouldClose = true, description = 'Opens a safe deposit box. Only with the holder\'s ID.' },
gold_bar = { name = 'gold_bar', label = 'Gold bar', weight = 1000, type = 'item', image = 'gold_bar.png', unique = false, useable = false, shouldClose = true, description = 'One kilogram of gold.' },
blank_card = { name = 'blank_card', label = 'Blank card', weight = 5, type = 'item', image = 'blank_card.png', unique = false, useable = false, shouldClose = true, description = 'A card with an empty magnetic strip.' },
cloned_card = { name = 'cloned_card', label = 'Bank card', weight = 5, type = 'item', image = 'cloned_card.png', unique = true, useable = true, shouldClose = true, description = 'Looks like a debit card.' },
atm_skimmer = { name = 'atm_skimmer', label = 'Card skimmer', weight = 150, type = 'item', image = 'atm_skimmer.png', unique = false, useable = true, shouldClose = true, description = 'Fits over an ATM card slot.' },
hacking_laptop = { name = 'hacking_laptop', label = 'Hacking laptop', weight = 2200, type = 'item', image = 'hacking_laptop.png', unique = true, useable = true, shouldClose = true, description = 'A laptop with some unusual software.' },
thermite = { name = 'thermite', label = 'Thermite', weight = 800, type = 'item', image = 'thermite.png', unique = false, useable = true, shouldClose = true, description = 'Burns through steel.' },
bank_drill = { name = 'bank_drill', label = 'Heavy drill', weight = 6000, type = 'item', image = 'bank_drill.png', unique = true, useable = true, shouldClose = true, description = 'Drills through deposit box locks. Gets hot.' },
vault_keycard = { name = 'vault_keycard', label = 'Vault keycard', weight = 5, type = 'item', image = 'vault_keycard.png', unique = true, useable = false, shouldClose = true, description = 'A bank manager\'s keycard.' },
atm_cassette = { name = 'atm_cassette', label = 'ATM cassette', weight = 3500, type = 'item', image = 'atm_cassette.png', unique = true, useable = true, shouldClose = true, description = 'A locked cash cassette from an ATM.' },
tow_rope = { name = 'tow_rope', label = 'Tow rope', weight = 2500, type = 'item', image = 'tow_rope.png', unique = true, useable = true, shouldClose = true, description = 'A heavy steel tow rope with hooks.' },
angle_grinder = { name = 'angle_grinder', label = 'Angle grinder', weight = 2800, type = 'item', image = 'angle_grinder.png', unique = true, useable = true, shouldClose = true, description = 'Cuts through sheet steel. Loud.' },
c4 = { name = 'c4', label = 'C4 charge', weight = 600, type = 'item', image = 'c4.png', unique = false, useable = true, shouldClose = true, description = 'Plastic explosive with a timer.' },

Permissions ​

np_banking uses no ACE: no add_ace lines, no principals. Every staff check is an np_admin permission node, granted to an np_admin group or a single player in np_admin → Permissions (wildcards like np_banking.* work, an explicit deny wins).

Node Grants
np_banking.admin Every staff tool of np_banking
np_banking.money Give / take bank money on any account
np_banking.freeze Freeze and unfreeze accounts and cards
np_banking.audit Statements and the audit log of any account (the view itself is logged)
np_banking.atm Restock, repair, break and empty ATMs
np_banking.branch Open any safe deposit box, see every queue and loan at the branches
np_banking.robbery Every robbery staff tool
np_banking.robbery.reset Reset robbery cooldowns
np_banking.robbery.end End a running robbery

Without np_admin running, only these count as staff:

  1. the server console;
  2. the identifiers in the convar np_admin_fallback (set np_admin_fallback "license:abc…,discord:123…");
  3. on es_extended, the ESX groups in np_admin_fallback_groups (default admin,superadmin);
  4. players holding one of the Discord roles in Config.AdminDiscordRoles (needs np_discord).

See Staff tools and Concepts → Permissions.

Tables ​

Table Holds
bank_meta Schema version and one-time flags
bank_accounts Accounts: bank, type, label, owner, job, cached balance, frozen, closed, meta
bank_members Members of shared and job accounts: role owner / spend / view, daily limit
bank_transactions The ledger: reference TX-…, signed amount, balance after, type, reason, actor, merchant, card, counterparty
bank_pending Transfers between banks waiting for release
bank_cards Cards: account, holder, tier, masked number, salted PIN hash and tries, frozen, blocked, expiry, limits
bank_credit Credit score and history per character
bank_standing_orders Standing orders and payroll
bank_loans Loans
bank_deposits Savings depots and large-cash notices
bank_boxes Safe deposit boxes
bank_cheques Cashier's cheques
bank_atms ATMs: cash stock, state, skimmer
bank_cooldowns Persistent robbery cooldowns
bank_robberies Log of every heist and ATM job
bank_audit Audit log (staff actions, freezes, warrants)

Check it works ​

  1. Start the server and read the console: np_banking prints one line per sibling (active, or the fallback it uses) and reports when it is ready.
  2. Join, walk to any ATM and press E. The camera moves to the screen. Insert your phone (needs a phone item) or a card, then withdraw $50.
  3. With np_phone, open the Bank app (/bank). Your checking account shows the same balance as your framework bank.
  4. At Fleeca Legion Square, press E at the counter to take a ticket and order a card.

Troubleshooting ​

Problem Fix
Blank ATM screen or counter Build the NUI (web/dist missing)
The ATM screen sits next to the prop's display Tune the screen corners per model with /atmdebug. See ATMs → Tuning
np_payments only shows Cash and Bank Start np_banking before np_payments, or restart np_payments; check Config.Banking in np_payments is 'auto' or 'np_banking'
No Bank app on the phone np_phone not running, or Config.Integrations.np_phone = false
Items missing on ox / qb Add the item lines. Only np_inventory gets them at runtime
Every PIN is wrong after a restart np_banking_pin_pepper changed. Set it back
Exports return nil / false / {} np_banking is not ready yet. Wait for np_banking:server:ready