# Installation

## Step 1: Download and Prepare Files

#### **Download the Script from FiveM Keymaster**

* Visit the [FiveM Keymaster](https://keymaster.fivem.net/) site.
* Log in with your account credentials.
* Locate the **Bank Truck Robbery - 4 in 1!** and Tools scripts in your Granted Assets section.
* Download the script files from Keymaster.

## Customizable Features:

The Bank Truck Robbery is fully configurable to suit your server’s preferences, allowing for unique gameplay experiences:

* **Configurable Data Files:**
  * rm\_banktruckrobbery/cfg.lua
  * m\_banktruckrobbery/data/npcs.lua
  * m\_banktruckrobbery/data/offsets.lua
  * m\_banktruckrobbery/data/npcs.lua
* **Rewards and Models:**
  * The amount of money players can steal is adjustable, with random amounts (e.g., `$5000` to `$20000`) available.
  * Change the truck model (`stockade`) and even the appearance of the passenger (`mp_m_securoguard_01`).
* **Truck Security:**
  * Customize the passenger’s health, armor, and weapon to match the desired difficulty level.
* **Police Requirements:**
  * You can enable or disable checks for required police officers on duty.
* **Truck Spawn Behavior:**
  * Trucks can spawn automatically (`cfg.autoTruckSpawn = true`), or players can take missions from the NPC.
  * Set an interval for automatic spawns (e.g., every `10 minutes`).
  * Limit the number of unrobbed trucks on the map to prevent overpopulation (`cfg.maxNumberOfTrucksNotRobbed`).
* **Blip and Tracking Options:**
  * Enable truck location blips for players who purchase information, with continuous tracking when within 400 units.
* **Tool-Specific Timers:**
  * Adjust the time required to complete key actions:
    * **C4 Detonation:** `10 seconds`
    * **Hacking:** `20 seconds`
    * **Gassing:** `30 seconds`
    * **Money Collecting:** `20 seconds`

**Install and Configure ox\_lib**

* Download the latest version of **ox\_lib** from the [official GitHub page](https://github.com/overextended/ox_lib).
* Extract the `ox_lib` files to your `resources` folder.
* In your `server.cfg`, ensure that `ox_lib` is started before the **Bank Truck Robbery - 4 in 1!** script by adding the following line:

## Step 2: Add Script to Server Configuration

#### **Edit `server.cfg`**

* Open the `server.cfg` file located in the root directory of your FiveM server.
* Add the following line to ensure the **Bank Truck Robbery - 4 in 1!** script starts with your server:

```
ensure ox_lib
ensure rm_tools
ensure rm_banktruckrobbery
```
