Gun Rack
Configuration

Configuration

All runtime settings live in config.lua. The file is listed under escrow_ignore in fxmanifest.lua, so it remains plain-text editable on escrowed builds — no recompile, no rebuild.

Config = {}
 
Config.AllowedJobs = {
    ['police'] = 0,
    ['bcso']   = 0,
}
 
Config.AllowedVehicleClass = 18 -- 18 = Emergency vehicles
 
Config.Stash = {
    slots     = 5,
    maxWeight = 5000,
}
 
Config.MaxInstallDistance = 3.0
Config.MaxAccessDistance  = 3.0
 
Config.IgnoredModelPrefixes = {
    'ONX_LBAR',
    'ONX LBAR',
}

Reference

KeyTypeDefaultPurpose
AllowedJobstable<string, any>police, bcsoSet of job names that can install / uninstall / open without a key. Value is unused; presence of the key is the gate.
AllowedVehicleClassnumber18GTA vehicle class allowed to host a rack. 18 is emergency.
Stash.slotsnumber5Slot count of each plate-bound stash.
Stash.maxWeightnumber5000Max weight of each plate-bound stash, in grams.
MaxInstallDistancenumber3.0Metres between player and vehicle for install / uninstall.
MaxAccessDistancenumber3.0Metres between player and vehicle for civilian key open.
IgnoredModelPrefixesstring[]lightbar propsVehicle model prefixes that share class 18 but should be excluded (lightbars, utility props).

Job whitelist

Add or remove jobs by editing the AllowedJobs table. Only the keys are read — the numeric value is unused, so any value works.

Config.AllowedJobs = {
    ['police']  = 0,
    ['bcso']    = 0,
    ['sasp']    = 0, -- State Police
    ['statepd'] = 0, -- State PD example
    ['doc']     = 0, -- Department of Corrections
}

Job names must match the name field used in your qbx_core jobs config exactly. Case-sensitive.

Vehicle class filter

Config.AllowedVehicleClass accepts a single GTA vehicle class. 18 covers emergency vehicles (police, sheriff, EMS, fire). To allow racks on additional classes, change the value or extend client/main.lua to accept a list.

Vehicle class reference: GET_VEHICLE_CLASS native (opens in a new tab).

If a class-18 lightbar prop is being misidentified as a vehicle, add its model prefix to Config.IgnoredModelPrefixes (case-sensitive, prefix match).

Stash size

Config.Stash controls every plate-bound stash. Changing these values affects new and existing stashes — Ox Inventory re-applies the slot / weight limits on registration.

Config.Stash = {
    slots     = 5,    -- 5 long-arms is the lore default
    maxWeight = 5000, -- 5 kg
}

Distances

Both distances are measured from the player to the vehicle entity in metres. Defaults are tuned for standing next to the driver door.

KeyDefaultNotes
MaxInstallDistance3.0Install / uninstall flow. Player must remain in range for the full progress bar.
MaxAccessDistance3.0Civilian gunrack_key open. Officers open from inside the vehicle, so this only governs key use.

Continue to Gameplay for the install / open / uninstall flow.