AI Core

ai-banking

Banks and ATMs with deposits, withdrawals, transfers, the transaction history and society accounts for job bosses.

ai-banking is the bank screen of AI Core. At a bank branch players deposit, withdraw, transfer money to other players and read their transaction history; bosses also manage their job's account. ATMs pay out and transfer. ai-banking keeps no money of its own: every balance is ai-core's, so money is the same everywhere.

What it does in the game

  • Bank branch. Walk to a branch counter and open the bank. Tabs: the card and balance, accounts, activity, and the forms to deposit, withdraw and transfer.
  • ATM. Use any ATM prop (the models in the panel). ATMs only withdraw and transfer, within the ATM limits.
  • Transfers. To a player who is online, by server id or citizen id. The panel's transfer fee (a percent) is paid by the sender on top.
  • History. Every money change of the account, newest first, read from ai-core's ledger, page by page.
  • Society accounts. A player whose job grade is a boss grade sees that job's bank account and can deposit and withdraw. Every boss with the screen open sees changes at once.

Installation

Installed by the AI Core recipe. By hand: ensure ai-banking after ensure ai-core. It needs ai-core.

It reads ai-core's account and transaction tables, so it needs its own database permission line in env.cfg:

env.cfg
add_convar_permission ai-banking read mysql_connection_string

The recipe adds this line. In ai-core's panel, General > Bank picks the banking script; auto uses ai-banking first.

Panel settings

Admin panel > Banking. Defaults come from data/banks.json and data/settings.json.

Banks tab

One record per branch. Defaults: six Fleeca branches, Pacific Standard and Blaine County Savings (Paleto Bay).

SettingWhat it changesUnitDefault for a new bank
NameThe branch name, shown on the blip. 1-48 characters.Fleeca Bank
CounterWhere players open the bank. Stand at the counter and use your position.0, 0, 0
ReachHow close the player must be to the counter. 1-20.m3
Map blipShows the branch on the map.on
Blip lookSprite, colour and size (shown when Map blip is on).sprite 108, colour 2, size 0.7

Each branch also has an NPC card: Model (empty means no NPC), What it does (idle animation) and Where it stands.

Rules tab

ATMs pay out and transfer; deposits and society accounts need a bank.

SettingWhat it changesUnitDefault
ATM modelsWorld props that work as ATMs. Up to 20 model names.prop_atm_01, prop_atm_02, prop_atm_03, prop_fleeca_atm
ATM limit per actionMost one ATM withdrawal or transfer moves. Bank branches have no limit. 0-10,000,000.$5,000
ATM limit per dayMost one character withdraws and transfers through ATMs in 24 hours. Counted in memory: a restart of ai-banking starts every count again. 0-100,000,000.$20,000
Transfer feePercent added to transfers to other players (0 = free). 0-50, in steps of 0.5.%0

Commands

None.

Keybinds

None. Branches and ATMs use ai-core's Interaction style: a prompt with E, or a target option.

What it stands in for

fxProvide: qb-banking and Renewed-Banking. Scripts that use their society money exports reach ai-banking:

  • exports['qb-banking']:GetAccountBalance(job), AddMoney(job, amount, reason), RemoveMoney(job, amount, reason)
  • exports['Renewed-Banking']:getAccountMoney(job), addAccountMoney(job, amount, reason), removeAccountMoney(job, amount, reason)

The account is a job name; the money is ai-core's job bank account.

Other banking scripts

AI Core's banking layer also supports tgiann-bank, Renewed-Banking, qb-banking, okokBankingV2, fd_banking, wasabi_banking, kartik-banking and tgg-banking. Pick one in ai-core's panel (General > Bank) and stop ai-banking. See Compatibility.

Known limits

  • Transfers go only to players who are online, because ai-core keeps money in memory for online characters.
  • The server cannot see ATM props: it trusts the ATM position the player's game sends and checks the player stays within 3 m of it. That is why ATMs have their own limits; branches have none.
  • Log channels: transfers and society.

On this page