# Config Settings

## ⚙️ Config Settings

The `config.lua` file is the heart of frkn-cargoheist. It allows you to adjust almost every aspect of the resource, from loot rewards and police requirements to drone mechanics and language localization.

Below is a detailed breakdown of the available configuration options.

### 🛠️ Framework & Interaction

#### Target System

Define which targeting system your server uses.

```lua
targetSettings = {
    name = "qb-target", -- Options: 'qb-target' or 'ox_target'
    TargetText = { ... } -- Labels and icons for interaction menu
},
```

#### Items

Define the items required to start heists or use specific tools. Ensure these item names exist in your server's database/shared items.

* `cargo_tablet`: Used to open the contract menu.
* `drone_control`: Required for the drone phase.
* `parachute_heist`: Given to the player for the jump.

### 👮 Police & Dispatch

Control how and when the law gets involved.

```lua
PoliceControl = false, -- Set to true to require police online
PoliceCount = 3,       -- Minimum police required to start a contract
dispatchName = "frkn-dispatch", -- Options: "ps" (ps-dispatch) | "frkn-dispatch" | custom
```

### 📜 Contracts (Missions)

The `Contracts` table defines the different heist tiers available on the tablet. You can add more or modify existing ones.

| **Setting** | **Description**                                                 |
| ----------- | --------------------------------------------------------------- |
| `buyMoney`  | Crypto/Item cost to start the contract.                         |
| `earnMoney` | The payout received upon successful delivery.                   |
| `vehicles`  | The specific car models spawned inside the plane.               |
| `guards`    | The type, location, and weapons of NPC guards inside the plane. |
| `timeOut`   | Cooldown or time limit for the mission (in ms).                 |

Example Contract Config:

```lua
[3] = {
    name = "Cargo Heist - Expensive Cars",
    cargoType = "EXPENSIVE CARS",
    buyMoney = 80,       -- Cost to start
    earnMoney = 20000,   -- Payout
    vehicles = { ... },  -- List of vehicles to spawn
    guards = { ... }     -- List of guards inside
},
```

### 🎮 Minigames & Exports

This script relies on several exports for the hacking phases. Ensure you have these resources installed or mapped correctly in `Config.MinigameConfig`.

* `frkn-riddlegame`
* `frkn-sosgame`
* `frkn-stickgame`
* `frkn-lasergame`
* `frkn-planegame`

### 🚁 Drone Settings

You can fully customize the handling and abilities of the drone used during the heist.

* Abilities: Enable/Disable `nightvision`, `infared`, `tazer`, or `boost`.
* Stats: Adjust `speed`, `agility`, and `range`.
* Controls: Map specific keys to drone actions in the `Controls` table.

```lua
Drones = {
    [1] = {
        label = "Heist Drone",
        stats = { speed = 1.0, agility = 1.0, range = 100.0 },
        abilities = {
            infared = true,
            nightvision = true
        }
    }
}
```

### 📍 Locations & Scenes

* Truck: Coordinates where the transport truck spawns (`Truck` table).
* DeliveryLocations: The final drop-off points for the loot.
* Lasers: The start/end points of the laser beams inside the cargo plane. Edit with caution.
* heistData: Locations for the starting NPCs (The Dealer and the Grapeseed Gang).

### ⚔️ Attackers (Chase)

The `Attack` table controls the NPCs that chase the player after they land or during delivery.

* `vehicle`: Model of the enemy car.
* `ped`: Weapon, accuracy, and behavior of the attackers.

### 🌍 Localization (Lang)

All text displayed to the player can be translated in the `Lang` table.

* Error: Error messages (e.g., "Not enough money").
* Success: Success notifications.
* Info: General alerts and instructions.
* npcdialogText: The conversation text between the player and the mission givers.


---

# 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://docs.0resmon.org/0resmon/0resmon-1/frkn-resources/frkn-cargo-plane-heist/config-settings.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.
