For server-wide prerequisites (artifacts, oxmysql, ox_lib), work
through the generic install guide
first. This page only lists what is specific to nx_realbanking.
Dependencies#
Framework detection is automatic: ESX Legacy (1.9.0+) or QBCore.
Make sure the framework resource starts before nx_realbanking.
- oxmysqlRequired
Database driver for all persistent state.
- ox_libRequired
Callbacks, notifications, and UI utilities.
- nx-3dRequired
Renders the ATM UI onto 3D in-world panels (screen and keypad).
- ox_inventoryOptional
Physical bank cards, ATM receipts, and credit-card items.
- ox_targetOptional
Target-based ATM and bank-ped interaction. qb-target is also supported via Config.TargetSystem.
Database import#
Import the schema into the same database oxmysql points at:
mysql -u <user> -p <database> < sql/install.sqlThe schema creates:
nx_realbanking_accounts. Account records.nx_realbanking_transactions. Transaction history.nx_realbanking_daily_limits. Daily limit counters.nx_realbanking_interaction_logs. Security and audit trail.- Invoice tables. Invoices, items, autopay, credit cards, billing.
nx_realbanking_society_log. History of company accounts.nx_realbanking_society_numbers. The account number of each company.
The two society tables are also created by the resource itself when it starts, so an existing install needs no manual SQL for them.
Fines need the invoices table to hold the fine type and an
external_ref column. nx_realbanking adds both on start. If its database
user has no ALTER rights, fines stay off until you run the two
ALTER TABLE lines at the end of the invoices section in
sql/install.sql.
[!tip]
sql/install.sqlis idempotent. It usesCREATE TABLE IF NOT EXISTSandINSERT IGNORE, so re-running it on an existing install is safe and leaves your data untouched. Tested on MySQL 5.7+ and MariaDB 10.2+.
server.cfg order#
ensure oxmysqlensure ox_libensure nx-3d# ensure your framework here (es_extended or qb-core)ensure nx_realbankingOptional items#
If ox_inventory is present, register the card and receipt items in
ox_inventory/data/items.lua:
['bank_card'] = { label = 'Maze Bank Card', weight = 10, stack = false, close = true, description = 'Official Maze Bank debit card'},['atm_receipt'] = { label = 'ATM Receipt', weight = 0, stack = true, close = false, decay = 1440},['credit_card'] = { label = 'Credit Card', weight = 10, stack = false, close = true}The credit-card item name is configurable, see
Config.Credit.items.creditCardItem.
Convars#
Set these in server.cfg to override runtime behavior without editing
the config file:
set nx_realbanking:debug "true"set nx_realbanking:locale "en"set nx_realbanking:framework "auto" # auto | esx | qbcoreUpdating#
Replace the resource folder and restart. New tables and columns are added on start, so no manual SQL is needed. Two kinds of file you may have edited need a look. The lists below are what to check when updating to 1.11.0.
Edited bridge files#
The files in bridge/ are yours to edit (see
Customisation hooks). If you keep
your own copy, compare it with the new one after an update:
bridge/client.lua: copy themyInvoicesoption from the newCustom.AddBankTarget. Without it the banker's My Open Invoices option does not appear.bridge/server.lua: addCustom.CanInvoiceCompanyfrom the new file if you want to limit who may invoice which company. Without it every company can be billed, as before.
Edited locale files#
If you edited the locale files, add these keys to each language you use.
In shared/locales/<lang>.lua:
| Key | English text |
|---|---|
action_my_invoices | My Open Invoices |
notify_no_open_invoices | No open invoices |
notify_my_open_invoices | You have %s open invoices totaling $%s (the count, then the total) |
error_no_one_nearby | No one is close enough to check |
The English text of action_inspect is now Check a Person's Unpaid Invoices.
In nui/js/locales/<lang>.js:
| Key | English text |
|---|---|
bank.pin.errRateLimited | Too many PIN attempts. Try again in {minutes} min. |
bank.pin.errAccountNotFound | We couldn't find that account. |
bank.pin.errAccessDenied | Only the account owner can change this PIN. |
bank.pin.errPaymentFailed | The fee couldn't be charged, so your PIN was not changed. |
bank.pin.errNoResponse | The bank did not answer. Try again. |
bank.pin.errAlreadyExists | This account already has a PIN. |
