Replacing your banking script
HZ-Banking takes the place of your current bank. Scripts written for qb-banking, Renewed-Banking, esx_banking or okokBanking keep working: HZ-Banking answers under their names, and the money lands in HZ-Banking. Your accounts come with you through one console command.
What it answers
| Bank | Usual on | Exports answered |
|---|---|---|
| qb-banking | QBCore | AddMoney, AddGangMoney, RemoveMoney, RemoveGangMoney, GetAccount, GetGangAccount, GetAccountBalance, CreateJobAccount, CreateGangAccount, CreatePlayerAccount, CreateBankStatement |
| Renewed-Banking | Qbox | handleTransaction, getAccountMoney, addAccountMoney, removeAccountMoney, getAccountTransactions, GetJobAccount, CreateJobAccount, addAccountMember, removeAccountMember, changeAccountName |
| esx_banking | ESX | logTransaction |
| okokBanking | any | AddMoney, RemoveMoney, GetAccount |
A few things work the HZ-Banking way:
- A debit never takes an account below zero: when the balance is too low, it returns
false. - Amounts are whole numbers above zero.
- Account members and renaming only apply to shared accounts, never to a job or gang account.
Switching, step by step
- Back up your database.
- Stop the old bank: remove its
ensureline fromserver.cfg. If its folder sits in a category you start with oneensure [category]line, move the folder out, or delete it. - Install HZ-Banking, see Installation.
- Start the server, then import your accounts from the server console (see below).
- Open the server to players.
Two banks never run side by side. If the old bank is still running, HZ-Banking stays quiet under its name and prints a red message in the console asking you to remove it.
To stop answering for one bank, set it to false in Config.Compat.
Importing your accounts
Personal balances need no import: they are your framework's bank money and stay where they are. The import brings the rest.
hz_banking_migrate
hz_banking_migrate apply
hz_banking_migrate renewed qb apply
hz_banking_migrate— dry run: reads every source, writes nothing, prints a summary.hz_banking_migrate apply— imports.hz_banking_migrate renewed qb apply— only the sources named:okok,renewed,qb,esx.
| Source | What comes over |
|---|---|
| okok | Society and gang balances with their IBANs, personal IBANs and PINs |
| renewed | Society and gang balances, shared accounts with their owner and members, history |
| qb | Society, gang and shared accounts, bank statements as history |
| esx | Personal accounts with their PIN (new IBANs), history. Society money stays in esx_addonaccount |
- Not imported: saved recipients, scheduled transfers, okok's history, and qb-banking card PINs (players set a new PIN at a counter; the first one is free).
- One source per account: a society or gang account takes its balance from the most trusted source that knows it, in the order of
Config.MigrationPriority(okok,renewed,qb,esx). Balances left aside are listed in the summary. - Safe to run again: an account already imported is skipped.
- Nothing is deleted from the old tables, so you can go back.
- History lines come over with
Config.MigrationHistory = true(default).
Run the import before opening the server, after a backup.
Other scripts
- qb-management — its old money exports (
GetAccount,GetGangAccount,AddMoney,AddGangMoney,RemoveMoney,RemoveGangMoney) are answered while no qb-management resource runs. If you keep qb-management for its boss menu, point the scripts that pay societies to qb-banking or HZ-Banking instead. - esx_billing — bills sent by ESX job menus become HZ-Banking bills, and its bill lists and payments are answered while esx_billing isn't running. Remove esx_billing to use it. See Bills.
- esx_banking history —
logTransactionwrites a line in the player's history, without moving money. - Bank robberies — qb-bankrobbery and qbx_bankrobbery close the bank during a robbery. See Banks & bankers.
- Shared accounts imported from Renewed-Banking or qb-banking get a new HZ-Banking ID: a script that named a shared account by its old name won't find it. Job and gang accounts keep their names.
