NX Creative

Configuration

Every entry in shared/config.lua. Defaults, types, and purpose.

On this page

All settings live in shared/config.lua. The file is in escrow_ignore so it remains editable after install. Locale strings live in two places, both editable: shared/locales/<lang>.lua covers notifications and target labels, nui/js/locales/<lang>.js covers the ATM screen and the bank app. Webhook URLs and the PIN secret live in server-config.lua, which is never sent to players; its logging settings are documented at the end of this page.

Behaviour you may want to change in code, such as notifications, blips, bankers, target options, who counts as an admin or who may spend a company's money, lives in the open files in bridge/. See Customisation hooks at the end of this page.

Internal calibration (the 3D ATM panels and their IK geometry, animation dictionaries, camera offsets, cache TTLs, sound effect mapping) is set inside the encrypted resource and is not part of this file.

General#

Config.Localestring'en'

Active locale, applied to both the ATM and the bank app. Shipped values: 'en', 'fi', 'de', 'fr', 'pt-br', 'es', 'tr', 'nl', 'it', 'pl'.

Config.UseTargetbooleantrue

Use a targeting system (ox_target / qb-target) for ATM and bank-ped interactions. If false, falls back to proximity prompts.

Config.TargetSystemstring'ox_target'

Target resource name. One of 'ox_target', 'qb-target', 'qtarget'.

Session#

Config.Session.timeoutSecondsnumber120

Inactivity timeout before the ATM session is killed.

Config.Session.pinAttemptsnumber3

Allowed wrong-PIN attempts before lockout.

Config.Session.lockoutDurationnumber300

Lockout duration in seconds after exceeding pinAttempts.

3D ATM panels#

Accounts#

Config.Accounts.autoCreateDefaultbooleantrue

When a player without a default account uses an ATM, create one automatically.

Config.Accounts.autoCreateAccountTypestring'personal'

Type assigned to the auto-created default account.

Config.Accounts.autoCreateAccountNamestring'Personal Account'

Display name assigned to the auto-created default account.

Config.Accounts.autoCreateLinkBankBalancebooleantrue

If true, mirror the framework's bank balance onto the linked personal account on login.

Config.Accounts.nameMinLengthnumber3

Minimum allowed length for an account name.

Config.Accounts.nameMaxLengthnumber32

Maximum allowed length for an account name.

Config.Accounts.allowOwnerClosebooleantrue

Owners can close their own accounts.

Config.Accounts.allowOwnerFreezebooleanfalse

Owners can freeze their own accounts.

Config.Accounts.adminGroupsstring[]{ 'admin', 'superadmin', 'mod' }

Framework group names treated as bank admins.

Config.Accounts.adminPermissionsstring[]{ 'admin', 'god' }

Additional QBCore permissions recognized as bank admins.

Config.Accounts.adminAcePermissionstring'command.nx_realbanking_admin'

ACE permission checked for admin actions.

Shared accounts#

Config.Accounts.Shared.enabledbooleantrue

Master toggle for multi-owner (shared) accounts.

Config.Accounts.Shared.allowPersonalbooleanfalse

Allow personal accounts to be shared with other players.

Config.Accounts.Shared.allowBusinessbooleantrue

Allow business accounts to be shared.

Config.Accounts.Shared.allowSavingsbooleantrue

Allow savings accounts to be shared.

Config.Accounts.Shared.allowLinkedPersonalbooleanfalse

Allow the framework-linked personal account to be shared.

Config.Accounts.Shared.cacheSecondsnumber120

Cache TTL for shared account membership lookups.

Config.Accounts.Shared.adminBypassbooleantrue

Admins bypass shared-account role checks.

Config.Accounts.Shared.defaultRolestring'viewer'

Role assigned when inviting a new member without an explicit role.

Config.Accounts.Shared.rolestable

Role to permission map. Shipped with owner, manager, teller, viewer. Each role sets boolean flags: view, withdraw, deposit, transfer, manage_members, edit_limits, freeze, close.

Inventory / cash item#

Config.Inventory.useOxInventoryForCashbooleanfalse

When true, deposit and withdraw flows write the cash item directly through ox_inventory instead of calling the framework's AddMoney / RemoveMoney. Use this if your server renamed the cash item and the framework's auto-sync no longer fires.

Config.Inventory.moneyItemstring'money'

ox_inventory item name that represents cash. Common values: 'money', 'cash'. Only used when useOxInventoryForCash is true.

PIN code#

Config.Pincode.enabledbooleantrue

