Installation

Dependencies

DependencyRequiredWhy
hz_libYesFramework, inventory, target, notifications, the banker's dialogue box and your theme fonts. Free, keep it up to date.
ox_libYesShared library.
oxmysqlYesDatabase.
ESX, QBCore or QboxYesThe personal balance is your framework's bank money. Servers without a framework are not supported.
OneSyncYesThe server checks where players stand before every operation.
ox_target / qb-targetNoUsed when present: the target eye goes on bankers and ATMs.
HZ-TextUiNoUsed when present: pins above bankers and on ATMs. Otherwise hz_lib shows an [E] prompt.

Steps

  1. If you run another bank (qb-banking, Renewed-Banking, esx_banking, okokBanking…), read Replacing your banking script first.
  2. Drop the hz_banking folder into your resources directory.
  3. Add the bank card item to your inventory (see below).
  4. Add HZ-Banking to your server.cfg, after your framework, inventory, target and hz_lib:
ensure oxmysql
ensure ox_lib

# your framework, inventory and target (examples)
ensure qb-core
ensure ox_inventory
ensure ox_target

ensure hz_lib
ensure hz_banking

Then restart the server and reconnect.


The bank card item

HZ-Banking gives each player a bank card item, bank_card by default (Config.CreditCardItem). The item must exist in your inventory, otherwise cards can't be handed out and ATMs refuse players. The server console says so in red at start when it is missing.

Add the item before your first start with ox_inventory. ox_inventory removes items it doesn't know from saved inventories.
ox_inventory — in ox_inventory/data/items.lua:

['bank_card'] = {
    label = 'Bank Card',
    weight = 10,
    stack = false,
    close = true,
    description = 'Debit card linked to your bank account.',
},

QBCore — already in recent qb-core (qb-core/shared/items.lua). Otherwise:

bank_card = { name = 'bank_card', label = 'Bank Card', weight = 0, type = 'item', image = 'bank_card.png', unique = true, useable = true, shouldClose = true, description = 'Debit card linked to your bank account.' },

ESX without ox_inventory — in your database:

INSERT IGNORE INTO `items` (`name`, `label`, `weight`) VALUES ('bank_card', 'Bank Card', 1);

Pictures — copy the files of hz_banking/inventory/ into your inventory's image folder (ox_inventory: web/images/). There is one card picture per bank.

Restart the server after adding the item. The same guide ships in install/items.md.


Database

Nothing to import. HZ-Banking creates its tables (all starting with hz_banking_) on start, and never touches an existing table. sql/schema.sql ships for reference.


Optional convars

# Discord log of deposits, withdrawals, transfers, /givecash, loans and shared account closures
set hz_banking_webhook "https://discord.com/api/webhooks/..."

# A private secret used to store PINs
set hz_banking_pin_secret "a-long-random-secret"

Set the PIN secret once, before players set their PINs. Changing it later makes every existing PIN stop matching, and players would have to set a new one at a counter.

What you should see

  • A blip on each of the 8 banks, in the colour of its bank.
  • A banker behind each counter. Walk up: they look at you and greet you.
  • Talk to them: a dialogue box opens with their line and four choices. Pick Open my account and the bank's sign-in page opens.
  • Order a card on the Cards page (the first one is free), set a PIN, then go to any ATM: your character faces it, inserts the card, and the ATM screen asks for the PIN.
  • No red message about HZ-Banking in the server console.

Updating

After an update, restart the whole server rather than restarting hz_banking alone. Keep hz_lib up to date at the same time.

Your config/ and locales/ files are yours: compare them with the new ones and copy over the keys you changed.