# Stores configuration

Each store is an independent entry in the `Config.Stores` table inside `config.lua`. You can add as many stores as your server needs. Each store has its own NPCs, items, theme colour, job restriction, and blip.

## Store Fields Reference

| Field              | Type                | Required | Description                                                                                                              |
| ------------------ | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `id`               | string              | Yes      | Unique internal identifier. No spaces. Used as a database key and event prefix. Example: `'ammunation'`                  |
| `label`            | string              | Yes      | Display name shown in the UI header. Example: `'AMMUNATION ARSENAL'`                                                     |
| `theme`            | string (hex colour) | Yes      | Accent colour for the entire UI when this store is open. Example: `'#22c55e'`                                            |
| `job`              | string or nil       | No       | Job name required to interact with the boss NPC. Set to `nil` to allow any player to use the store.                      |
| `maxItemsPerOrder` | number or nil       | No       | Maximum number of different item types per order for this store. When omitted, falls back to `Config.MaxItemsSelection`. |

## Blip

Controls the minimap blip shown at the boss NPC location.

| Field     | Type    | Description                                              |
| --------- | ------- | -------------------------------------------------------- |
| `enabled` | boolean | Set to `false` to hide the blip                          |
| `sprite`  | number  | Blip sprite ID. See the FiveM blip reference for values. |
| `color`   | number  | Blip colour ID. See the FiveM blip reference for values. |
| `scale`   | number  | Blip size. Values between 0.1 and 1.5 are recommended.   |
| `label`   | string  | Text shown when hovering the blip on the map.            |

## Boss NPC

The NPC the store owner interacts with to open the shop management UI. Only players with the matching `job` (if set) will see the interaction option.

| Field    | Type    | Description                                                                   |
| -------- | ------- | ----------------------------------------------------------------------------- |
| `model`  | string  | GTA ped model name. Example: `'ig_dale'`                                      |
| `coords` | vector4 | World position and heading. Example: `vector4(16.81, -1110.54, 28.8, 250.15)` |

## Auto-Sell NPC

This NPC spawns at the listed coordinates when the store owner activates Auto Sell. Any player can interact with it to browse the stash and buy items.

| Field    | Type    | Description                |
| -------- | ------- | -------------------------- |
| `model`  | string  | GTA ped model name         |
| `coords` | vector4 | World position and heading |

## Supplier NPCs

A list of possible NPC spawn locations used during the weapon/item ordering mission. The server randomly picks one of these locations each time an order is placed. The player must travel there and interact with the NPC to complete the pickup.

```lua
supplierNPCs = {
    { model = 's_m_m_ammucountry', coords = vector4(-2285.80, 353.89, 173.60, 26.59) },
    { model = 's_m_m_ammucountry', coords = vector4( 2658.59, 1641.81, 23.83, 99.34) },
    -- add more locations here
},
```

## Items

The list of items available for order in this store. Each entry needs three fields:

| Field   | Type   | Description                                                                           |
| ------- | ------ | ------------------------------------------------------------------------------------- |
| `item`  | string | Internal item name matching your QBCore items list. Example: `'weapon_combatpistol'`  |
| `label` | string | Display name shown in the UI. Example: `'Combat Pistol'`                              |
| `price` | number | Base price in dollars. The auto-sell markup is applied on top of this when reselling. |

## Adding a New Store

Copy the following template and paste it inside the `Config.Stores = { }` table, after the last store and before the closing brace:

```lua
{
    id = 'mystore',
    label = 'MY STORE',
    theme = '#3b82f6', -- blue
    job = 'myjobnamehere',
    maxItemsPerOrder = 4,
    blip = {
        enabled = true,
        sprite = 110,
        color = 3,
        scale = 0.8,
        label = 'My Store',
    },
    bossNPC = {
        model = 'ig_dale',
        coords = vector4(0.0, 0.0, 0.0, 0.0),
    },
    autoSellNPC = {
        model = 's_m_y_ammucity_01',
        coords = vector4(0.0, 0.0, 0.0, 0.0),
    },
    supplierNPCs = {
        { model = 's_m_m_ammucountry', coords = vector4(0.0, 0.0, 0.0, 0.0) },
    },
    items = {
        { item = 'weapon_pistol', label = 'Pistol', price = 50000 },
    },
},
```

Replace the placeholder coordinates with real in-game positions and update the item list to match your server's items.

## Example: Two Stores

The default `config.lua` ships with two example stores:

* **ammunation** — Green theme, restricted to the `ammunation` job, sells weapons
* **smoking** — Orange theme, no job restriction, sells vape products and other goods


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mohssins.gitbook.io/mohscriptsdocs/moh-businesssystem/stores-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