false removes PINs completely: ATMs open straight on the player's first account, the bank app and nx_computer's Banking app show no PIN card, onboarding step or PIN fields, new accounts take no PIN, and SetInitialPin answers success without setting anything. PINs already set stay stored and apply again if you switch it back on.

Config.Pincode.changeCostnumber100

Fee charged when the user changes their PIN. First creation is free.

Config.Pincode.resetCostnumber200

Fee charged for a PIN reset (no old PIN required).

Config.Pincode.allowSequentialbooleanfalse

Whether players may set a run of consecutive digits such as 1234 or 4321. Off means those PINs are refused.

Config.Pincode.allowRepeatedbooleanfalse

Whether players may set the same digit four times, such as 1111. Off means those PINs are refused. PINs are always 4 digits; attempts and lockout are set under Config.Session.

The bank app checks a weak or repeated new PIN before sending it, so a refused PIN costs the player nothing. Two fixed limits protect PIN changes in the bank app. Creating, changing and resetting a PIN share a spam guard of 10 requests a minute. A wrong current PIN on a change is counted on its own: after 5 in 5 minutes the player has to wait, and the bank app tells them for how long. A successful change clears that count. The ATM's own wrong-PIN lockout is set under Session.

Fees#

Each fee block shares a shape: { enabled, type = 'percentage' | 'flat', value, minFee?, maxFee? }.

Config.Fees.withdrawaltable{ enabled=false, type='percentage', value=1.5, minFee=1.00, maxFee=50.00 }

Charged on ATM withdrawals, on top of the amount requested: the player receives what they asked for and the account loses amount + fee. Ships disabled so updating does not change your economy.

Config.Fees.transfertable{ enabled=true, type='flat', value=2.50, sameBankFree=true }

Charged on transfers. sameBankFree waives the fee for transfers between accounts of the same player.

Config.Fees.deposittable{ enabled=false, type='flat', value=0 }

Taken out of the deposit: the player hands over the amount and the account is credited amount - fee. Ships disabled.

Transaction limits#

Config.Limitstable

Per-account-tier limits: default, premium, business, savings. Each entry: { dailyWithdrawal, dailyDeposit, dailyTransfer, transactionMax, transactionMin }. Shipped defaults use a deliberately permissive ceiling. Tighten these for your economy.

Sounds#

Config.Sounds.volumenumber0.5

Scales the whole ATM sound mix (0.0 to 1.0). 0.5 is the shipped level, 0.0 mutes the ATM.

Security#

Config.Security.logLevelstring'basic'

One of 'none', 'basic', 'verbose', 'paranoid'. Controls how much detail is written to the security audit log. The bank app's Security Center reads from these logs, so 'basic' is the minimum if you want session and PIN events to appear there. Set to 'none' to silence all security logs.

Config.Security.restartFreezebooleantrue

