Skip to content

Configuration

Everything is in sl_gunshop/config.lua, and every setting has a comment next to it. These are the sections you will want to look at first.

Config.Locale = 'en' -- 'en' or 'es'

Texts are in locales/en.json and locales/es.json. To add a language, copy one, translate it and set Config.Locale to its name.

Config.Framework = 'auto' -- or 'qb', 'qbx', 'esx'
Config.Inventory = 'auto' -- or 'qb', 'ox', 'qs'
Config.ItemImages = 'auto' -- or 'nui://my_inventory/web/images/%s.png', or false
Config.Interaction = 'auto' -- or 'native', 'sl_interact', 'ox_target', 'qb-target'

auto detects them. Config.Interaction decides how players use the fixed points (the computer, display case doors, the register, the safe, the sale sign, the trunk): SL-Interact, ox_target or qb-target, the first one running, or SL-Gunshop’s own keys. Weapons and products on the shelves, restocking and the checkout always use SL-Gunshop’s own keys (aim and press E / G). Start your target script before sl_gunshop.

Setting What it does
Config.GunShop2.shops The 9 small Ammu-Nation: mode = 'sale' (for sale, with its price) or 'auto' (state store)
Config.GunShop.shops The 2 big ones with a shooting range (Pillbox Hill and Cypress Flats), same format
Config.GunShop2.upgrades, Config.GunShop.upgrades The fixed furniture bought from the computer and its price (see Upgrades)
starterUpgrades Fixed furniture a store comes with when bought (empty by default: the owner buys everything)
Config.Ownership Stores per player (maxPerPlayer), what selling to the state returns (sellBack) and the maximum price of a transfer

Default prices: Sandy Shores, Paleto Bay and Route 68 $90,000 · Tataviam $100,000 · Chumash $110,000 · La Mesa $120,000 · Hawick and Morningwood $140,000 · Cypress Flats (with range) $220,000.

Config.Products lists every product: what the customer gets (weapon, or an item per inventory with give), its 3D model, the selling price and what it costs the owner (cost). Out of the box: 7 pistols, 2 shotguns, an SMG, 3 rifles, ammunition for every calibre, attachments, melee weapons and the cleaning kit. Add your own (addon weapons too) by copying a line. Owners change the selling price on the computer, between Config.Pricing.min and the base price times Config.Pricing.maxMultiplier (3x).

The weapon license, the serial and the MDT

Section titled “The weapon license, the serial and the MDT”
Config.WeaponRequest = {
license = true, -- the framework's weapon license is needed to buy a firearm
serialPrefix = 'SLG-', -- SLG- + 6 letters and digits
categories = { pistols = true, shotguns = true, smg = true, rifles = true }, -- handed over by the staff
}
Config.Mdt = 'auto' -- ps-mdt, kartik-mdt, pure_mdt, piotreq_gpt, or false

The license is read in bridge/framework/ (Framework.HasWeaponLicense): QBCore and Qbox use the metadata licences.weapon, ESX the license weapon (user_licenses table, as esx_license saves it). Change it there if your server keeps licenses somewhere else. The MDT link is the open file bridge/mdt.lua.

Config.Range: pass durations and prices, the price to try a store weapon (tryPrice), and the scored challenge (rounds, combo and medals, the points for bronze, silver and gold). See The shooting range.

Config.Stock: the box each kind of product comes in, units per box, home delivery fee and time, the gun distributor (its bays and how many boxes fit in each vehicle class) and SL-Courier.

Setting What it does
Config.Employees Employees per store, salary and how often it is paid
Config.Cash Cash in the registers and the safe, and the armored van (fee, arrive, deposit, cooldown)
Config.Robbery.minPolice On-duty police needed to rob (0 = not needed). Set it for your server
Config.Robbery.policeJobs Jobs that count as police
Config.Robbery.reward What the robber gets: 'markedbills', 'item' (one item per $) or 'cash'
Config.Robbery.dispatch Police alerts: 'auto' detects ps-dispatch, cd_dispatch, qs-dispatch, core_dispatch, rcore_dispatch…
Config.Theft Hiding products, the door alarm, the anti-theft gates and the security tags
Config.Breakage Products breaking when shot or knocked over, and the insurance
Setting What it does
Config.Objects.maxProducts The most product objects each player has at once (1000), nearest first. A big store with more loads only the room you are in and the other one as you walk up to the archway. Lower it if players see pink trees or low-poly hair after visiting a store
Config.AutoShops.fill How full state stores are kept: share of each spot (0.5 = half). 1.0 fills big stores to ~1500 products

Config.Finishes: the price of each floor and wall finish (by group, or one by one). classic, the original Ammu-Nation look, is free.

Config.Debug = false

Leave it off on a live server. When on, it adds developer commands and performance meters.