Configuration
| File | For |
|---|---|
config.lua | Target or key prompt, clerks, blips, ESX item names, weapon licence, ESX ammunition |
shops.lua | Where each shop is, its clerk, and which job or gang may use it |
products.lua | What each kind of shop sells and for how much (QBCore) |
products-esx.lua | The same, on ESX |
install/items.lua | The weapon licence item, to copy into your items list |
config.lua
| Option | Default | What it does |
|---|---|---|
Config.Debug | false | Console messages while setting up |
Config.Use.how | 'target' | 'target' (qb-target or ox_target) or 'gta' (walk up and press the key) |
Config.Use.key | 51 | Key for the prompt: E, or d-pad right on a controller |
Config.Use.near | 2.0 | How close you have to be |
Config.Peds.within | 50.0 | Clerks spawn this close and go away further out |
Config.Peds.invincible | true | Clerks cannot be hurt |
Config.Blips | see below | Map blip for each kind of shop; false for none |
Config.EsxNames | see below | ESX only: your item name for each QBCore name |
Config.RequireWeaponLicence | on for ESX, off for QBCore | Gun shops ask for a weapon licence |
Config.WeaponLicence | 'weapon' | The licence's name (esx_license on ESX, player metadata on QBCore) |
Config.WeaponLicenceItem | 'firearm_licence' | The item gun shops sell the licence as |
Config.WeaponLicencePrice | 5000 | Price of the licence; 0 stops it being sold |
Config.Ammo.enabled | on for ESX, off for QBCore | Sell ammunition boxes that load your guns |
Config.Ammo.boxes | 4 boxes | Each box's item, label, rounds, price and the guns it fits |
Config.Blips = {
normal = { sprite = 52, colour = 2, scale = 0.6, label = '24/7' },
hardware = { sprite = 402, colour = 46, scale = 0.6, label = 'Hardware Store' },
police = false,
weapons = { sprite = 110, colour = 1, scale = 0.6, label = 'Ammu-Nation' },
}
Config.EsxNames = {
water_bottle = 'water',
kurkakola = 'sprunk',
tosti = 'burger',
}
Blip kinds: normal, liquor, hardware, weedshop, gearshop, leisureshop, mechanic, police, ambulance, prison, blackmarket, weapons. Items missing on ESX are listed in the console on start.
Default ammunition boxes:
| Item | Label | Rounds | Price |
|---|---|---|---|
pistol_ammo | Pistol Rounds | 30 | 250 |
smg_ammo | SMG Rounds | 60 | 400 |
rifle_ammo | Rifle Rounds | 60 | 650 |
shotgun_ammo | Shotgun Shells | 20 | 500 |
shops.lua
One entry per shop:
| Field | What it does |
|---|---|
label | Shop name |
at | Where the clerk stands, vector4(x, y, z, heading) |
ped | Clerk model |
scenario | What the clerk is doing |
products | Which list in the products file it sells |
prompt | Prompt text |
job | Optional, list of jobs that may use it |
gang | Optional, list of gangs that may use it |
['police'] = {
label = 'Police Shop',
at = vector4(461.8498, -981.0677, 30.6896, 91.5892),
ped = 'mp_m_securoguard_01',
scenario = 'WORLD_HUMAN_COP_IDLES',
products = 'police',
prompt = 'Open Armory',
job = { 'police' },
},
Shops that sell weapons are dropped automatically when fusing-ammunation is running.
products.lua and products-esx.lua
One list per kind of shop. products.lua is used on QBCore, products-esx.lua on ESX. amount = -1 never runs out.
['normal'] = {
{ name = 'tosti', price = 2, amount = 50 },
{ name = 'water_bottle', price = 2, amount = 50 },
},
['weapons'] = {
{ name = 'weapon_pistol', price = 2500, amount = 5, info = { ammo = 30 } },
},
Lists: normal, liquor, hardware, weedshop, gearshop, leisureshop, mechanic, police, ambulance, prison, blackmarket, weapons. In the weapons list, firearm_licence is only stocked when a licence is required.