Studios
Exchangehouse-3.jpg

Installation

SoonExchangeQbox
PAGE 02 OF 06  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

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#

  1. Put the glitch-exchange folder in your resources folder. The folder name is case-sensitive and the phone app's page path follows it.

  2. Make sure every key in Config.Items exists in ox_inventory. install/items.lua has definitions for the eleven default materials. Copy the ones you are missing into ox_inventory/data/items.lua and put an <item>.png for each in your inventory image folder. The server console warns at start about any material that has no item.

  3. 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.sql once by hand.

  4. 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-exchange
    
  5. Open config.lua, move the desk to where you want it (Config.Desk.coords) and set Config.Desk.postal to the postal near it.

  6. 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.