Configuration

FileFor
config.luaTarget or key prompt, clerks, blips, ESX item names, weapon licence, ESX ammunition
shops.luaWhere each shop is, its clerk, and which job or gang may use it
products.luaWhat each kind of shop sells and for how much (QBCore)
products-esx.luaThe same, on ESX
install/items.luaThe weapon licence item, to copy into your items list

config.lua

OptionDefaultWhat it does
Config.DebugfalseConsole messages while setting up
Config.Use.how'target''target' (qb-target or ox_target) or 'gta' (walk up and press the key)
Config.Use.key51Key for the prompt: E, or d-pad right on a controller
Config.Use.near2.0How close you have to be
Config.Peds.within50.0Clerks spawn this close and go away further out
Config.Peds.invincibletrueClerks cannot be hurt
Config.Blipssee belowMap blip for each kind of shop; false for none
Config.EsxNamessee belowESX only: your item name for each QBCore name
Config.RequireWeaponLicenceon for ESX, off for QBCoreGun 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.WeaponLicencePrice5000Price of the licence; 0 stops it being sold
Config.Ammo.enabledon for ESX, off for QBCoreSell ammunition boxes that load your guns
Config.Ammo.boxes4 boxesEach 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:

ItemLabelRoundsPrice
pistol_ammoPistol Rounds30250
smg_ammoSMG Rounds60400
rifle_ammoRifle Rounds60650
shotgun_ammoShotgun Shells20500

shops.lua

One entry per shop:

FieldWhat it does
labelShop name
atWhere the clerk stands, vector4(x, y, z, heading)
pedClerk model
scenarioWhat the clerk is doing
productsWhich list in the products file it sells
promptPrompt text
jobOptional, list of jobs that may use it
gangOptional, 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.