Requirements#
The server
| Framework | qbx_core (Qbox). ESX and plain QBCore are not supported. |
| Resources | ox_lib, oxmysql, ox_target, ox_inventory |
| Database | MariaDB or MySQL 8 through oxmysql. The tables are created on first start. |
| Optional | sd-phone (Exchange app), a treasury resource with a Collect export such as glitch-treasury (receives the sell fee) |
Optional resources are detected at run time. The exchange runs without them.
Installation steps#
Put the
glitch-exchangefolder in your resources folder. The folder name is case-sensitive and the phone app's page path follows it.Make sure every key in
Config.Itemsexists in ox_inventory.install/items.luahas definitions for the eleven default materials. Copy the ones you are missing intoox_inventory/data/items.luaand put an<item>.pngfor each in your inventory image folder. The server console warns at start about any material that has no item.The seven tables are created when the resource starts, and older tables are upgraded in place. If your database user cannot create tables, run
sql/install.sqlonce by hand.Add to
server.cfg, after ox_lib, oxmysql, qbx_core, ox_inventory and ox_target:ensure ox_lib ensure oxmysql ensure qbx_core ensure ox_inventory ensure ox_target ensure glitch-exchangeOpen
config.lua, move the desk to where you want it (Config.Desk.coords) and setConfig.Desk.postalto the postal near it.Restart the server. A ped with the target option Materials Exchange appears at the desk.
There are no commands and no permissions to grant.
Updating#
Replace everything except config.lua (and any locale file you edited), then restart the resource. Database changes apply themselves. Compare the new config.lua against yours and copy across any new keys.