# Configuration

## Fivemanage[​](https://projecterror.dev/docs/npwd/start/installation/#fivemanage) <a href="#fivemanage" id="fivemanage"></a>

1. Create an account at [Fivemanage](https://fivemanage.com/)
2. After you have created an account or logged in, navigate to the [Token](https://www.fivemanage.com/dashboard/token) page and create a new token.
3. Copy the API token and add `setr external_blackmarket:key insert_token` to your `server.cfg`

### Webhook[​](https://projecterror.dev/docs/npwd/start/installation/#fivemanage) <a href="#fivemanage" id="fivemanage"></a>

1. Create an discord webhook
2. Add `setr external_blackmarket:webhook insert_link` to your `server.cfg`

## Config Setup

Configure the script based on your framework!

```lua
Config.Framework = 'esx'            --esx or qbcore
Config.Target = 'ox'                -- ox or qbcore
Config.Inventory = 'ox'             -- ox or qbcore
```

## Add New Points

1. Duplicate an existing entry and modify the number enclosed in square brackets, e.g., \[1], to designate the new point.

```lua
[2] = {
        coords = vector4(-1914.988, 2084.914, 140.38404, 171.63714),
        backupstartpos = {
            [1] = {
                startpoint = vector4(-1781.962, 1875.5399, 149.94836, 41.428062), --car start point
                endpoint = vector4(-1920.139, 2066.5681, 140.56163, 27.925649),   --car end point
                vehicle = "rs3s20",
                npcmodels = {
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                },
                weapons = { --weapons that the npc will have
                    'weapon_pistol',
                    'weapon_smg',
                }
            },
            [2] = {
                startpoint = vector4(-1764.945, 2076.9064, 120.36781, 132.18052), --car start point
                endpoint = vector4(-1902.415, 2059.8725, 140.82592, 355.20169),   --car end point
                vehicle = "rs3s20",
                npcmodels = {
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                },
                weapons = { --weapons that the npc will have
                    'weapon_pistol',
                    'weapon_smg',
                }
            },

            [3] = {
                startpoint = vector4(-1838.969, 1829.1687, 159.81881, 278.02224), --car start point
                endpoint = vector4(-1916.619, 2061.7031, 140.73641, 43.538276),   --car end point
                vehicle = "rs3s20",
                npcmodels = {
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                    "g_m_y_ballaeast_01",
                },
                weapons = { --weapons that the npc will have
                    'weapon_pistol',
                    'weapon_smg',
                }
            },


        }
    },

```

2. Adjust the "coords" field to specify the location of the new pickup point.
3. Populate the "backupstartpos" section with relevant data for the new pickup point, including start and end points, vehicle type, NPC models, and assigned weapons. (add as many you want)

## **Shop Location**

The shop location is random and can be expanded by adding more positions. Modify the "Config.Shop" parameter as follows:

```lua
Config.Shop = {
    {
        coords = { -- Random shop positions, new position generated on each resource/server restart.
            vector4(-1829.304, 786.85736, 142.86944, 29.52165),
            vector4(1083.752, -1283.728, 20.175382, 339.98135),
            vector4(87.992141, -726.8884, 33.133186, 300.94558),
            vector4(-13.99115, -212.6436, 46.176467, 130.2525),
            vector4(-131.6128, -1463.16, 33.822624, 232.19593)
        },
    }
}
```

To specify the item that reveals the shop's location, set:

```lua
Config.LocalizationItem = 'finder'  -- Item required to reveal the shop's location.
```

## **Shop Categories**

Create custom categories by inserting them into the "categories" section of "Config.Shop":

```lua
categories = {
    {
        id = "category_id",
        label = "Category Name"
    },
}
```

## **Shop Items**

Add items for sale in the shop by inserting them into the "items" section of "Config.Shop":

```lua
items = {
    {
        item = "item_spawncode",
        label = "Item Label",
        category = "category_id",
        price = 27000,
    },
}
```

## **Translation**

To change the language, define the language flag and phrases in "Config.Phrases":

```lua
Config.Language = 'custom_language'

Config.Phrases = {
    custom_language = {
        warnings = {
            "You've already collected your item, jerk",
            "There's nothing else to collect, move on",
            "If you continue like this, you'll end up with a bullet in your head, jerk",
        },
        general = {
            [1] = 'You got scammed, get out!',
            [2] = 'I marked the spot on the map, go there to retrieve your stuff!',
            [3] = 'Cooldown: Come back in %d:%d minutes.',
            [4] = 'The area is visible for the next 60 seconds!',
            [5] = 'Purchase failed, you don\'t have enough money',
            [6] = 'Purchase failed, you don\'t have enough space',
        },
        -- Other language-specific phrases...
    },
}
```

Feel free to adjust these configurations to suit your needs!

##
