Requirements#
| Framework | qbx_core (Qbox). ESX and plain QBCore are not supported. Tested with qbx_core 1.24.0. |
| Resources | ox_inventory (tested with 2.48.0), oxmysql (tested with 2.14.2), omes_banking |
| Patches | Two small edits to qbx_core and one export added to ox_inventory. The package ships them as install/qbx_core.md and install/ox_inventory.md. |
| Database | MariaDB or MySQL through oxmysql. The treasury balances live in omes_banking's banking_society_accounts table, which must already exist. |
| Optional | glitch-gov (tax levers, pay levers, routing, bankruptcy rules), koja-cardealer or any resource with a GetPlayerPrice(model) export (rego prices), glitch-rentals (rental exemption), glitch-businesstablet (pays the food order grant) |
Every optional resource is detected at run time. The matching feature is skipped when the resource is not running.
[!WARNING] Income tax and the paycheck levers do nothing until the qbx_core patches are applied, and the console shows no error. Back up your database first: the resource changes balances in
banking_society_accounts.
Installation steps#
Put the
glitch-treasuryfolder in your resources folder. The folder name is case-sensitive and must stayglitch-treasury.Apply the qbx_core edits from
install/qbx_core.md: a tax hook inAddMoney(server/player.lua) and aqbx_core:server:onPaycheckevent aftersendPaychecksaves the pending paychecks (config/server.lua). Restart qbx_core.Add the
SetTaxMultiplierexport frominstall/ox_inventory.mdtomodules/shops/server.lua. Without it the treasury still books the GST share of each sale, but shelf prices do not follow the GST rate and the console prints a warning at start. Restart ox_inventory.The two tables,
glitch_treasury_ledgerandglitch_treasury_rego, are created when the resource starts. If your database user cannot create tables, runsql/install.sqlonce by hand. This resource adds no inventory items and no images.Add the resource to
server.cfg, after the resources it depends on:ensure oxmysql ensure qbx_core ensure ox_inventory ensure omes_banking ensure glitch-treasuryEdit
config.lua. The shipped file keeps the account names, caller lists and job resources of the city it was built for. For a different server, copy the blocks you need fromconfig.generic.example.luaover it: neutral accounts, empty caller lists and every integration off.Start the server and type
treasuryin the server console to check the balances.
There are no permissions to set. The only command runs in the server console.
Updating#
Back up config.lua and your database, then replace the resource files except config.lua, and merge any new keys from the changelog. Re-check the qbx_core and ox_inventory patches after updating either of those resources, since an update overwrites them. If income tax stops, see Troubleshooting.