> For the complete documentation index, see [llms.txt](https://oph3zdev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oph3zdev.gitbook.io/docs/paid-scripts/inventory/configuration/shops.md).

# Shops

Everything in <mark style="color:$primary;">config/shops.lua</mark>. Each entry in `Config.Shops` is one shop that can exist at several locations. Stock is shared between them and updates live for everyone. Whether shops use the basket checkout or the classic per item popup is set with `Config.ShopBasket` in <mark style="color:$primary;">config/config.lua</mark>, and admins can also create and edit shops live from the admin panel's World tab.

### A shop

The full shape of one shop. Every field is explained below.

```lua
Config.Shops = {
    market = {
        label = "24/7 Market",
        ped = { toggle = true, model = "mp_m_shopkeep_01" },
        allowBank = true,
        blip = {
            enabled = true,
            sprite = 52,
            color = 2,
            scale = 0.7,
            display = 4,
            shortRange = true,
            label = "24/7 Market"
        },
        locations = {
            vector4(24.51, -1347.17, 29.5, -89.35)
            -- one vector4 per location
        },
        items = {
            { name = "water_bottle", price = 10 },
            { name = "bandage", price = 40, stock = 20, restock = 300 },
            { name = "bag", price = 850, stock = 5, restock = 600 }
        }
    }
}
```

### Shop fields

The name shown on the shop panel.

```lua
label = "24/7 Market"
```

Who stands at the shop. `toggle = true` spawns an NPC with that ped model, `toggle = false` shows a marker instead.

```lua
ped = { toggle = true, model = "mp_m_shopkeep_01" }
```

`true` = players can also pay by card from their bank. `false` = cash only, like the black market.

```lua
allowBank = true
```

Where the shop exists. One `vector4` per location - x, y, z and which way the ped faces. All locations share the same stock.

```lua
locations = {
    vector4(24.51, -1347.17, 29.5, -89.35),
    vector4(-3038.88, 584.56, 7.91, 380.2)
}
```

### Blip

The map blip for every location of the shop. Leave the block out or set `enabled = false` for a shop that should stay off the map, like the black market. Sprite and colour ids are listed at [docs.fivem.net/docs/game-references/blips](https://docs.fivem.net/docs/game-references/blips).

* `sprite` / `color` / `scale` - the icon, its colour and size.
* `display` - `4` = map and minimap, `2` = map only.
* `shortRange` - `true` = only visible on the minimap when close.
* `label` - name on the map, defaults to the shop label.

```lua
blip = {
    enabled = true,
    sprite = 52,
    color = 2,
    scale = 0.7,
    display = 4,
    shortRange = true,
    label = "24/7 Market"
}
```

### Items

What the shop sells. Only `name` and `price` are required.

* `name` - item name from `items.lua`.
* `price` - price per unit.
* `stock` - limited stock, shared across all locations. Leave it out for unlimited.
* `restock` - seconds until a sold out item comes back to full stock.
* `job` + `minGrade` - only players with that job (and at least that grade) can buy the item.
* `metadata` - stamped onto the bought item, e.g. a blueprint that knows its recipe.

```lua
items = {
    { name = "water_bottle", price = 10 },
    { name = "bandage", price = 40, stock = 20, restock = 300 },
    { name = "radio", price = 250, job = "police", minGrade = 0 },
    { name = "blueprint", price = 5000, stock = 2, restock = 1800, metadata = { station = "workshop", recipe = "extended_clip", label = "Blueprint: Extended Clip", rarity = "rare" } }
}
```

`true` = prices scale with the item's rarity tier (uses the multipliers from `config/rarity.lua`).

```lua
rarityPricing = false
```

### Shipped shops

The resource ships with five example shops you can edit or replace: **24/7 Market** (food and basics, 10 locations), **Ammu-Nation** (pistol, ammo, attachments, weapon paints, a blueprint - 9 locations), **Liquor Store** (drinks and party items, 7 locations), **YouTool** (tools, 1 location) and a **Black Market** (high priced heist gear, cash only, no blip, 1 location).
