Troubleshooting
Most issues come from misconfigured job names, missing item exports, or trying to interact with the wrong vehicle class. Work through the checks below before opening a support ticket.
Common issues
| Symptom | Likely cause | Fix |
|---|---|---|
| Item is consumed but no stash registered | Player wasn't on an allowed job, or vehicle class didn't match. | Confirm the player's job is in Config.AllowedJobs. Confirm the vehicle is class Config.AllowedVehicleClass (default 18). The item should not consume on rejected installs — check the client.export hook in ox_inventory/data/items.lua. |
| Install rejected with "not authorized" | Job name mismatch. | Job names are case-sensitive and must match the name field in your qbx_core jobs config exactly. Police and police are different. |
gunrack_key doesn't open the rack | No rack installed on that plate, or player not inside the vehicle. | The civilian must be inside the vehicle, and the rack must already exist for that plate. Confirm with a SELECT * FROM gunracks WHERE plate = ? query. |
/removegunrack does nothing | Stash isn't empty, or player isn't on an allowed job. | Empty the stash first. Confirm the player is on-duty for an allowed job. |
| Multiple racks on the same vehicle | Schema enforces UNIQUE on plate; double-install attempts are rejected. | If a duplicate row error appears, check for stale rows in gunracks for that plate and DELETE manually. |
| Lightbar / utility vehicles can be racked | These props share class 18. | Add the model prefix to Config.IgnoredModelPrefixes. The check is a prefix match and case-sensitive. |
| Stashes empty after restart | Stash registration didn't run, or the table is empty. | Look for [medit8z_gunrack] Registered N gunrack stashes on start. If N is 0 but you expected racks, your DB connection or oxmysql is misconfigured. |
| Items have no icon | PNGs not copied. | Copy gunrack.png and gunrack_key.png from medit8z_gunrack/images/ into resources/[ox]/ox_inventory/web/images/, then refresh and restart ox_inventory. |
Quick checks
Run through these in order before reporting a bug:
- All four dependencies are running and listed before
medit8z_gunrackinserver.cfgorder. gunrackandgunrack_keyexist inox_inventory/data/items.luawith theirclient.exporthooks intact.- Both PNGs are present in
ox_inventory/web/images/. - The
gunrackstable exists in the database (SHOW TABLES LIKE 'gunracks'). - The on-duty job name in
qbx_corematches a key inConfig.AllowedJobsexactly. - The vehicle being targeted reports the expected class (test with
GetVehicleClassor an admin debug menu).
Database inspection
-- List all installed racks
SELECT id, plate, installed_by, installed_at
FROM gunracks
ORDER BY installed_at DESC;
-- Force-remove a rack row (only if /removegunrack is unavailable)
DELETE FROM gunracks WHERE plate = 'ABC123';Manually deleting a gunracks row leaves the Ox Inventory stash registered until the next restart. The stash itself is harmless, but if you re-install on the same plate before restarting, the new stash will replace it.
Commands
| Command | Notes |
|---|---|
/removegunrack | Uninstall the rack from the current vehicle. Job-locked, empty-only. |
There is no chat-level debug command shipped — diagnose via server console output and direct database queries.
Discord support
Stuck after the checks above? Drop into Discord (opens in a new tab) with your server console output, the gunracks row for the affected plate, and a description of the action that failed. Verified bugs are fixed within 7 days of report. Lifetime updates included.