> 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/installation.md).

# Installation

## Installation

### 1. Requirements

| Required             | Notes                                                           |
| -------------------- | --------------------------------------------------------------- |
| `ox_lib` 3.30.0+     | Hard dependency                                                 |
| `oxmysql` 2.10.0+    | Run logging and the cooldown                                    |
| Framework            | Qbox, QBCore, ESX, or standalone                                |
| K4MB1 rope-heist map | Provides the `k4mb1_rope_h_*` IPLs, crane props and vault chest |
| OneSync              | The flatbed, forklift and vault are server-spawned              |

Optional but recommended: `ox_target` or `qb-target`. Without one, the fixer and the buyer fall back to an `[E]` prompt.

***

### 2. Drop in the resource

Place `rm_cranejob` in your resources folder and start it **after** its dependencies and after the map:

```cfg
ensure ox_lib
ensure oxmysql
ensure ox_target
ensure <your rope-heist map resource>
ensure rm_cranejob
```

{% hint style="warning" %}
The map must load first. `rm_cranejob` requests the crane and vault IPLs by name at runtime; if the map is not started, the office stays sealed and the crane never appears. The map's folder name depends on your copy, so use whatever it is called in your `resources` folder.
{% endhint %}

***

### 3. Database

Nothing to import. On the first start, `rm_cranejob_runs` is created automatically and old rows are pruned according to `cfg.retention.logs`.

***

### 4. Items

Add the reward items to your inventory. Ready-made lists are in the `[items]` folder:

| File                       | For                        |
| -------------------------- | -------------------------- |
| `items - ox_inventory.lua` | ox\_inventory              |
| `items - qb shared.lua`    | qb-core `shared/items.lua` |
| `items.sql`                | ESX item table             |

| Item          | Used for                                        |
| ------------- | ----------------------------------------------- |
| `black_money` | The payout, when `cfg.blackMoney.type = 'item'` |
| `goldbar`     | Reward roll                                     |
| `rolex`       | Reward roll                                     |
| `diamond`     | Reward roll                                     |
| `rope`        | Only if you set `cfg.heist.tow.ropeItem`        |

{% hint style="info" %}
Most servers already have `black_money`. Add it only if yours does not.
{% endhint %}

***

### 5. Pick your adapters

Open `cfg.lua` and set `cfg.bridge` to match your server:

```lua
cfg.bridge = {
    framework    = 'auto',
    target       = 'auto',
    notification = 'ox_lib',
    textUI       = 'ox_lib',
    progressbar  = 'ox_lib',
    vehiclelock  = 'auto',
    dispatch     = false,
}
```

`'auto'` probes the known resources in order. Anything set to `false` is skipped and its calls become no-ops. See cfg.lua Reference for the full lists.

{% hint style="danger" %}
If you name an adapter that never registers, the console prints `cfg.bridge.<category> = <name> but no adapter registered`. Fix the name, or that whole category will silently do nothing.
{% endhint %}

***

### 6. Discord logging (optional)

Webhooks live in `server/discord_log.lua`, never in `cfg.lua`. `cfg.lua` is a shared file and anything in it reaches clients.

```lua
local config = {
    username       = 'rm_cranejob',
    avatarUrl      = nil,
    defaultWebhook = 'https://discord.com/api/webhooks/...',
    webhooks       = {},
}
```

Leave it as `WEBHOOK_HERE` to keep logging off. Every finished or abandoned run posts an embed with the leader identifier, crew size and payout.

***

### 7. Production check

Before you go live, in `cfg.lua`:

```lua
cfg.dev = false
```

Then start the server and confirm the console is clean. Walk to the fixer, and the `[E] Talk` prompt (or the target option) should be there.
