> For the complete documentation index, see [llms.txt](https://docs.hyper-code.eu/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyper-code.eu/documentation/blackmarket/config.md).

# Black Market – Configuration

All options in shared/config.lua of Black Market: framework, notifications, offer rotation, payment account, location, ped, blip, marker, items and style.

All settings are in `shared/config.lua`. This file is not escrowed. All options are fields of the `Config` table.

## Framework

```lua
Framework = "es_extended", -- or "qb-core"
```

Resource name of your framework. The script detects ESX via `getSharedObject` and QBCore via `GetCoreObject`.

## Notifications

```lua
ShowNotification = function(source, message, title, type)
    if IsDuplicityVersion() then -- server side
        TriggerClientEvent("hc_notify:notify", source, message, title, type, 3000)
    else -- client side
        exports['hc_notify']:notify(message, title, type, 3000)
    end
end,

ShowHelpNotification = function(message)
    exports['hc_notify']:helpNotify(message, 'E', -1)
end,
```

The example uses [Premium Notify](https://shop.hyper-code.eu/package/6496308) (`hc_notify`). Replace the calls with your own notification resource if you use something else.

## General

| Option                        | Default                                  | Description                                                                                                |
| ----------------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `DifferentItemCount`          | `3`                                      | How many different items are on offer at a time. Must not be higher than the number of entries in `Items`. |
| `Location`                    | `vector3(916.2878, -1201.0632, 25.8405)` | Interaction point. Players press **E** within 2 m.                                                         |
| `RefreshTime`                 | `1000 * 60 * 60`                         | Time between two offers in milliseconds (default 60 minutes)                                               |
| `AvailableItems.Min` / `.Max` | `8` / `10`                               | Global stock range. Used for items without their own `AvailableItems`.                                     |
| `AccountName`                 | `"black_money"`                          | Account players pay with                                                                                   |
| `IconPath`                    | `"nui://hc_inventory/html/dist/items/"`  | Folder with the item images. The UI loads `<IconPath><item name>.png`.                                     |

{% hint style="info" %}
Point `IconPath` to the image folder of your inventory with `nui://<resource>/<path>/`. The default points to `hc_inventory`.
{% endhint %}

## Ped, blip and marker

| Option                           | Default                                         | Description                           |
| -------------------------------- | ----------------------------------------------- | ------------------------------------- |
| `Ped.SpawnPed`                   | `true`                                          | Spawn a dealer ped                    |
| `Ped.Pos`                        | `vector4(916.2878, -1201.0632, 24.8405, 180.0)` | Ped position and heading              |
| `Ped.Model`                      | `"a_m_m_soucent_04"`                            | Ped model                             |
| `Blip.SpawnBlip`                 | `false`                                         | Show a blip at `Location`             |
| `Blip.Sprite` / `Color` / `Size` | `1` / `2` / `1.0`                               | Blip look                             |
| `Blip.Text`                      | `"BLACK MARKET"`                                | Blip name                             |
| `Marker.SpawnMarker`             | `true`                                          | Draw a marker                         |
| `Marker.DrawDistance`            | `10.0`                                          | Distance at which the marker is drawn |
| `Marker.Type`                    | `1`                                             | Marker type                           |
| `Marker.Pos`                     | `vector3(916.2878, -1201.0632, 24.8405)`        | Marker position                       |
| `Marker.Size`                    | `vector3(1.0, 1.0, 1.0)`                        | Marker size                           |
| `Marker.Color`                   | `{R = 255, G = 0, B = 0, A = 120}`              | Marker colour                         |

`Location`, `Ped.Pos` and `Marker.Pos` are separate. Move all three when you change the place.

## Items

```lua
Items = {
    {
        Type = "weapon",
        Name = "weapon_smg",
        Label = "SMG",
        Price = 13500,
        Chance = 8,
        AvailableItems = {
            Min = 3,
            Max = 10
        }
    },
    {
        Type = "item",
        Name = "tint_gold",
        Label = "Weapon Tint Gold",
        Price = 10999,
        Chance = 25,
        AvailableItems = {
            Min = 1,
            Max = 5
        }
    },
},
```

| Field            | Description                                                   |
| ---------------- | ------------------------------------------------------------- |
| `Type`           | `weapon` or `item`                                            |
| `Name`           | Weapon or item name. Also the image file name (`<Name>.png`). |
| `Label`          | Name shown in the shop and in the purchase notification       |
| `Price`          | Price per piece, taken from `AccountName`                     |
| `Chance`         | Chance in percent that this item is picked for the offer      |
| `AvailableItems` | Optional stock range (`Min`, `Max`) for this item             |

Every purchase buys one piece. Weapons are given without ammo.

Shipped items: SMG, Carbine Rifle, Weapon Tint Gold, Weapon Tint Pink, Micro SMG, Auto Shotgun, Pumpgun.

## Translations and style

* `Translation` contains every text of the UI and of the notifications. Keep placeholders like `%s`.
* `Config.Style` sets the two accent colours of the UI (`LightColor`, `DarkColor`). It is defined below the `Config` table.
