config/accounts.lua:
config/accounts.lua
UgCore.Config.Get('accounts', 'accounts'), on the server or the client.
Server
GetBalance / GetAll
nil when no character is loaded.
Add / Remove / Set
Set records the difference in the ledger. It accepts negative balances only for accounts with allowNegative, and raises otherwise.
Transfer
balance is the sender’s.
GetLedger
Client
Errors
Unknown accounts, out-of-range amounts and long reasons raise.
Events
On the server, it fires for every change of an online character, including both sides of a transfer.
On the client, it fires for the local player’s own balances only: on load, on every change, and with
balance = nil when the character unloads. Use it to update a HUD:
client.lua
Hooks
Hooks allow or cancel. Changes to the payload are ignored.