> For the complete documentation index, see [llms.txt](https://kevingirardx.gitbook.io/scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kevingirardx.gitbook.io/scripts/methruns.md).

# Methruns

<figure><img src="/files/mY07eo7wWV8KdWnxGN3r" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Dependencies:

Renewed Lib: <https://github.com/Renewed-Scripts/Renewed-Lib/releases/tag/v2.0.7>​

Ox Lib: <https://github.com/overextended/ox_lib/releases>
{% endhint %}

## Faq

* Don't see a resource you use in the supported list? That's alright the bride folder is open to add and implement your own resource to work with the script.

## Installation

* In `shared > client.lua` ensure that on line 5 that `resource`  is set to either `ox` for ox\_target or `qb` for qb-target.
* if you are using on the qbcore framework ensure the marked line in the `fxmanifest.lua` is removed
* If you're on the qbox framework navigate to `qbx_core > server > player.lua` around `line 630` add the following:

```lua
playerData.metadata.kevinmethruns = playerData.metadata.kevinmethruns or 0
```

* If you're on the qbcore framwork navigate to `qb-core > config.lua` around `lines 66` within the `metadata table` add the following:

```lua
kevinmethruns = 0,
```

{% hint style="success" %}
🎉 Installation Completed. Next step is just customization.
{% endhint %}

***

## Level Configuration

* reputation: `table` Specifying the reputation range required to start this level
  * min: `number` Minimum reputation needed.
  * max: `number` Maximum reputation allowed.
* gpsDeactivationTime: `number` Duration (in minutes) the GPS remains active before providing drop-off coordinates.
* gpsDelayTime: `number` Delay (in milliseconds) before the car GPS activates.
* reputationReward: `number` Reputation points awarded upon completion.
* moneyReward: `number` Money awarded upon completion.
* neededItem: `table` specifying the item required to start the run
  * name: `string` Name of the required item.
  * amount: `number` Quantity needed.
* deadDropItem: `table` Specifying the item received from the dead drop.
  * name: `string` Name of the item.
  * amount: `number` Quantity received.
* attackers: `table` Defining properties of attackers spawned during the run.
  * amount: `number` Number of attackers
  * health: `number` Health of the attacker
  * armor: `number` Armor of the attacker
  * ragdoll:`boolean` Wether the attackers ragdoll when shot in critical areas on the body
  * weapon:`hash` Weapon assigned for the attacker
  * accuracy:`number` Weapon accuracy for the attacker
  * suffercriticalhits:`boolean` Whether attackers can suffer critical hits about the body
* vehicleGuards:`table` Defining properties of guards accompanying the vehicle.
  * ped:`hash` Model of the guard.
  * amount: `number` Number of attackers
  * health: `number` Health of the attacker
  * armor: `number` Armor of the attacker
  * ragdoll:`boolean` Wether the attackers ragdoll when shot in critical areas on the body
  * weapon:`hash` Weapon assigned for the attacker
  * accuracy:`number` Weapon accuracy for the attacker
  * suffercriticalhits:`boolean` Whether attackers can suffer critical hits about the body
* vehicleMods:`table` Specifying vehicle modification properties.For the full list of mods you can look at the following: <https://coxdocs.dev/ox_lib/Modules/VehicleProperties/Client>

## Level Example

```lua
{
    reputation = {
        min = 101,
        max = 250,
    },
    gpsDeactivationTime = 4,
    gpsDelayTime = 2000,
    reputationReward = 20,
    moneyReward = 10000,
    neededItem = {
        name = 'water',
        amount = 6,
    },
    deadDropItem = {
        name = 'meth_pure',
        amount = 1,
    },
    attackers = {
        amount = 5,
        health = 125,
        armor = 75,
        ragdoll = true,
        weapon = 'WEAPON_MICROSMG',
        accuracy = 50,
        suffercriticalhits = false,
    },
    vehicleGuards = {
        ped = `s_m_y_dealer_01`,
        amount = 5,
        health = 125,
        armor = 75,
        ragdoll = true,
        weapon = 'WEAPON_CARBINERIFLE',
        accuracy = 50,
        suffercriticalhits = false,
    },
    vehicleMods = {
        dirtLevel = 0.2,
        modSuspension = 2,
        modTransmission = 3,
        modEngine = 3,
        neonEnabled = { true, true, true, true },
        neonColor = { 255, 80, 80 },
    }
},
```
