> For the complete documentation index, see [llms.txt](https://tk-scripts.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://tk-scripts.gitbook.io/docs/tk_boosting/config.md).

# Config

Every option in the Boosting config for a FiveM server, with its default and what it changes.

All options are in `config.lua`. A time written as `1000 * 60 * 2` is in milliseconds; its last number is minutes.

## General

| Option                      | Default                           | What it does                                                                                                                                    |
| --------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Framework`          | `'esx'`                           | `'esx'` or `'qb'`. Qbox uses `'qb'`.                                                                                                            |
| `Config.NotificationType`   | `'esx'`                           | `'esx'`, `'qb'` or `'mythic'`. Other systems go in `Notify` (see [Editable functions](#editable-functions)).                                    |
| `Config.Locale`             | `'en'`                            | Language file from `locales/`: `'en'`, `'fi'` or `'pl'`.                                                                                        |
| `Config.DebugMode`          | `false`                           | Prints debug lines and skips the lockpick and tracker minigames. Keep it `false` on a live server.                                              |
| `Config.UseOxInventory`     | `false`                           | On ESX, gives `WEAPON_` shop items as inventory items instead of weapons. Set `true` with ox\_inventory.                                        |
| `Config.UseOxLib`           | `false`                           | Uses ox\_lib text UI. Needs `'@ox_lib/init.lua'` uncommented in `fxmanifest.lua`.                                                               |
| `Config.UseOxTarget`        | `false`                           | Uses `ox_target` on the shop NPC instead of a key prompt.                                                                                       |
| `Config.TargetInteractDist` | `2.0`                             | ox\_target distance on the shop NPC.                                                                                                            |
| `Config.Dispatch`           | `''`                              | Sends a police call when a contract car is lockpicked: `'tk'` (tk\_dispatch) or `'cd'` (cd\_dispatch). Other scripts go in `VehicleLockpicked`. |
| `Config.InteractKey`        | `38`                              | [Control ID](https://docs.fivem.net/docs/game-references/controls/) for the shop, delivery and VIN scratch prompts.                             |
| `Config.ImagePath`          | `'nui://ox_inventory/web/images'` | Item images in the tablet shop. qb-inventory: `'nui://qb-inventory/html/images'`.                                                               |
| `Config.PoliceJobs`         | `{police = 0}`                    | Job name and minimum grade that count as police for `policeNeeded`, tracker blips and delivery checks.                                          |

## Tablet and items

| Option                        | Default                               | What it does                                                                                                  |
| ----------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `Config.Command.enable`       | `false`                               | Adds the [boostingtablet](https://tk-scripts.gitbook.io/docs/tk_boosting/commands.md#boostingtablet) command. |
| `Config.Command.needItem`     | `true`                                | Not read by the command: `/boostingtablet` opens the tablet without the item.                                 |
| `Config.TabletAnim`           | tablet animation and `prop_cs_tablet` | Animation and prop while the tablet is open: `dict`, `name`, `model`.                                         |
| `Config.TabletItem`           | `'boosting_tablet'`                   | Usable item that opens the tablet. A table, `{'item1', 'item2'}`, registers several.                          |
| `Config.LockpickItem`         | `'boosting_lockpick'`                 | Usable item that lockpicks the contract car.                                                                  |
| `Config.GPSItem`              | `'boosting_gps'`                      | Usable item that hacks the tracker from inside the car.                                                       |
| `Config.LockpickRemoveChance` | `{success = 25, fail = 50}`           | Percent chance the lockpick is used up after a successful or failed lockpick.                                 |
| `Config.RemoveVehOnCancel`    | `false`                               | Deletes the contract car when the contract is cancelled.                                                      |
| `Config.MaxGroupMembers`      | `4`                                   | Players in one boosting group.                                                                                |

## Contracts

Keys of `Config.Contracts`:

| Option                         | Default                        | What it does                                                                                   |
| ------------------------------ | ------------------------------ | ---------------------------------------------------------------------------------------------- |
| `generateTime`                 | 0.5 to 1 minute                | Time between new contracts while the player is in the queue.                                   |
| `maxAmount`                    | `5`                            | Contracts a player can hold at once.                                                           |
| `maxTransferDist`              | `10`                           | Metres between players to transfer a contract.                                                 |
| `auctionTime`                  | `60`                           | Minutes a contract stays on auction.                                                           |
| `guardRespawn.enable`          | `true`                         | NPC guards, spawned when the lockpick starts, can spawn again.                                 |
| `guardRespawn.time`            | 2 minutes                      | Wait before guards can spawn again.                                                            |
| `engineHealthRewardMultiplier` | `{money = 0.5, credits = 0.5}` | Share of the reward paid for a car with a destroyed engine; a car without damage pays in full. |
| `rewardAccount`                | `'bank'`                       | Account that receives reward money.                                                            |

Two related options sit outside it:

| Option                          | Default | What it does                                                                                                   |
| ------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
| `Config.SetVehicleDataDist`     | `80`    | The contract car spawns, with its mods, when a group member comes within this many metres of its spawn point.  |
| `Config.SpawnVehicleClientSide` | `false` | Spawns the contract car on a player's client instead of the server. Set `true` if contract cars do not appear. |

## Tracker hacking

| Option                              | Default | What it does                                                                |
| ----------------------------------- | ------- | --------------------------------------------------------------------------- |
| `Config.EnableTrackerSound`         | `true`  | Beeps for players in the car each time the tracker sends its position.      |
| `Config.Hacking.minSpeed`           | `15`    | Minimum car speed for a tracker hack, in metres per second (15 is 54 km/h). |
| `Config.Hacking.resetOnFail.normal` | `false` | A failed hack resets the hack count on normal contracts.                    |
| `Config.Hacking.resetOnFail.vin`    | `true`  | A failed hack resets the hack count on VIN scratch contracts.               |

## Blips

Keys of `Config.Blips`. Colours and sprites are [blip IDs](https://docs.fivem.net/docs/game-references/blips/).

| Option         | Default                                        | What it does                                                                      |
| -------------- | ---------------------------------------------- | --------------------------------------------------------------------------------- |
| `deliveryBlip` | enabled, colour `1`, scale `0.8`, sprite `523` | Delivery point blip. `setWaypoint = true` also sets a waypoint to it.             |
| `areaBlip`     | radius `250.0`, colour `1`, alpha `100`        | Search area around the contract car. A class's `areaRadius` overrides the radius. |
| `trackerBlip`  | enabled, colour `1`, scale `0.8`, sprite `523` | Stolen car blip that police see while the tracker is on.                          |

## Delivery and VIN scratch

| Option                          | Default                    | What it does                                                                                                 |
| ------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `Config.Delivery.pedModels`     | four gang models           | Ped that takes the car at the delivery point.                                                                |
| `Config.Delivery.minPoliceDist` | `50`                       | Metres: no police may be this close when the car is delivered or its VIN scratched. `0` turns the check off. |
| `Config.Delivery.minPointDist`  | `1000`                     | Minimum metres from the player to the delivery point.                                                        |
| `Config.VinScratch.coords`      | four spots                 | VIN scratch spots, each with `coords` and `dist`.                                                            |
| `Config.VinScratch.anim`        | kneel animation, `5000` ms | Animation and length of the VIN scratch.                                                                     |
| `Config.VinScratch.dist`        | `2`                        | Metres from the car to start the scratch.                                                                    |
| `Config.LockpickAnim`           | `missheistfbisetup1`       | Animation while lockpicking.                                                                                 |
| `Config.LockpickDist`           | `2`                        | Metres from the car to lockpick it.                                                                          |
| `Config.GiveAnim`               | `mp_common`                | Animation when the shop NPC hands over orders.                                                               |

## Shop

Keys of `Config.Shop`:

| Option           | Default                                          | What it does                                              |
| ---------------- | ------------------------------------------------ | --------------------------------------------------------- |
| `enable`         | `true`                                           | Shop tab on the tablet and the NPC that hands out orders. |
| `coords`         | `vec4(-2007.6449, 543.2694, 109.1625, 165.7001)` | NPC position and heading.                                 |
| `model`          | `` `a_m_y_soucent_02` ``                         | NPC model.                                                |
| `items`          | five items                                       | Items for sale.                                           |
| `enableWaypoint` | `true`                                           | Sets a waypoint to the NPC after an order.                |

Each entry in `items`:

```lua
{name = 'boosting_gps', amount = 1, price = {money = 0, credits = 150}, xp = 100},
```

`amount` is the count per purchase, `xp` the XP needed to see the item. Money comes from the bank account.

## Classes

`Config.Classes` lists the classes from lowest to highest; the order sets the player's level. Fields of each class:

| Field             | What it does                                                                                                                                |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `class`           | Class name. Must match a key in `Config.Vehicles`.                                                                                          |
| `time`            | Minutes a contract stays in the list before it expires.                                                                                     |
| `xp`              | `required`: XP to get this class. `get`: XP for a completed contract.                                                                       |
| `rewardsForAll`   | Per `xp`, `money`, `credits` and `items`: true gives it to every group member; false gives it only to the player who accepted the contract. |
| `multiplyRewards` | Per reward: true gives each member the full amount; false splits it by group size.                                                          |
| `chance`          | Percent chance this class is picked when a contract is made.                                                                                |
| `hack.cooldown`   | Seconds between tracker hacks.                                                                                                              |
| `hack.needed`     | `min` and `max` hacks to disable the tracker. `0` skips the tracker.                                                                        |
| `alert.chance`    | Percent chance police see the tracker blip.                                                                                                 |
| `alert.interval`  | Milliseconds between tracker updates.                                                                                                       |
| `alert.timeAdd`   | Milliseconds added to the interval per successful hack.                                                                                     |
| `policeNeeded`    | Police online for this class to be offered and accepted.                                                                                    |
| `price`           | `min` and `max` credits to start the contract.                                                                                              |
| `reward`          | `money` and `credits` ranges, plus optional `items`.                                                                                        |
| `areaRadius`      | Radius of the search area blip.                                                                                                             |
| `npcs`            | Guards: `amount`, `models`, `weapons`, `accuracy`, `armor`, `wait` (milliseconds between spawns) and `dist` from the car.                   |
| `mods`            | `chance` the car spawns modified, and the [mod types](https://docs.fivem.net/natives/?_0x6AF0636DDEDCB6DD) in `nums`.                       |
| `vinScratchPrice` | Optional. Adds VIN scratch contracts to this class, paid in bank money and credits.                                                         |
| `maxPerRestart`   | Optional. Contracts of this class each player can get per server restart.                                                                   |

The optional fields have this shape (examples ship commented out in class `D`):

```lua
reward = {
    money = {min = 25, max = 100},
    credits = {min = 1, max = 3},
    items = {
        totalAmount = 10,
        itemList = {
            {name = 'boosting_lockpick', min = 1, max = 1, chance = 50},
        },
    },
},
vinScratchPrice = {
    money = {min = 500, max = 1000},
    credits = {min = 10, max = 20},
},
maxPerRestart = 1,
```

Default classes:

| Class | XP required | XP per contract | Price (credits) | Police needed | Hacks    | Per restart |
| ----- | ----------- | --------------- | --------------- | ------------- | -------- | ----------- |
| D     | 0           | 1               | 0               | 0             | 0 to 1   |             |
| C     | 10          | 2               | 1 to 3          | 0             | 1 to 3   |             |
| B     | 100         | 3               | 30 to 55        | 1             | 2 to 5   |             |
| B+    | 200         | 3               | 60 to 65        | 2             | 3 to 7   |             |
| A     | 1000        | 10              | 180 to 300      | 2             | 2        |             |
| A+    | 1500        | 12              | 300 to 500      | 2             | 5 to 8   | 3           |
| S     | 3500        | 15              | 600 to 850      | 3             | 8 to 13  | 2           |
| S+    | 10000       | 20              | 1000 to 1200    | 3             | 13 to 15 | 1           |

## Vehicles, colours and locations

| Option                  | What it does                                                                                                                          |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Config.Vehicles`       | Spawn names per class, keyed by the `class` name. A model the game cannot load is skipped.                                            |
| `Config.Colors`         | Colour `index` and `label` a contract car can get.                                                                                    |
| `Config.VehCoords`      | Spawn points for contract cars as `vec4`. An entry `{coords = vec4(...), pedCoords = {vec3(...)}}` also fixes where its guards spawn. |
| `Config.DeliveryCoords` | Delivery points as `vec4`.                                                                                                            |

## Editable functions

| File                                                 | Function                                                             | When it runs                                       | What to put there                                                                                      |
| ---------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `client/main_editable.lua`                           | `Notify(text, notifyType)`                                           | The client shows a notification.                   | Another notification system.                                                                           |
| `client/main_editable.lua`                           | `ShowTextUI(text)`, `HideTextUI()`                                   | A prompt shows or hides on QBCore or with ox\_lib. | Another text UI.                                                                                       |
| `client/main_editable.lua`                           | `GenerateVehiclePlate()`                                             | A contract is made.                                | Your plate format. Default: 2 digits, 3 letters, 3 digits.                                             |
| `client/main_editable.lua`                           | `CanAcceptContract(contract)`                                        | A player accepts a contract.                       | Your own checks. Return `false` to block.                                                              |
| `client/main_editable.lua`                           | `VehicleLockpicked(vehEntity, hasTracker)`                           | A contract car is lockpicked.                      | A dispatch script not in `Config.Dispatch`.                                                            |
| `client/main_editable.lua`                           | `LockpickMinigame()`, `TrackerMinigame()`                            | A lockpick or tracker hack starts.                 | Another minigame. Return `true` on success.                                                            |
| `client/main_editable.lua`                           | `VehicleVinScratched(vehNetId, vehProps)`                            | A VIN scratch finishes, on ESX.                    | Your garage code. Default: triggers `esx_vehicleshop:setVehicleOwned`.                                 |
| `server/main_editable.lua`                           | `Webhook(message)`                                                   | Contracts, auctions, orders and cheat checks.      | Your Discord webhook URL in `webhookLink`. Empty in the download: no logs until you add it.            |
| `server/main_editable.lua`                           | `GroupVehicleLockpicked(playerId, vehEntity)`                        | For each group member after a lockpick, on QBCore. | Your keys script. Default: `qb-vehiclekeys`; a commented-out `qbx_vehiclekeys` line is there for Qbox. |
| `server/main_editable.lua`                           | `VinScratched(playerId, vehNetId, vehProps, vehName)`                | A VIN scratch finishes, on QBCore.                 | Your garage code. Default: adds the car to `player_vehicles` in `pillboxgarage`.                       |
| `server/main_editable.lua`                           | `ContractStarted`, `ContractCanceled`, `ContractFinished`            | A contract starts, is cancelled or is delivered.   | Your own code, with `playerId` and `contractData`. Empty in the download.                              |
| `server/main_editable.lua`                           | `GetPlayerXP`, `AddPlayerXP`, `GetPlayerCredits`, `AddPlayerCredits` | XP or credits are read or changed.                 | Your own storage. Default: the server's resource key-value store.                                      |
| `client/frameworks/*.lua`, `server/frameworks/*.lua` | Framework functions                                                  | Always.                                            | Changes for a custom framework.                                                                        |
