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

# Bounty Contracts

<figure><img src="/files/n2qWf2EggqTEec5Gc0vP" 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>

Bl Dialog: <https://github.com/Byte-Labs-Studio/bl_dialog/releases/tag/v1.1.0>
{% endhint %}

## Faq

* Don't see a resource you use in the supported list? That's alright the bridge folder is open to add and implement your own resource/s to work with the script.
* Bounty License are more of a roleplay feature where players would need to provide their license to police if they are caught carrying a body around

## Installation

### Ox Inventory

Add the following in **ox\_inventory > data > items.lua**

```lua
['kevin_bounty_contract'] = {
	label = 'Bounty Contract',
	weight = 0,
	stack = false,
	close = true,
	description = 'A contract for a bounty',
},
['kevin_bounty_body'] = {
	label = 'Bounty Body',
	weight = 10000,
	stack = false,
	close = true,
	description = 'A body for a bounty',
},
['kevin_bounty_license'] = {
	label = 'Bounty License',
	weight = 0,
	stack = false,
	close = true,
	description = 'A Bounty Hunting Licence',
},
```

### Qb | Ps Inventory

Add the following in qb-core > shared > items.lua

{% code overflow="wrap" fullWidth="false" %}

```lua
kevin_bounty_contract                     = { name = 'kevin_bounty_contract', label = 'Bounty Contract', weight = 0, type = 'item', image = 'kevin_bounty_contract.png', unique = true, useable = true, shouldClose = true, description = 'A contract for a bounty' },
kevin_bounty_body                     = { name = 'kevin_bounty_body', label = 'Bounty Body', weight = 10000, type = 'item', image = 'kevin_bounty_body.png', unique = true, useable = true, shouldClose = true, description = 'A body for a bounty' },
kevin_bounty_license                     = { name = 'kevin_bounty_license', label = 'Bounty License', weight = 0, type = 'item', image = 'kevin_bounty_license.png', unique = true, useable = true, shouldClose = true, description = 'A Bounty Hunting Licence' },
```

{% endcode %}

* If you're on the qbox framework navigate to `qbx_core > server > player.lua` around `line 630` add the following:

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

* If you're on qbox framework  navigate to `qbx_core > server > player.lua` around `line 649` or search for `playerData.metadata.licences` and add the following within:

```lua
bountyContracts = false,

-- which should now look like this
playerData.metadata.licences = playerData.metadata.licences or {
    id = true,
    driver = true,
    weapon = false,
    bountyContracts = false,
}
```

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

```lua
kevinbountycontracts = 0,
```

* If you're on qbcore framework  navigate to `qb-core > config.lua` around `line 87` or search for `licences` and add the following within:

```lua
bountyContracts = false,

-- which should now look like
licences = {
    driver = true,
    business = false,
    weapon = false,
    bountyContracts = false,
},
```

{% hint style="success" %}
🎉 Installation Completed. Next step is just customization/adjusting config files to you liking
{% endhint %}

## Customization

### Tiers

The following is related to different tiers located in `shared/tiers.lua`

* minReputation: `number` Minimum reputation needed to reach this level
* reputationPayment: `number` Amount of reputation to award the player if the bounty is killed
* failReputationPenalty: `number` Amount of reputation to deduct from the player if bounty is failed
* reward: `table` Cash reward for claiming the bounty (random)
  * min: `number` Minimum number of cash
  * max: `number` Maximum number of cash
* bounty: `table` properties for the bounty target
  * money: `table` Amount of cash the bounty can have on their person
    * min: `number`
    * max: `number`
  * health: `number`
  * armor: `number`
  * accuracy: `number`
  * weapon: `hash`
  * sufferCriticalHits: `boolean`
  * ragdollOnCriticalHits: `boolean`
* goons: `table` properties for the bounty security/guards
  * amount: `number` This only applies if there is no vehicle defined
  * model: `hash`
  * money: `table` Amount of cash the bounty can have on their person
    * min: `number`
    * max: `number`
  * health: `number`
  * armor: `number`
  * accuracy: `number`
  * weapon: `hash`
  * sufferCriticalHits: `boolean`
  * ragdollOnCriticalHits: `boolean`
* vehicle: `table` <mark style="color:$warning;">**Optional**</mark> List of vehicles the bounty can spawn in and drive
* locations: `table` List of vector3 coords where the bounty can spawn

### Models

The following is related to different ped models for the bounty  `shared/pedModels.lua`

* male: `table` List of male ped models
* female: `table` List of female ped models

### Names

The following is related to different names for the bounty  `shared/names.lua`

* maleNames: `table` List of male first names
* femaleNames: `table` List of female first names
* lastNames: `table` List of last names
