Shops, licences, armories and crafting
In short
Deciding who can obtain which weapon, where, and at what price is the strongest balance lever a server has. In ox_inventory all of it is shop configuration.
Ammunation = {
name = 'Ammunation',
blip = { id = 110, colour = 69, scale = 0.8 },
inventory = {
{ name = 'ammo-9', price = 5 },
{ name = 'WEAPON_PISTOL', price = 1000, metadata = { registered = true }, license = 'weapon' },
},
locations = { vec3(-662.18, -934.96, 21.82) },
},
PoliceArmoury = {
name = 'Police Armoury',
groups = { police = 0 },
inventory = {
{ name = 'WEAPON_COMBATPISTOL', price = 0, metadata = { registered = true, serial = 'POL' } },
{ name = 'WEAPON_CARBINERIFLE', price = 0, grade = 3, metadata = { registered = true, serial = 'POL' } },
},
locations = { vec3(451.51, -979.44, 30.68) },
},| Option | Effect |
|---|---|
license = 'weapon' | Only players with that licence can buy (ESX user_licenses, Qbox/QBCore metadata.licences) |
groups = { police = 0 } | Only that job (minimum grade) can open the shop |
grade = 3 | Rank requirement for one item |
currency = 'black_money' | Pay with another item |
count = 5 | Limited stock |
Crafting benches are defined in data/crafting.lua. A recipe takes ingredients, duration and count, and an ingredient with an amount below 1 is a tool: it loses durability instead of being used up. A stash with owner = true is a personal locker, and an evidence stash is where seized weapons are kept.