> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/gta-the-crane-job/configuration.md).

# Configuration

## cfg.lua Reference

Everything a server owner touches lives in `cfg.lua`. It sits outside escrow and every field carries a type annotation.

***

### cfg.bridge

One adapter per category. `'auto'` probes known resources in order, `false` turns the category off entirely.

| Category       | Values                                                                              |
| -------------- | ----------------------------------------------------------------------------------- |
| `framework`    | `auto`, `qb`, `esx`, `standalone`                                                   |
| `target`       | `auto`, `ox_target`, `qb-target`, `false`                                           |
| `notification` | `ox_lib`, `qb`, `esx`, `okokNotify`, `ps-ui`, `lation_ui`, `wasabi_notify`, `zsxui` |
| `textUI`       | `ox_lib`, `qb`, `esx`, `okokTextUI`, `jg-textui`                                    |
| `progressbar`  | `ox_lib`, `qb`, `esx`, `wasabi_uikit`, `lation_ui`, `zsxui`, `false`                |
| `vehiclelock`  | `auto`, `false`, plus 10 named key scripts                                          |
| `dispatch`     | `false`, plus 18 named dispatch / MDT resources                                     |

`qbx_vehiclekeys` is accepted as an alias for `qb-vehiclekeys`.

***

### cfg.heist

| Field                   | Default   | What it does                                               |
| ----------------------- | --------- | ---------------------------------------------------------- |
| `cooldownMinutes`       | `0`       | Server-wide gap between runs. `0` disables                 |
| `abandonMinutes`        | `25`      | Inactivity before a run is cancelled                       |
| `crew.min` / `crew.max` | `1` / `4` | Crew size needed to start, and the ceiling                 |
| `crew.inviteRadius`     | `6.0`     | How close an invite target must be                         |
| `crew.inviteSeconds`    | `30`      | How long an invite stays open                              |
| `sceneDistance`         | `200.0`   | Beyond this, players skip cinematics and see the end state |

#### start

```lua
cfg.heist.start.method = 'both'  -- 'npc' | 'c4' | 'both'
```

`npc` gates the job behind the fixer, `c4` behind blowing the office wall, `both` accepts either. The C4 path filters on explosion type (default `2`, sticky bomb) inside `c4.radius` of `cfg.scene.coords.wall`, so unrelated explosions do nothing.

#### rewards

```lua
cfg.heist.rewards = {
    money = { min = 22000, max = 41000 },
    items = {
        { name = 'goldbar', min = 1, max = 3, chance = 100 },
        { name = 'rolex',   min = 1, max = 2, chance = 45 },
        { name = 'diamond', min = 1, max = 1, chance = 20 },
    },
}
```

Money is rolled **per crew member**, not split. Items roll independently per member against `chance` (out of 100).

#### tow

| Field           | Default | What it does                                     |
| --------------- | ------- | ------------------------------------------------ |
| `ropeItem`      | `false` | Item consumed on attach. `false` skips the check |
| `attachSeconds` | `6`     | Progress bar length                              |
| `ropeLength`    | `11.0`  | Metres between car and chest                     |
| `dropoff`       | vec4    | Where the chest has to end up                    |
| `dropoffRadius` | `12.0`  | How close counts                                 |

{% hint style="info" %}
If `ropeItem` is set and the run is aborted after attaching, the rope is refunded to whoever spent it.
{% endhint %}

#### dispatch and blip

`cfg.heist.dispatch.enabled` fires a police alert when the run starts. It needs `cfg.bridge.dispatch` set to a real adapter; if it is `false` the console warns you on startup that the alert goes nowhere.

`cfg.heist.blip` controls the map blip for the yard.

***

### cfg.scene

The cinematic half of the job.

#### anim

| Field         | Default | What it does                                |
| ------------- | ------- | ------------------------------------------- |
| `manualReach` | `true`  | Crew drives the arm into the office by hand |
| `manualCarry` | `true`  | Crew drives the vault out by hand           |
| `extendKey`   | `172`   | Arrow up                                    |
| `retractKey`  | `173`   | Arrow down                                  |
| `rate`        | `0.5`   | Playback speed when a leg is automatic      |

Set either flag to `false` and that leg plays as a timed cutscene instead. With both `false` the whole lift runs itself.

#### delivery

The flatbed hand-off at the car park: the bed slides back, tips down, and the crane rolls off. `bedSlideMs`, `bedDropMs`, `bedSettleMs`, `descendMs` and `clearAfterMs` control the timing; `bedRaised`, `bedSlide` and `bedDrop` are offsets relative to the truck chassis.

Set `cfg.scene.delivery.enabled = false` to skip the whole fetch chain. The crane is then already on its spot and the run opens at the parking stage.

***

### cfg.blackMoney

How the payout is delivered.

```lua
cfg.blackMoney = {
    type        = 'item',        -- 'item' | 'account' | 'markedbills'
    item        = 'black_money',
    account     = 'black_money',
    metadataKey = 'worth',
}
```

| Type          | Behaviour                                              |
| ------------- | ------------------------------------------------------ |
| `item`        | Adds `item` with count equal to the amount             |
| `account`     | Adds to the framework money account named in `account` |
| `markedbills` | Adds one item carrying the amount under `metadataKey`  |

***

### cfg.police

```lua
cfg.police = {
    requiredCount = 0,
    jobs          = { 'police', 'sasp', 'bcso', 'sheriff' },
    countMethod   = 'fast',
}
```

`requiredCount = 0` disables the check. `fast` reads the framework's cached count, `scan` iterates online players (slower, always accurate).

***

### cfg.interaction

The `[E]` prompt drawn in the world when no target script is used: control id, label text, and the background / text colours.

***

### cfg.retention

```lua
cfg.retention = { logs = 30 }
```

Days of run history to keep in `rm_cranejob_runs`. Pruned on every start. `0` keeps everything.

***

### cfg.dev

Leave it `false` on a live server. It only gates development commands and has no effect on the job itself.
