# moh-shop — Configuration

All settings live in `config.lua`.

### Core & Framework

```
Config.CoreName       = 'qb-core'   -- your QBCore export name
Config.ZoneScriptName = 'moh-zone'  -- export name of the zone resource
```

| Key              | Default  | Description                                                                                |
| ---------------- | -------- | ------------------------------------------------------------------------------------------ |
| `CoreName`       | qb-core  | The export name of your QBCore resource. Change if renamed on your server (e.g. qbx-core). |
| `ZoneScriptName` | moh-zone | The resource name of moh-zone. Used to call `IsZoneActive()` and `IsPlayerInRedZone()`.    |

### Database

```
Config.Database = {
    TableName       = 'player_coins',
    AutoCreateTable = true,
}
```

| Key               | Default       | Description                                          |
| ----------------- | ------------- | ---------------------------------------------------- |
| `TableName`       | player\_coins | Must match `Config.DBTable` in moh-zone config       |
| `AutoCreateTable` | true          | Create the SQL table on startup if it does not exist |

### Shop Settings

```
Config.Shop = {
    Command        = 'redzoneshop',
    BlockInRedZone = true,
    PurchaseDelay  = 500,
}
```

| Key              | Default     | Description                                                                              |
| ---------------- | ----------- | ---------------------------------------------------------------------------------------- |
| `Command`        | redzoneshop | Command players type to open the shop NUI                                                |
| `BlockInRedZone` | true        | Block the shop while the zone is active. Calls `exports[ZoneScriptName]:IsZoneActive()`. |
| `PurchaseDelay`  | 500         | Milliseconds to wait before refreshing the coin display after a purchase                 |

### Item Images

Item images are loaded from your inventory resource's NUI assets. Set the base path to match your inventory.

```
Config.Images = {
    BasePath    = 'nui://qs-inventory/html/images',
    Extension   = '.png',
    Placeholder = 'nui://qs-inventory/html/images/placeholder.png',
}
```

Common base paths by inventory:

| Inventory     | BasePath                         |
| ------------- | -------------------------------- |
| qs-inventory  | `nui://qs-inventory/html/images` |
| ox\_inventory | `nui://ox_inventory/web/images`  |
| qb-inventory  | `nui://qb-inventory/html/images` |
| ps-inventory  | `nui://ps-inventory/html/images` |

Set `Placeholder` to an empty string `""` to hide broken images instead of showing a fallback.

### Inventory Compatibility

The shop auto-detects the active inventory at startup. Only change `System` if auto-detection picks the wrong one.

```
Config.Inventory = {
    System       = "auto",
    ItemBoxEvent = "auto",
}
```

| System value      | Inventory resource                   |
| ----------------- | ------------------------------------ |
| `auto`            | Auto-detect at runtime (recommended) |
| `ox_inventory`    | ox\_inventory (overextended)         |
| `qs-inventory`    | qs-inventory (quasar)                |
| `qb-inventory`    | Default QBCore inventory             |
| `ps-inventory`    | project-sloth inventory              |
| `codem-inventory` | codem inventory                      |
| `lj-inventory`    | lj-inventory                         |
| `origen_police`   | origen inventory                     |

Set `ItemBoxEvent = "none"` to disable the item-received popup after purchase.

### Notifications

```
Config.Notifications = {
    UseOxLib = false,
    Event    = 'QBCore:Notify',
}
```

| UseOxLib | Effect                                                                  |
| -------- | ----------------------------------------------------------------------- |
| false    | Uses the event in `Config.Notifications.Event` (default: QBCore:Notify) |
| true     | Uses ox\_lib notify on client and `ox_lib:notify` event on server       |

### Leaderboard

```
Config.Leaderboard = {
    Limit = 10,
}
```

The leaderboard is fetched from the database every time the shop opens, ordered by `total_kills DESC`. Online players have their name resolved live; offline players are fetched from the `players` table.

### Permissions

```
Config.Permissions = {
    AdminPermission = 'admin',
}
```

This QBCore permission group is required to use the `/addrzcoins` admin command.


---

# 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-redzone/moh-shop-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.
