> 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/bank-truck-robbery-4-in-1/installation.md).

# Installation

{% stepper %}
{% step %}

### Install the dependencies

{% hint style="info" %}
Make sure everything on the [Dependencies](/resources/bank-truck-robbery-4-in-1/dependencies.md) page is installed and starting **before** this resource.
{% endhint %}
{% endstep %}

{% step %}

### Add the resource

Download the package from [Portal](https://portal.cfx.re/assets/granted-assets), unzip it, and put the `rm_banktruckrobbery` folder in your server's `resources` directory. Do **not** rename the folder.
{% endstep %}

{% step %}

### Add the items

The `[items]` folder inside the resource contains ready-made definitions for the three placeable devices (`bt_c4`, `bt_hackdevice`, `bt_gastank`) and the drill (`WEAPON_DRILL`):

* **ox\_inventory:** merge `items - ox_inventory.lua` into `ox_inventory/data/items.lua` and `weapons - ox_inventory.lua` into `ox_inventory/data/weapons.lua`, then copy the images from `rm_banktruckrobbery/assets/images/` into `ox_inventory/web/images/`.
* **qb-core / Qbox:** merge `items - qb-core.lua` and `weapons - qb-core.lua` into your shared items/weapons files and copy the images into your inventory's image folder.
* **ESX:** run `esx_items.sql`.

{% hint style="warning" %}
The three devices must stay usable from the inventory. The shipped ox\_inventory definitions already point at the right client event; if you write your own, keep `client.event = 'rm_banktruck:client:itemUsed'`.
{% endhint %}
{% endstep %}

{% step %}

### Start the resource

Add it to your `server.cfg`, below `ox_lib`, `rm_tools` and your framework so the dependencies are already running:

```cfg
ensure ox_lib
ensure qb-core # your framework
ensure rm_tools
ensure rm_banktruckrobbery
```

{% endstep %}

{% step %}

### Configure it

Open `cfg.lua` and the files under `data/`. Every option is annotated in place; [Configuration](/resources/bank-truck-robbery-4-in-1/configuration.md) covers the ones worth knowing about.
{% endstep %}
{% endstepper %}

## Updating

Replace the whole folder, then carry your own edits back into the new one. Only these files are meant to be edited, and only these need re-applying:

* `cfg.lua`
* `data/npcs.lua`, `data/prices.lua`, `data/offsets.lua`
* `server/discord_log.lua`
* `client/editable_functions.lua`
* anything you added under `bridge/`
* `locales/`

{% hint style="info" %}
Options added in a newer version fall back to their defaults when they are missing from an old `cfg.lua`, so an outdated config keeps working. It will not have the new options in it, though, so compare against the shipped `cfg.lua` when you want them.
{% endhint %}
