# Setting up weapon shops on a FiveM server

> Set up Ammu-Nation weapon shops in FiveM: ox_inventory shop definitions, licences and serials, job-grade police armouries and black-market pricing.

Source: https://fam-tools.com/guides/fivem-weapon-shop-setup · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 11 min

**Short answer.** In ox_inventory, define shops in `data/shops.lua`: a name, a blip, an `inventory` list of items with `price` (plus optional `license`, `metadata`, `grade`, `currency`), and `locations` or `targets`. Use `metadata = { registered = true }` and `license = 'weapon'` for legal stores, `groups` for police armouries, and `metadata = { registered = false }` with `currency = 'black_money'` for the black market.

## Key points

- One shop = one entry in `ox_inventory/data/shops.lua`.
- `license = 'weapon'` gates an item; `grade = 3` requires a job grade.
- `groups` limits the whole shop to jobs (police armoury).
- `currency = 'black_money'` makes a shop accept dirty money.
- Price weapons against your economy, not against GTA’s single-player prices.

Where players get their guns shapes the whole server: a legal store with licences, a police armoury, and a black market with no serials each create a different kind of roleplay. With ox_inventory all three are entries in one data file; QBCore and ESX have their own shop resources built on the same ideas.

## A legal gun store

*ox_inventory/data/shops.lua*

```lua
Ammunation = {
    name = 'Ammunation',
    blip = { id = 110, colour = 69, scale = 0.8 },
    inventory = {
        { name = 'ammo-9', price = 5 },
        { name = 'WEAPON_KNIFE', price = 200 },
        { name = 'WEAPON_BAT', price = 100 },
        { name = 'WEAPON_PISTOL', price = 1000, metadata = { registered = true }, license = 'weapon' },
    },
    locations = {
        vec3(-662.180, -934.961, 21.829),
        vec3(810.25, -2157.60, 29.62),
        vec3(1693.44, 3760.16, 34.71),
    },
},
```

This mirrors ox_inventory’s default Ammu-Nation. `registered = true` stamps the buyer’s name and a serial on the gun, and `license = 'weapon'` requires a licence — see [serial numbers](https://fam-tools.com/guides/fivem-weapon-serial-numbers) and [weapon licences](https://fam-tools.com/guides/fivem-weapon-license-system).

## A police armoury

*ox_inventory/data/shops.lua*

```lua
PoliceArmoury = {
    name = 'Police Armoury',
    groups = { police = 0, sheriff = 0 },
    blip = { id = 110, colour = 84, scale = 0.8 },
    inventory = {
        { name = 'ammo-9', price = 5 },
        { name = 'WEAPON_STUNGUN', price = 500, metadata = { registered = true, serial = 'POL' } },
        { name = 'WEAPON_PISTOL', price = 500, metadata = { registered = true, serial = 'POL' }, license = 'weapon' },
        { name = 'WEAPON_CARBINERIFLE', price = 1000, metadata = { registered = true, serial = 'POL' }, license = 'weapon', grade = 3 },
    },
    locations = { vec3(451.51, -979.44, 30.68) },
},
```

`groups` restricts the shop to those jobs, and `grade = 3` keeps rifles for senior officers. The `POL` serial prefix makes issued weapons recognisable. A fuller armoury design is in [police armoury setup](https://fam-tools.com/guides/fivem-police-armory-setup).

## A black market

*ox_inventory/data/shops.lua*

```lua
BlackMarket = {
    name = 'Black Market',
    inventory = {
        { name = 'WEAPON_DAGGER', price = 5000, metadata = { registered = false }, currency = 'black_money' },
        { name = 'WEAPON_CERAMICPISTOL', price = 50000, metadata = { registered = false }, currency = 'black_money' },
    },
    locations = { vec3(309.09, -913.75, 56.46) },
},
```

No blip, dirty money only, and `registered = false` — so the guns carry no owner and no serial. Put it somewhere players have to discover, and move it occasionally.

## Locations vs targets

`locations` opens the shop with a key press at a point. `targets` defines a box for a targeting system such as ox_target, so players look at the counter and choose “Open shop”. Enable targeting in ox_inventory’s settings to use them.

## Pricing weapons for your economy

- Anchor prices to wages: how many hours of a legal job should a pistol cost?
- Make ammo a steady money sink; guns last, ammo does not.
- Price black-market guns higher than legal ones — the premium is anonymity.
- Combine with durability so weapons are not bought once and kept forever — see [weapon durability](https://fam-tools.com/guides/fivem-weapon-durability).

## QBCore and ESX shops

QBCore uses qb-shops (products and locations in its config) with qb-inventory; ESX servers use an ESX weapon shop resource or ox_inventory. The ideas — licence checks, job-restricted shops, pricing — are identical. If your server runs ox_inventory on either framework, use the ox_inventory shops above.

## Questions

### How do I add a weapon shop in ox_inventory?

Add an entry to `ox_inventory/data/shops.lua` with an `inventory` list of items and prices and one or more `locations`, then restart ox_inventory.

### How do I make a shop only for police?

Add `groups = { police = 0 }` to the shop. Use `grade` on individual items to restrict them further.

### How do I make a shop accept black money?

Set `currency = 'black_money'` on its items.

### How do I sell unregistered weapons?

Use `metadata = { registered = false }` on the item; ox_inventory then gives it no owner and no serial.

## Related

- https://fam-tools.com/guides/ox-inventory-shops-config
- https://fam-tools.com/guides/fivem-weapon-license-system
- https://fam-tools.com/guides/fivem-weapon-serial-numbers
- https://fam-tools.com/guides/fivem-police-armory-setup
