Installation
Medit8z Gun Rack ships as a portable resource folder with two Ox Inventory items, two PNG icons, and an inline-migrated database table. No manual SQL import is required.
Prerequisites
Ensure the following resources are running before Medit8z Gun Rack starts:
qbx_coreox_libox_inventoryoxmysql
A reachable MySQL or MariaDB database is required for plate persistence.
1. Drop the resource folder
Place the entire medit8z_gunrack folder into your server's resources/[scripts]/ directory.
resources/[scripts]/medit8z_gunrack/2. Register the inventory items
Open medit8z_gunrack/items.lua and merge its two entries into your Ox Inventory items file:
resources/[ox]/ox_inventory/data/items.luaThe items shipped are gunrack and gunrack_key. Both define client.export hooks pointing at medit8z_gunrack.gunrack and medit8z_gunrack.gunrack_key respectively.
Preserve the client.export hooks exactly as written. Strip them and the items will be consumed without triggering the install / open flow.
3. Copy the icons
Copy both PNGs from medit8z_gunrack/images/ into:
resources/[ox]/ox_inventory/web/images/The expected filenames are gunrack.png and gunrack_key.png.
4. Ensure the resource
Either confirm [scripts] is ensured in your server.cfg (default in a Qbox install), or add an explicit line:
ensure medit8z_gunrackDatabase
The gunracks table is created automatically on first start by an inline CREATE TABLE IF NOT EXISTS in server/main.lua:
gunracks (
id INT AUTO_INCREMENT PRIMARY KEY,
plate VARCHAR(12) UNIQUE,
installed_by VARCHAR(50),
installed_at TIMESTAMP
)On every restart the script re-registers an Ox Inventory stash for every plate already in the table, so contents survive restarts.
Verification
On a clean start you should see a console line similar to:
[medit8z_gunrack] Registered 0 gunrack stashes(or the count of existing racks if the table is non-empty). Confirm the inventory side with:
/giveitem <id> gunrack 1
/giveitem <id> gunrack_key 1Both items should appear with their PNG icons. Continue to Configuration to extend the job allowlist or change the vehicle class filter.