Pauses deposits, withdrawals, transfers and payments from the one-minute restart warning until the restart (txAdmin, or any restart manager that sends txAdmin's restart events), so no money moves after your framework's last save. A skipped restart lifts the pause. Missing counts as true.

Config.Security.anticheattable{ distanceChecks=true, teleportDetection=false, speedHackDetection=false, injectionDetection=false }

Anti-exploit toggles. Distance checks are cheap and recommended. The movement checks are heuristics and ship off, because an admin teleport menu or a vehicle launcher will trip them. injectionDetection refuses malformed payloads from a client.

Config.Security.thresholdstable{ rapidTransactions=10, largeTransfer=50000, dailyLimitPercent=90 }

Heuristic thresholds for flagging suspicious activity. These flag, they do not hard-block.

ATMs#

Config.ATMPropstable

Array of ATM prop definitions. Each entry: { model = `hash`, type = 'standalone' | 'wall' | 'maze_bank' }. Shipped models: prop_atm_01, prop_atm_02, prop_fleeca_atm, v_5_b_atm1, v_5_b_atm2.

Blips#

Config.Blipstable{ enabled=false, sprite=207, color=2, scale=0.8, label='ATM', shortRange=true }

Global toggle for ATM blips. Per-location visibility is still controlled by Config.ATMLocations[i].blip.

Config.ATMLocationstable

ATM marker / blip definitions at fixed coordinates. Each entry: { coords = vector3, name = string, blip = boolean }.

Bank locations#

Config.BankLocationstable

Array of in-world bank-access points. Each entry: { coords = vector3, heading, type = 'fleeca' | 'pacific' | 'blaine' | 'maze', label, blip, ped }. Peds spawn with the given model and scenario. Targeting a banker triggers nx_realbanking:server:openBank.

Bank interactions#

Config.BankInteractions.targetOptionstable{ label='Access Bank', icon='fa-solid fa-building-columns', distance=2.5 }

Options surfaced when a player targets a bank ped or counter.

Config.BankInteractions.markertable

Marker placed at bank locations. Fields: enabled, type, color {r,g,b,a}, size, bobUpAndDown, faceCamera, rotate. Disabled by default in favor of target-based interaction.

Config.BankInteractions.drawDistancenumber15.0

Maximum distance at which markers and 3D text are drawn.

Config.BankInteractions.text3dtable{ enabled=false, scale=0.35, color={r=255,g=255,b=255,a=255} }

Optional 3D text prompt above bank peds.

Config.BankInteractions.keybindtable{ enabled=true, key=38, label='E' }

Proximity keypress, used only when Config.UseTarget is false. If you turn targeting off, leave this on or players cannot reach the bank peds.

Societies (job invoicing)#

Config.Societiestable

Map of job name to { label, account, canBill, canInspect, finePresets, requireReason, payGrade }. Shipped jobs: police, sheriff, ambulance, mechanic, taxi, realestate, cardealer. Each finePresets is an array of { label, amount } quick-fill options surfaced in the invoice UI. payGrade (optional) is the lowest grade that may pay invoices sent to this company; bosses always can.

Every society here can also receive invoices. See Company invoices.

To add societies while the server runs, for example from a company script, use RegisterSociety. Entries written here always take priority.

Society accounts#

A job's society money appears in the bank app's account list as its own account, for the players allowed to spend it (bosses, payGrades, the society's payGrade and the Society funds grant, the same players who may pay company invoices). They can see its balance and history, deposit and withdraw cash at a bank, and transfer to and from it. nx_computer's Banking app lists it too. The money stays in the framework's society account.

Every company has an account number in the same ACC_… shape as a personal account. The bank app and nx_computer show that number, and the ATM accepts it for transfers. Anyone can pay a company by its number; only the players above can move money out, and nobody else ever sees the balance. An invoice sent to the number bills the company. Numbers are created once per job and kept in the nx_realbanking_society_numbers table. Scripts can look them up with GetSocietyAccountNumber.

Config.SocietyAccounts.enabledbooleantrue

Show society accounts in the bank app and accept company account numbers. Off hides them and refuses transfers to and from a company account.

Config.SocietyAccounts.depositbooleantrue

Cash deposits into the company account at a bank.

Config.SocietyAccounts.withdrawbooleantrue

Cash withdrawals from the company account at a bank.

Config.SocietyAccounts.transferbooleantrue

Transfers to and from the company account, at the bank, the ATM and on the laptop. Off also stops other players paying the company by its number.

Config.SocietyAccounts.ignoreJobstable{ 'unemployed' }

Jobs that mean 'no job'. They never get a company account, an account number, company invoices or payer notices. Without the key, unemployed is still ignored. Add your own 'no job' job names here.

Reports, Security and Members are not kept for a society account, and the bank app says so on those tabs.

Freelance billing#

Config.FreelanceBilling.enabledbooleantrue

Master toggle for freelance (player-to-player) invoicing.

Config.FreelanceBilling.maxAmountnumber10000

Maximum amount for a single freelance invoice.

Config.FreelanceBilling.minAmountnumber10

Minimum amount for a single freelance invoice.

Config.FreelanceBilling.requireDescriptionbooleantrue

Reject freelance invoices without a description.

Config.FreelanceBilling.cooldownSecondsnumber60

Anti-spam cooldown between invoices issued by the same player.

Config.FreelanceBilling.allowOfflinePlayersbooleanfalse

Whether freelance invoices can be addressed to offline players.

Invoices#

Config.Invoices.enablePersonalbooleantrue

Enable player-to-player personal invoices.

Config.Invoices.enableSocietybooleantrue

Enable job-issued society invoices.

Config.Invoices.allowSelfInvoicebooleantrue

Allow a player to send an invoice to themselves.

Config.Invoices.personalRequireAcceptancebooleanfalse

Personal invoices require the receiver to accept before they can be paid. Only meaningful with allowDecline on.

Config.Invoices.allowDeclinebooleanfalse

Let receivers, players and companies alike, refuse an invoice. Off removes the Decline buttons from the bank app, and the server refuses a decline from anywhere, including the DeclineCompanyInvoice export.

Config.Invoices.acceptanceTimeoutCheckIntervalnumber5

Minutes between sweeps that expire un-accepted personal invoices.

Config.Invoices.onlyOnlineTargetsbooleantrue

Restrict invoice creation to currently online recipients.

Config.Invoices.targetMenuEnabledbooleanfalse

Adds a billing option to the target menu for every player in the world. Off by default. The bank app's Send Invoice tab works either way.

Company invoices#

Players can send an invoice to a company instead of a person: the bank app's Send invoice form has a Company option next to Nearby and Server ID, and it lists every society in Config.Societies except the sender's own. The company pays it from its society account, so it never reaches anyone's personal bill list, autopay or Pay all.

Who may pay a company invoice, checked on the server:

  • a boss of that job (ESX grade name boss, QBCore and Qbox isboss), always
  • a grade at or above Config.Invoices.company.payGrades[job], or the society's own payGrade
  • a grade a boss gave Society funds in nx_employeemanagement's Permissions tab, or in nx_computer's Employees app when nx_employeemanagement is not running

That is the stock rule of Custom.CanUseSocietyFunds, which you can change. The same players may use the company's society account.

Those players see the company's open invoices under Received invoices in the bank app, with the company balance and a Pay from company button, plus Decline when Config.Invoices.allowDecline is on. Nobody can invoice their own employer, and a payer cannot pay an invoice they sent. Players can also address an invoice to a company's account number. To limit who may invoice which company, edit Custom.CanInvoiceCompany.

Config.Invoices.company.enabledbooleantrue

Allow invoices addressed to a company. Off hides the Company option and the server refuses them.

Config.Invoices.company.payGradestable{}

Per job, the lowest grade that may pay the company's invoices, e.g. { mechanic = 3 }. Bosses can always pay.

Config.Invoices.company.employeeManagementbooleantrue

Grades given Society funds in nx_employeemanagement may pay too. Ignored when nx_employeemanagement is not running.

Config.Invoices.company.maxPendingnumber25

Open invoices one company can hold. Further invoices to it are refused until some are paid or declined.

Phone notifications#

A new invoice also lands on the receiver's phone when nx_phone runs, in the Wallet. For a company invoice every online member who may pay it gets one. The bank works the same without nx_phone, and a player without a phone or with Wallet notifications switched off simply gets none.

Config.PhoneNotifications.enabledbooleantrue

Send new-invoice notifications to the phone.

Config.PhoneNotifications.resourcestring'nx_phone'

Phone resource whose Notify export is called.

Config.PhoneNotifications.appIdstring'cards'

Phone app that shows the notification and opens on tap (nx_phone's Wallet).

Invoice limits#

Config.InvoiceLimits.maxPendingtable{ received=20, sent=10 }

Hard cap on simultaneously pending invoices per player, split by direction.

Config.InvoiceLimits.maxAmountnumber100000

Maximum amount a single invoice may carry.

Config.InvoiceLimits.minAmountnumber1

Minimum amount a single invoice may carry.

Config.InvoiceLimits.dailyLimittable{ enabled=true, maxCreated=50, maxAmount=500000 }

Per-player daily cap on invoice count and total amount issued.

Config.InvoiceLimits.expirationtable{ enabled=true, days=30 }

When enabled, invoices become overdue after `days`. This is the default due date when the sender does not choose one.

Invoice due dates#

Senders may choose when an invoice falls due: nx_computer's Banking app offers a "Due in" choice, and the CreateInvoice and CreateFine exports take dueDays or dueAt. A society billing as itself uses its own range, so some societies can send longer-due bills than others.

Config.InvoiceDue.minDaysnumber1

Shortest due date a sender may choose, in days.

Config.InvoiceDue.maxDaysnumber30

Longest due date a sender may choose, in days.

Config.InvoiceDue.outOfRangestring'clamp'

'clamp' moves a date outside the range to its nearest edge. 'reject' refuses it with DUE_OUT_OF_RANGE. Fines always clamp.

Config.InvoiceDue.societiestable{}

Per Config.Societies job: minDays, maxDays and defaultDays, e.g. { realestate = { maxDays = 90 } }. Fines from that job take its minDays and maxDays too, inside Config.Fines.maxDueDays.

VAT#

Config.VAT.enabledbooleanfalse

Apply VAT on top of invoice amounts.

Config.VAT.ratenumber10.0

VAT percentage.

Config.VAT.govAccountstring'society_government'

Society account that receives collected VAT.

Config.VAT.applyToSocietybooleantrue

Apply VAT to society-issued invoices.

Config.VAT.applyToFreelancebooleantrue

Apply VAT to freelance-issued invoices.

Config.VAT.showBreakdownbooleantrue

Display VAT as a separate line in the invoice UI.

Commission#

Config.Commission.societyInvoicestable{ enabled=true, percent=5.0, minAmount=10, maxAmount=500 }

Commission on society invoices, clamped between minAmount and maxAmount.

Config.Commission.freelanceInvoicestable{ enabled=false, percent=0.0, minAmount=0, maxAmount=0 }

Commission on freelance invoices. Disabled by default.

Autopay#

Config.Autopay.enabledbooleanfalse

Auto-debit invoices that pass their due date.

Config.Autopay.daysnumber7

Days after the due date at which autopay attempts settlement.

Config.Autopay.checkIntervalnumber60

Minutes between autopay sweeps.

Config.Autopay.notifyBeforetable{ enabled=true, daysBefore=1 }

Notify the player before autopay runs against them.

Config.Autopay.onFailuretable{ applyInterest=true, interestRate=5.0, notifyPlayer=true }

Behavior when autopay cannot collect funds. interestRate is the percentage added per failed attempt.

Fines#

Fines are bills issued by other resources on behalf of an agency, such as police tickets from nx_computer's MDT. The player pays them in the bank app like any other invoice. See Fines for the exports.

Config.Fines.enabledbooleantrue

Master switch. Off makes every fine export return fines_unavailable.

Config.Fines.allowedResourcesstring[]{ 'nx_computer' }

Resources that may issue, cancel and read fines. Any other caller gets not_allowed.

Config.Fines.dueDaysnumber7

Days to pay when the issuing resource does not say.

Config.Fines.maxDueDaysnumber90

Longest due date a resource may set.

Config.Fines.maxAmountnumber1000000

Largest single fine.

Config.Fines.autopaybooleantrue

Collect overdue fines from an online player's bank, without interest.

Config.Fines.checkIntervalnumber5

Minutes between checks that mark unpaid fines past their due date as overdue.

Config.Fines.notifyReceiverbooleanfalse

Send the in-game new-invoice notice for a fine. Off by default because the issuing resource sends its own.

Credit cards#

Config.Credit.enabledbooleantrue

Master toggle. If false, all credit-card exports return CREDIT_DISABLED.

Config.Credit.itemstable{ givePhysicalCard=true, creditCardItem='credit_card' }

ox_inventory item name that represents a credit card, and whether to give the physical item on approval.

Config.Credit.billingtable

Billing cycle knobs: inGameDayMinutes, cycleDays, dueDays, checkIntervalSeconds, interestIntervalDays, minimumPaymentPercent, minimumPaymentFlat. In-game days compress real-world billing windows into a gameplay-friendly pace.

Config.Credit.scoretable

Credit score model: min/max bounds, base score, stable-job bonus, bank-balance thresholds, account-age bonus, payment bonuses and penalties, usage bonus, and a usage-bonus cap (cardUsageBonusCap). These numbers drive tier eligibility.

Config.Credit.penaltiestable{ lateFeeFlat=250, lateFeePercent=2.5, collectionsThreshold=50000, autoSeizeEnabled=true }

Late fees and collections behavior. autoSeizeEnabled will seize funds from linked accounts when debt exceeds collectionsThreshold.

Config.Credit.limitstable{ maxActiveCards=2, maxSingleCharge=25000 }

Hard limits on cards per player and the maximum value of a single charge.

Config.Credit.atmCashAdvancetable

ATM cash-advance flow: enabled, autoFallbackOnInsufficient, requirePhysicalCard, merchant label, transactionType identifier.

Config.Credit.tierstable

Tier definitions keyed by tier id. Shipped: standard, gold, black. Each: label, creditLimit, interestRate, graceInterestRate, graceDays, minimumScore, requiresStableJob, whitelistedJobs. The black tier whitelists specific jobs.

Config.Credit.tierPrioritystring[]{ 'black', 'gold', 'standard' }

Order used when auto-assigning a tier from score. Highest eligible tier wins.

Discord logging#

These live in server-config.lua, not shared/config.lua. A webhook URL lets anyone holding it post as your server, so keep it in that file and regenerate it in Discord if it ever leaks.

Config.Logging.enabledbooleantrue

Master switch for all Discord logging.

Config.Logging.defaultWebhookstring''

Used by any enabled category that has no webhook of its own. Leave this and every category webhook empty and nothing is sent.

Config.Logging.botNamestring'NX Banking'

Name shown on the messages. The category is appended, so a security message posts as 'NX Banking - Security'.

Config.Logging.botAvatarstring''

Optional avatar image URL for the messages.

Config.Logging.mentionRoleIdstring''

Role id pinged on critical events only. Empty means never ping. Everything else posts with notifications suppressed so a busy channel does not spam your staff.

Config.Logging.flushSecondsnumber3

How long an event may wait to be grouped with others. Lower feels more live, higher is quieter. Critical events ignore this and send immediately.

Config.Logging.maxQueuedEventsnumber500

Backlog limit per channel. If Discord cannot keep up, the oldest events are dropped and the next message reports how many were lost.

Config.Logging.categoriestable

One entry per category: transactions, security, invoices, credit, accounts, admin. Each takes enabled, webhook, label, mode and minSeverity. transactions also takes minAmount to ignore small movements.

Config.Logging.privacytable{ includeIp=false, includeIdentifiers=false }

Citizen ids are always shortened in the message. These two opt in to also recording the player's IP address and full identifier list. An IP counts as personal data in most jurisdictions.

Categories#

Each category can point at its own channel. An empty webhook falls back to defaultWebhook.

CategoryCoversVolumeDefault
securityExploit attempts, PIN lockouts, permission violations, money that failed to reconcileLowOn
accountsAccounts created, closed, frozen, renamed, handed over, plus shared account membershipLowOn
adminInvoice deletions, player financial inspections, export-driven actionsLowOn
invoicesCreated, paid, cancelled, auto-paid, expiredMediumOff
creditApplications, charges, statements, late fees, collectionsMedium to highOff
transactionsDeposits, withdrawals, transfersHighOff

transactions and credit ship off because they are busy enough to deserve a channel of their own. Turn them on once you have somewhere to put them.

Modes#

mode controls how much room each event gets.

ModeBehaviour
embedOne message block per event. Readable, best for low volume.
digestMany events collapsed into a single table. Best for transactions.
offCategory disabled.

Severity#

minSeverity drops anything below the level you set: info, warning or critical. Auto-payments, credit interest and member removals are warnings. Exploit attempts and debt seizures are critical.

Activity log#

Also in server-config.lua. One structured row per bank action (transfers, ATM cash, company accounts, invoices and fines, cards, accounts and PINs, staff actions, refused requests), handed to Format.SendLog at the bottom of bridge/logs.lua, where you connect your own logging. It does nothing until you do. Rows never hold a PIN, card number, IP or identifiers.

Config.Logs.Enabledbooleanfalse

Build rows and call Format.SendLog. Off means no rows are built at all.

Config.Logs.MinAmountnumber0

Withdrawals, deposits and transfers below this are not logged.

Config.Logs.Contentbooleanfalse

Also include the memo players type on transfers.

Customisation hooks#

The files in bridge/ stay readable and editable in the escrowed release. They hold the decisions a server usually wants to make its own: who is an admin, who may spend a company's money, how notices and blips look, which target options appear. The escrowed code calls each function at the point its comment names, so keep the function names, arguments and return values when you edit one.

FileWhat it covers
bridge/server.luaAdmins, company money, who may invoice a company, a check before and after every withdrawal, deposit and transfer, the credit-card item, phone notices
bridge/client.luaNotifications, extra checks before the ATM or bank opens, blips, bankers, target options, keybind-mode prompts
bridge/logs.luaHow each event looks in Discord
bridge/esx.lua, bridge/qbcore.luaFramework calls: player data, money, items and society accounts
bridge/init.luaFramework detection. Set forceFramework to 'esx', 'qbcore' or 'qbox' to skip auto-detection

If you keep your own copy of a bridge file across an update, compare it with the new one. See Updating.

Server#

Custom.IsAdminserver

Staff check for frozen-account overrides, PIN resets for other players and the admin invoice tools. The server console always counts as admin and never reaches this. Stock rule: Config.Accounts.adminGroups, adminPermissions and adminAcePermission.

Parameters

source number
Server id of the player.
player table
The framework player object.

Returns

boolean
Lua
function Custom.IsAdmin(source, player)    return IsPlayerAceAllowed(source, 'group.admin')end
Custom.CanUseSocietyFundsserver

May this player spend a company's money? Covers the company's society account in the bank app and on the laptop (withdraw, deposit, transfer out) and paying invoices addressed to the company. Paying into a company by its account number is open to anyone and does not ask this.

Parameters

player table
The framework player object.
job string
The company (job name).

Returns

boolean
Lua
-- Stock rule: a member of the job who is boss, or at or above-- Config.Invoices.company.payGrades[job] (or the society's payGrade),-- or whose grade has Society funds in nx_employeemanagement / nx_computer.function Custom.CanUseSocietyFunds(player, job)    local playerJob = NX_REALBANKING.Framework.GetJob(player)    return playerJob and playerJob.name == job and playerJob.isBoss == trueend
Custom.CanInvoiceCompanyserver

May this player send an invoice to a company? Asked when the Send Invoice form lists companies, and again when an invoice to a company is sent. The feature switches and the rule that nobody bills their own employer are checked first. Stock rule: anyone who may send invoices at all.

Parameters

source number
Server id of the sender.
player table
The framework player object.
job string
The company being billed.
invoiceType 'personal' | 'society' | nil
nil while listing companies; 'personal' for a freelance invoice, 'society' when billing as their own company.

Returns

boolean
Lua
-- Only working businesses may bill the police departmentfunction Custom.CanInvoiceCompany(source, player, job, invoiceType)    if job == 'police' then        return invoiceType == 'society'    end    return trueend

A refused company disappears from the Send Invoice form and from GetBillingRights, and sending to it anyway fails with NO_BILL_PERMISSION. If this function is missing from your bridge/server.lua, or throws an error, every company can be billed and the error is printed to the server console.

Custom.CanTransactserver

Runs before every withdrawal, deposit and transfer, before anything is checked or moved. Return false and a message to refuse; the message is shown on the ATM screen or in the bank app exactly as you wrote it.

Parameters

source number
Server id of the player.
kind 'withdraw' | 'deposit' | 'transfer'
What the player is doing.
data table
withdraw and deposit: { accountId, amount }. transfer: { fromAccount, toAccount, amount, description }.

Returns

boolean ok, string|nil reason
Lua
function Custom.CanTransact(source, kind, data)    if kind == 'withdraw' and Player(source).state.isCuffed then        return false, 'You cannot use the bank while restrained'    end    return trueend
Custom.OnTransactionserver

Runs after every successful withdrawal, deposit and transfer, with the same kind and data as CanTransact. result.amount, result.fee and result.newBalance are the settled numbers.

Parameters

source number
Server id of the player.
kind 'withdraw' | 'deposit' | 'transfer'
What the player did.
data table
As for CanTransact.
result table
The result of the transaction.
Lua
function Custom.OnTransaction(source, kind, data, result)    if kind == 'withdraw' and result.amount >= 50000 then        TriggerEvent('my_police:largeWithdrawal', source, result.amount)    endend

Both hooks cover the ATM, the bank app and transfers made on a laptop or phone through OnlineTransfer, for personal and company accounts alike. A company account arrives as its account number (or society:<job> when a script passed that); NX_REALBANKING.SocietyAccounts.JobOf(id) returns the job behind it. The Integration API exports (AddMoney, RemoveMoney, Transfer), invoice payments and phone card payments do not pass through them. An error inside either hook is printed to the server console and the transaction goes ahead.

Custom.NotifyPhoneserver

A new invoice for a player, or for a company they may pay for. The stock version sends a Wallet notification through nx_phone's Notify export, following Config.PhoneNotifications. Point it at another phone here. Keep failures silent: the in-game notice is sent either way.

Parameters

source number
Server id of the player.
title string
Notification title.
message string
Notification text.
threadKey string
Groups notices about the same invoice.

The credit-card item has three hooks of its own in the same file:

FunctionCalled when
Custom.GiveCreditCard(source, itemName, card, info)A card is issued. Gives the physical item with its metadata; return false if it could not be given, and the application is rolled back.
Custom.HasCreditCard(source, itemName)Before an ATM cash advance, when Config.Credit.atmCashAdvance.requirePhysicalCard is on.
Custom.RegisterCardMetadata()Once the credit system is on, to register the inventory labels for the card's metadata. Return true when done; it is retried otherwise.

Client#

Custom.Notifyclient

Every notice the player sees from the ATM, the bank and invoices. The stock version calls lib.notify.

Parameters

data table
{ title?, description, type? ('info' | 'success' | 'warning' | 'error'), duration? }
Lua
function Custom.Notify(data)    exports['my_notify']:Show(data.description, data.type or 'info', data.duration)end
Custom.CanUseATMclient

Runs after the built-in checks (dead, cuffed, already at an ATM) and before the card goes in. Return false and a message to refuse.

Parameters

atm table
{ entity, coords, hash }

Returns

boolean ok, string|nil reason
Custom.CanUseBankclient

Runs before the bank app opens at a banker. Return false and a message to refuse.

Returns

boolean ok, string|nil reason
Custom.AddBankTargetclient

Puts the target options on a banker, or on a box zone at the bank when it has no banker: Access Bank, My Open Invoices and Check a Person's Unpaid Invoices. Return 'entity' when the options sit on the ped itself, so they are added again when a banker respawns.

Parameters

bank table
The Config.BankLocations entry.
index number
Its position in Config.BankLocations.
ped number|nil
The banker, if one spawned.
actions table
{ open, inspect, canInspect, myInvoices, canMyInvoices }. Call these from your options.

Returns

'entity' | 'zone' | nil

My Open Invoices tells the player how many open invoices they have and the total, then opens the bank on the invoices page; with none open it just says so. It is shown while invoices are switched on. The option comes from actions.myInvoices, so a bridge/client.lua edited before this option existed will not show it until you copy the myInvoices option from the new Custom.AddBankTarget.

The rest of bridge/client.lua:

FunctionCalled when
Custom.CreateATMBlip(location)Once per Config.ATMLocations entry. Return the blip, or nil for none.
Custom.CreateBankBlip(bank)Once per Config.BankLocations entry. Return the blip, or nil for none.
Custom.SpawnBankPed(bank)A banker is needed. Return the ped, or nil for none, in which case the target falls back to a box zone. A missing banker is respawned through this.
Custom.SetupBankPed(ped, bank)From the stock SpawnBankPed, and every 15 seconds for a banker that has been knocked loose. Freezes it and makes it ignore the world.
Custom.DeleteBankPed(ped)The resource stops.
Custom.AddATMTarget(models, onUse, canUse)Makes every Config.ATMProps model usable. Call onUse(entity, model) to start the ATM; canUse() is false while one is already open.
Custom.RemoveATMTarget(models)The resource stops.
Custom.AddPlayerInvoiceTarget(onSelect)Only with Config.Invoices.targetMenuEnabled on. Adds Send Invoice on other players; call onSelect(serverId). Return true once registered.
Custom.ShowPrompt(kind, coords) / Custom.HidePrompt(kind)Keybind mode only (Config.UseTarget = false): the player came within reach of an ATM or banker, or left. kind is 'atm' or 'bank'. The stock version shows nothing; lib.showTextUI is the usual choice.
Custom.DrawBankMarker(bank)Every frame within draw distance while Config.BankInteractions.marker is enabled.
Custom.DrawBankText(coords, text)Every frame near a banker while Config.BankInteractions.text3d is enabled.

The stock target options support ox_target and qb-target, and the ATM also qtarget, following Config.TargetSystem. Any other target resource plugs in here.

Discord formatting#

bridge/logs.lua decides what each Discord message says. Delivery, batching and Discord's rate limits are handled for you; webhooks and categories stay in server-config.lua.

NX_REALBANKING.LogFormat.Transformserver

Every event headed for a webhook, before it is queued. Change the entry and return it, or return nil to keep it out of Discord. The nx_realbanking:server:bankEvent event has already fired by then, so returning nil does not hide the event from other resources.

Parameters

entry table
{ event, category, severity, source?, citizenId?, playerName?, headline?, summary?, digest?, fields?, footer? }

Returns

table|nil entry
Lua
function Format.Transform(entry)    if entry.event == 'withdraw' and entry.severity == 'info' then        return nil -- keep routine withdrawals out of Discord    end    return entryend
Function or tableWhat it controls
Format.Embed(entry)The embed for one event, in a category set to embed mode.
Format.Digest(events, category)One embed holding many events as lines, in a category set to digest mode. Each event brings its own line in entry.digest.
Format.Message(category, label, highest)The message around the embeds: bot name, avatar, the role mention on critical events, and silent delivery for everything else.
Format.ColorsEmbed colour per severity.
Format.LimitsDiscord's size limits. Discord rejects, rather than trims, anything longer, so cut text with the file's Truncate helper.

Framework and society money#

bridge/esx.lua and bridge/qbcore.lua (Qbox uses the QBCore file) hold every framework call: players, money, items and society accounts. If your company money lives in a script other than esx_addonaccount, qb-management or qbx_management, change GetSocietyBalance, AddSocietyMoney and RemoveSocietyMoney there and every society feature follows: invoices, fines, society accounts, company account numbers and the Integration API.

We are not affiliated with or endorsed by Rockstar North, Take-Two Interactive or other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc. Our checkout process is owned & operated by Tebex Limited, who handle product fulfilment, billing support and refunds.