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

# Installation

How to install Complete Hunting V2 on ESX, QBCore and QBOX.

### **How to download the script**

To download the asset, you need to have completed the purchase using your own Keymaster account.

Once your purchase is confirmed on our official website, the asset will appear in your Keymaster account ([portal.cfx.re](https://portal.cfx.re/)). From there, you can download and install it by following the steps outlined in the documentation.

Complete Hunting V2 is **one resource for ESX, QBCore and QBOX**. If you already owned Complete Hunting (ESX or QBCore version), V2 is a free update: download the latest version from your Keymaster and follow the [Upgrading from V1](/complete-scripts/scripts/complete-hunting/updates.md#upgrading-from-v1) steps.

{% hint style="info" %} <mark style="color:blue;">**If the asset was bought through a different account, you can transfer it via the keymaster transfer system**</mark>
{% endhint %}

{% hint style="danger" %} <mark style="color:red;">**NOTE: Please do not edit the name of the downloaded folder, it must stay complete\_hunting, otherwise the script won't work properly**</mark>
{% endhint %}

### **Dependencies**

{% hint style="warning" %} <mark style="color:orange;">**OneSync must be enabled (animals and vendors are spawned by the server) and you should run one of the latest server artifacts**</mark>
{% endhint %}

{% hint style="danger" %} <mark style="color:red;">**This asset relies on certain essential dependencies to function correctly. If these dependencies are not installed, the asset may start, but you could encounter errors or warnings in the command console**</mark>
{% endhint %}

| Script                                                                                                                                           | Download                                                                                                                                                    |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ox\_lib**                                                                                                                                      | <https://overextended.dev/ox_lib>                                                                                                                           |
| **es\_extended** OR **qb-core** OR **qbx\_core**                                                                                                 | [ESX](https://github.com/esx-framework/esx_core) / [QBCore](https://github.com/qbcore-framework/qb-core) / [QBOX](https://github.com/Qbox-project/qbx_core) |
| <p><strong>ox\_inventory</strong><br><em>Optional on ESX and QBCore, detected automatically. QBOX already uses it</em></p>                       | <https://overextended.dev/ox_inventory>                                                                                                                     |
| <p><strong>core\_inventory</strong><br><em>Optional, detected automatically</em></p>                                                             |                                                                                                                                                             |
| <p><strong>ox\_target</strong><br><em>Optional, only if you set</em> <code>Config.UseTarget = true</code></p>                                    | <https://overextended.dev/ox_target>                                                                                                                        |
| <p><strong>Dispatch script</strong><br><em>Optional, for police alerts on illegal sales. Without one the built-in alert is used</em></p>         | ps-dispatch OR cd\_dispatch OR qs-dispatch OR rcore\_dispatch OR core\_dispatch OR linden\_outlawalert                                                      |
| <p><strong>Bear model</strong><br><em>Optional, external model made by a third party. See</em> <a href="#bear-model-optional">Bear model</a></p> | TODO-LINK                                                                                                                                                   |

### **Correct Asset Placement**

{% hint style="danger" %} <mark style="color:red;">**Properly placing the assets is crucial to avoid errors, FOLLOW THIS ORDER. Your framework must be started before complete\_hunting, because the script detects it when it starts**</mark>
{% endhint %}

To ensure the asset runs smoothly, configure your server.cfg with the sequence specified below:

```lua
# at the bottom of the file and after all the dependencies add

ensure ox_lib

# your framework, only one of these
ensure es_extended
# ensure qb-core
# ensure qbx_core

# optional
ensure ox_inventory
ensure ox_target

# optional, your dispatch script (ps-dispatch, cd_dispatch, ...)

# optional, the resource with the bear model
# ensure your_bear_model_resource

ensure complete_hunting
```

### **Database Configuration**

**ESX:** you must add the script's items and the hunting license type to your database. Simply drag and drop the *database/esx.sql* file into your database (make sure to select first the correct database your server is using). It uses `INSERT IGNORE`, so items you already have (for example `wood`, `coal` or `meat`) are skipped and it is safe to run it again.

**QBCore and QBOX:** no SQL is needed. Add the items as shown in the next section.

Missions progress and the weekly species limits are saved by the script itself (FiveM KVP storage), so they need no table and survive restarts on every framework.

<details>

<summary>SQL (ESX)</summary>

```sql
INSERT IGNORE INTO `items` (`name`, `label`, `weight`) VALUES
	-- Pelts - Config.Animals[].bad / .good / .perfect
	('leather_deer_bad', 'Ruined Deer Pelt', 2),
	('leather_deer_good', 'Good Deer Pelt', 2),
	('leather_deer_perfect', 'Perfect Deer Pelt', 2),
	('leather_boar_bad', 'Ruined Boar Pelt', 2),
	('leather_boar_good', 'Good Boar Pelt', 2),
	('leather_boar_perfect', 'Perfect Boar Pelt', 2),
	('leather_mlion_bad', 'Ruined Lion Pelt', 2),
	('leather_mlion_good', 'Good Lion Pelt', 2),
	('leather_mlion_perfect', 'Perfect Lion Pelt', 2),
	('leather_coyote_bad', 'Ruined Coyote Pelt', 1),
	('leather_coyote_good', 'Good Coyote Pelt', 1),
	('leather_coyote_perfect', 'Perfect Coyote Pelt', 1),
	('leather_rabbit_bad', 'Ruined Rabbit Pelt', 1),
	('leather_rabbit_good', 'Good Rabbit Pelt', 1),
	('leather_rabbit_perfect', 'Perfect Rabbit Pelt', 1),
	('leather_cormorant_bad', 'Ruined Cormorant Skin', 1),
	('leather_cormorant_good', 'Good Cormorant Skin', 1),
	('leather_cormorant_perfect', 'Perfect Cormorant Skin', 1),
	('leather_chickenhawk_bad', 'Ruined Hawk Skin', 1),
	('leather_chickenhawk_good', 'Good Hawk Skin', 1),
	('leather_chickenhawk_perfect', 'Perfect Hawk Skin', 1),
	('leather_bear_bad', 'Ruined Bear Pelt', 4),
	('leather_bear_good', 'Good Bear Pelt', 4),
	('leather_bear_perfect', 'Perfect Bear Pelt', 4),
	-- Meat - Config.MeatItem, Config.CookedMeatName, Config.Animals[].meat
	('meat', 'Raw Meat', 1),
	('cookedMeat', 'Cooked Meat', 1),
	('deer_meat', 'Venison', 1),
	('boar_meat', 'Boar Meat', 1),
	('mtlion_meat', 'Mountain Lion Meat', 1),
	('coyote_meat', 'Coyote Meat', 1),
	('rabbit_meat', 'Rabbit Meat', 1),
	('cormorant_meat', 'Cormorant Meat', 1),
	('chickenhawk_meat', 'Chicken Hawk Meat', 1),
	('bear_meat', 'Bear Meat', 1),
	-- Special drops - Config.Animals[].specialItem
	('deer_horn', 'Deer Antler', 1),
	('bear_claw', 'Bear Claw', 1),
	-- Bait - Config.BaitItemName (usable)
	('animal_bait', 'Animal Bait', 1),
	-- Feed pile - Config.Traps.feedPile.item (usable)
	('hunting_feed', 'Feed Pile', 2),
	-- Traps - Config.Traps.types[].item (usable)
	('trap_snare', 'Wire Snare', 1),
	('trap_leghold', 'Leghold Trap', 3),
	('trap_beartrap', 'Heavy Jaw Trap', 6),
	-- Campfire - Config.CampfireNameItem1 / Config.CampfireNameItem2
	('coal', 'Coal', 1),
	('wood', 'Wood', 1),
	-- Equipment - binoculars, wildlife tracker, hunting license (usable)
	('binoculars', 'Binoculars', 1),
	('wildlife_tracker', 'Wildlife Tracker', 1),
	('hunting_license', 'Hunting License', 0);

-- Hunting license type (esx_license)
INSERT IGNORE INTO `licenses` (`type`, `label`) VALUES
	('hunt', 'Hunting License');
```

</details>

### **Item Configuration**

The script uses 46 items: pelts (bad / good / perfect for every animal, bear included), meat, special drops, bait, feed pile, traps, campfire materials, binoculars, wildlife tracker and hunting license. The procedure depends on the framework and inventory your server is using:

{% hint style="warning" %} <mark style="color:orange;">**Item names must match config.lua. If you rename an item in the config, rename it in your items too**</mark>
{% endhint %}

<details>

<summary>ESX (default inventory)</summary>

Run *database/esx.sql* as shown in [Database Configuration](#database-configuration). It adds every item and the `hunt` license type. Nothing else to do.

</details>

<details>

<summary>QBCORE (qb-inventory or other non-ox inventory)</summary>

Copy the entries below (also in *database/qbcore.lua*) into `qb-core/shared/items.lua`, **inside** the existing `QBShared.Items = { ... }` table. Do not paste the whole file over it. Weights are in grams.

The hunting license is a normal item, there is nothing else to add for it.

```lua
    -- Pelts - Config.Animals[].bad / .good / .perfect
    leather_deer_bad            = { name = 'leather_deer_bad', label = 'Ruined Deer Pelt', weight = 1500, type = 'item', image = 'leather_deer_bad.png', unique = false, useable = false, shouldClose = true, description = 'A deer hide shot to pieces. Barely worth carrying. (sells 100)' },
    leather_deer_good           = { name = 'leather_deer_good', label = 'Good Deer Pelt', weight = 1500, type = 'item', image = 'leather_deer_good.png', unique = false, useable = false, shouldClose = true, description = 'A clean deer hide. The tanner will take this. (sells 420)' },
    leather_deer_perfect        = { name = 'leather_deer_perfect', label = 'Perfect Deer Pelt', weight = 1500, type = 'item', image = 'leather_deer_perfect.png', unique = false, useable = false, shouldClose = true, description = 'Flawless. One clean shot, one perfect hide. (sells 890)' },
    leather_boar_bad            = { name = 'leather_boar_bad', label = 'Ruined Boar Pelt', weight = 1800, type = 'item', image = 'leather_boar_bad.png', unique = false, useable = false, shouldClose = true, description = 'A boar hide, badly damaged. (sells 100)' },
    leather_boar_good           = { name = 'leather_boar_good', label = 'Good Boar Pelt', weight = 1800, type = 'item', image = 'leather_boar_good.png', unique = false, useable = false, shouldClose = true, description = 'A solid boar hide, thick and clean. (sells 420)' },
    leather_boar_perfect        = { name = 'leather_boar_perfect', label = 'Perfect Boar Pelt', weight = 1800, type = 'item', image = 'leather_boar_perfect.png', unique = false, useable = false, shouldClose = true, description = 'An immaculate boar hide. (sells 890)' },
    leather_mlion_bad           = { name = 'leather_mlion_bad', label = 'Ruined Lion Pelt', weight = 1200, type = 'item', image = 'leather_mlion_bad.png', unique = false, useable = false, shouldClose = true, description = 'A mountain lion hide, ruined. Nobody legal will touch it. (sells 50)' },
    leather_mlion_good          = { name = 'leather_mlion_good', label = 'Good Lion Pelt', weight = 1200, type = 'item', image = 'leather_mlion_good.png', unique = false, useable = false, shouldClose = true, description = 'A mountain lion hide. Protected species - the fence pays anyway. (sells 190)' },
    leather_mlion_perfect       = { name = 'leather_mlion_perfect', label = 'Perfect Lion Pelt', weight = 1200, type = 'item', image = 'leather_mlion_perfect.png', unique = false, useable = false, shouldClose = true, description = 'A flawless mountain lion hide. Very illegal, very valuable. (sells 430)' },
    leather_coyote_bad          = { name = 'leather_coyote_bad', label = 'Ruined Coyote Pelt', weight = 800, type = 'item', image = 'leather_coyote_bad.png', unique = false, useable = false, shouldClose = true, description = 'A shredded coyote hide. (sells 50)' },
    leather_coyote_good         = { name = 'leather_coyote_good', label = 'Good Coyote Pelt', weight = 800, type = 'item', image = 'leather_coyote_good.png', unique = false, useable = false, shouldClose = true, description = 'A decent coyote hide. (sells 190)' },
    leather_coyote_perfect      = { name = 'leather_coyote_perfect', label = 'Perfect Coyote Pelt', weight = 800, type = 'item', image = 'leather_coyote_perfect.png', unique = false, useable = false, shouldClose = true, description = 'A perfect coyote hide. (sells 430)' },
    leather_rabbit_bad          = { name = 'leather_rabbit_bad', label = 'Ruined Rabbit Pelt', weight = 300, type = 'item', image = 'leather_rabbit_bad.png', unique = false, useable = false, shouldClose = true, description = 'What is left of a rabbit hide. (sells 100)' },
    leather_rabbit_good         = { name = 'leather_rabbit_good', label = 'Good Rabbit Pelt', weight = 300, type = 'item', image = 'leather_rabbit_good.png', unique = false, useable = false, shouldClose = true, description = 'A soft rabbit hide. (sells 420)' },
    leather_rabbit_perfect      = { name = 'leather_rabbit_perfect', label = 'Perfect Rabbit Pelt', weight = 300, type = 'item', image = 'leather_rabbit_perfect.png', unique = false, useable = false, shouldClose = true, description = 'An unmarked rabbit hide. (sells 890)' },
    leather_cormorant_bad       = { name = 'leather_cormorant_bad', label = 'Ruined Cormorant Skin', weight = 200, type = 'item', image = 'leather_cormorant_bad.png', unique = false, useable = false, shouldClose = true, description = 'A ruined cormorant skin. (sells 50)' },
    leather_cormorant_good      = { name = 'leather_cormorant_good', label = 'Good Cormorant Skin', weight = 200, type = 'item', image = 'leather_cormorant_good.png', unique = false, useable = false, shouldClose = true, description = 'A cormorant skin, feathers intact. (sells 190)' },
    leather_cormorant_perfect   = { name = 'leather_cormorant_perfect', label = 'Perfect Cormorant Skin', weight = 200, type = 'item', image = 'leather_cormorant_perfect.png', unique = false, useable = false, shouldClose = true, description = 'A perfect cormorant skin. (sells 430)' },
    leather_chickenhawk_bad     = { name = 'leather_chickenhawk_bad', label = 'Ruined Hawk Skin', weight = 200, type = 'item', image = 'leather_chickenhawk_bad.png', unique = false, useable = false, shouldClose = true, description = 'A ruined hawk skin. (sells 50)' },
    leather_chickenhawk_good    = { name = 'leather_chickenhawk_good', label = 'Good Hawk Skin', weight = 200, type = 'item', image = 'leather_chickenhawk_good.png', unique = false, useable = false, shouldClose = true, description = 'A hawk skin in good condition. (sells 190)' },
    leather_chickenhawk_perfect = { name = 'leather_chickenhawk_perfect', label = 'Perfect Hawk Skin', weight = 200, type = 'item', image = 'leather_chickenhawk_perfect.png', unique = false, useable = false, shouldClose = true, description = 'A flawless hawk skin. (sells 430)' },
    leather_bear_bad            = { name = 'leather_bear_bad', label = 'Ruined Bear Pelt', weight = 4000, type = 'item', image = 'leather_bear_bad.png', unique = false, useable = false, shouldClose = true, description = 'A bear hide, wrecked. Still heavy as sin. (sells 300)' },
    leather_bear_good           = { name = 'leather_bear_good', label = 'Good Bear Pelt', weight = 4000, type = 'item', image = 'leather_bear_good.png', unique = false, useable = false, shouldClose = true, description = 'A heavy bear hide in good condition. (sells 1100)' },
    leather_bear_perfect        = { name = 'leather_bear_perfect', label = 'Perfect Bear Pelt', weight = 4000, type = 'item', image = 'leather_bear_perfect.png', unique = false, useable = false, shouldClose = true, description = 'A trophy bear hide. The best money out here. (sells 2400)' },

    -- Meat - Config.MeatItem, Config.CookedMeatName, Config.Animals[].meat
    meat                        = { name = 'meat', label = 'Raw Meat', weight = 500, type = 'item', image = 'meat.png', unique = false, useable = false, shouldClose = true, description = 'Fresh game meat. Cook it on a campfire before eating. (sells 20)' },
    cookedMeat                  = { name = 'cookedMeat', label = 'Cooked Meat', weight = 400, type = 'item', image = 'cookedmeat.png', unique = false, useable = false, shouldClose = true, description = 'Cooked over a campfire. Safe to eat.' },
    deer_meat                   = { name = 'deer_meat', label = 'Venison', weight = 500, type = 'item', image = 'deer_meat.png', unique = false, useable = false, shouldClose = true, description = 'Raw venison. (sells 100)' },
    boar_meat                   = { name = 'boar_meat', label = 'Boar Meat', weight = 500, type = 'item', image = 'boar_meat.png', unique = false, useable = false, shouldClose = true, description = 'Raw boar meat. (sells 100)' },
    mtlion_meat                 = { name = 'mtlion_meat', label = 'Mountain Lion Meat', weight = 500, type = 'item', image = 'mtlion_meat.png', unique = false, useable = false, shouldClose = true, description = 'Raw mountain lion meat. (sells 100)' },
    coyote_meat                 = { name = 'coyote_meat', label = 'Coyote Meat', weight = 500, type = 'item', image = 'coyote_meat.png', unique = false, useable = false, shouldClose = true, description = 'Raw coyote meat. (sells 100)' },
    rabbit_meat                 = { name = 'rabbit_meat', label = 'Rabbit Meat', weight = 300, type = 'item', image = 'rabbit_meat.png', unique = false, useable = false, shouldClose = true, description = 'Raw rabbit meat. (sells 100)' },
    cormorant_meat              = { name = 'cormorant_meat', label = 'Cormorant Meat', weight = 300, type = 'item', image = 'cormorant_meat.png', unique = false, useable = false, shouldClose = true, description = 'Raw cormorant meat. (sells 100)' },
    chickenhawk_meat            = { name = 'chickenhawk_meat', label = 'Chicken Hawk Meat', weight = 300, type = 'item', image = 'chickenhawk_meat.png', unique = false, useable = false, shouldClose = true, description = 'Raw hawk meat. (sells 100)' },
    bear_meat                   = { name = 'bear_meat', label = 'Bear Meat', weight = 800, type = 'item', image = 'bear_meat.png', unique = false, useable = false, shouldClose = true, description = 'A heavy cut of bear meat. (sells 260)' },

    -- Special drops - Config.Animals[].specialItem
    deer_horn                   = { name = 'deer_horn', label = 'Deer Antler', weight = 700, type = 'item', image = 'deer_horn.png', unique = false, useable = false, shouldClose = true, description = 'A clean set of antlers. Collectors pay well. (sells 630)' },
    bear_claw                   = { name = 'bear_claw', label = 'Bear Claw', weight = 200, type = 'item', image = 'bear_claw.png', unique = false, useable = false, shouldClose = true, description = 'A bear claw. Proof you met one and walked away. (sells 1500)' },

    -- Bait - Config.BaitItemName (usable)
    animal_bait                 = { name = 'animal_bait', label = 'Animal Bait', weight = 500, type = 'item', image = 'animal_bait.png', unique = false, useable = true, shouldClose = true, description = 'Drop it and wait. Something will come to it. (buy 50)' },

    -- Feed pile - Config.Traps.feedPile.item (usable)
    hunting_feed                = { name = 'hunting_feed', label = 'Feed Pile', weight = 2000, type = 'item', image = 'hunting_feed.png', unique = false, useable = true, shouldClose = true, description = 'Pour it near your traps. Deer and boar come over to eat. (buy 90)' },

    -- Traps - Config.Traps.types[].item (usable)
    trap_snare                  = { name = 'trap_snare', label = 'Wire Snare', weight = 400, type = 'item', image = 'trap_snare.png', unique = false, useable = true, shouldClose = true, description = 'A light noose for small game. Cheap, and they often work free. (buy 120)' },
    trap_leghold                = { name = 'trap_leghold', label = 'Leghold Trap', weight = 3000, type = 'item', image = 'trap_leghold.png', unique = false, useable = true, shouldClose = true, description = 'Sprung jaws for mid-sized game. Stuns and holds firmly. (buy 480)' },
    trap_beartrap               = { name = 'trap_beartrap', label = 'Heavy Jaw Trap', weight = 6000, type = 'item', image = 'trap_beartrap.png', unique = false, useable = true, shouldClose = true, description = 'Heavy steel jaws for big game. Nothing gets out of it. (buy 1400)' },

    -- Campfire - Config.CampfireNameItem1 / Config.CampfireNameItem2
    coal                        = { name = 'coal', label = 'Coal', weight = 300, type = 'item', image = 'coal.png', unique = false, useable = false, shouldClose = true, description = 'Burns hot enough to cook meat. (buy 25)' },
    wood                        = { name = 'wood', label = 'Wood', weight = 800, type = 'item', image = 'wood.png', unique = false, useable = false, shouldClose = true, description = 'Fuel for a campfire. (buy 15)' },

    -- Equipment - binoculars, wildlife tracker, hunting license (usable)
    binoculars                  = { name = 'binoculars', label = 'Binoculars', weight = 700, type = 'item', image = 'binoculars.png', unique = true, useable = true, shouldClose = true, description = 'Scope animals to read their species, range and star quality. (buy 750)' },
    wildlife_tracker            = { name = 'wildlife_tracker', label = 'Wildlife Tracker', weight = 900, type = 'item', image = 'wildlife_tracker.png', unique = true, useable = true, shouldClose = true, description = 'Handheld VHF receiver. Gives you a bearing and a signal, never a map blip. (buy 950)' },
    hunting_license             = { name = 'hunting_license', label = 'Hunting License', weight = 0, type = 'item', image = 'hunting_license.png', unique = true, useable = true, shouldClose = true, description = 'Use it to present your permit to the nearest player. (buy 500)' },
```

</details>

<details>

<summary>QBOX / ox_inventory (on any framework)</summary>

Copy the entries below (also in *ox\_inventory\_items.lua* in the resource root) into `ox_inventory/data/items.lua`, **inside** the `return { ... }` table that file already has. Do not paste the whole file over it. Weights are in grams.

Keep `consume = 0` on the usable items: the script removes the item itself once the action is allowed, so ox\_inventory must not take one as well.

On ESX with ox\_inventory you don't need the items part of *database/esx.sql*.

```lua
    -- Pelts
    ['leather_deer_bad'] = { label = 'Ruined Deer Pelt', weight = 1500, stack = true, close = true, description = 'A deer hide shot to pieces. Barely worth carrying. (sells 100)', client = { image = 'leather_deer_bad.png' } },
    ['leather_deer_good'] = { label = 'Good Deer Pelt', weight = 1500, stack = true, close = true, description = 'A clean deer hide. The tanner will take this. (sells 420)', client = { image = 'leather_deer_good.png' } },
    ['leather_deer_perfect'] = { label = 'Perfect Deer Pelt', weight = 1500, stack = true, close = true, description = 'Flawless. One clean shot, one perfect hide. (sells 890)', client = { image = 'leather_deer_perfect.png' } },
    ['leather_boar_bad'] = { label = 'Ruined Boar Pelt', weight = 1800, stack = true, close = true, description = 'A boar hide, badly damaged. (sells 100)', client = { image = 'leather_boar_bad.png' } },
    ['leather_boar_good'] = { label = 'Good Boar Pelt', weight = 1800, stack = true, close = true, description = 'A solid boar hide, thick and clean. (sells 420)', client = { image = 'leather_boar_good.png' } },
    ['leather_boar_perfect'] = { label = 'Perfect Boar Pelt', weight = 1800, stack = true, close = true, description = 'An immaculate boar hide. (sells 890)', client = { image = 'leather_boar_perfect.png' } },
    ['leather_mlion_bad'] = { label = 'Ruined Lion Pelt', weight = 1200, stack = true, close = true, description = 'A mountain lion hide, ruined. Nobody legal will touch it. (sells 50)', client = { image = 'leather_mlion_bad.png' } },
    ['leather_mlion_good'] = { label = 'Good Lion Pelt', weight = 1200, stack = true, close = true, description = 'A mountain lion hide. Protected species - the fence pays anyway. (sells 190)', client = { image = 'leather_mlion_good.png' } },
    ['leather_mlion_perfect'] = { label = 'Perfect Lion Pelt', weight = 1200, stack = true, close = true, description = 'A flawless mountain lion hide. Very illegal, very valuable. (sells 430)', client = { image = 'leather_mlion_perfect.png' } },
    ['leather_coyote_bad'] = { label = 'Ruined Coyote Pelt', weight = 800, stack = true, close = true, description = 'A shredded coyote hide. (sells 50)', client = { image = 'leather_coyote_bad.png' } },
    ['leather_coyote_good'] = { label = 'Good Coyote Pelt', weight = 800, stack = true, close = true, description = 'A decent coyote hide. (sells 190)', client = { image = 'leather_coyote_good.png' } },
    ['leather_coyote_perfect'] = { label = 'Perfect Coyote Pelt', weight = 800, stack = true, close = true, description = 'A perfect coyote hide. (sells 430)', client = { image = 'leather_coyote_perfect.png' } },
    ['leather_rabbit_bad'] = { label = 'Ruined Rabbit Pelt', weight = 300, stack = true, close = true, description = 'What is left of a rabbit hide. (sells 100)', client = { image = 'leather_rabbit_bad.png' } },
    ['leather_rabbit_good'] = { label = 'Good Rabbit Pelt', weight = 300, stack = true, close = true, description = 'A soft rabbit hide. (sells 420)', client = { image = 'leather_rabbit_good.png' } },
    ['leather_rabbit_perfect'] = { label = 'Perfect Rabbit Pelt', weight = 300, stack = true, close = true, description = 'An unmarked rabbit hide. (sells 890)', client = { image = 'leather_rabbit_perfect.png' } },
    ['leather_cormorant_bad'] = { label = 'Ruined Cormorant Skin', weight = 200, stack = true, close = true, description = 'A ruined cormorant skin. (sells 50)', client = { image = 'leather_cormorant_bad.png' } },
    ['leather_cormorant_good'] = { label = 'Good Cormorant Skin', weight = 200, stack = true, close = true, description = 'A cormorant skin, feathers intact. (sells 190)', client = { image = 'leather_cormorant_good.png' } },
    ['leather_cormorant_perfect'] = { label = 'Perfect Cormorant Skin', weight = 200, stack = true, close = true, description = 'A perfect cormorant skin. (sells 430)', client = { image = 'leather_cormorant_perfect.png' } },
    ['leather_chickenhawk_bad'] = { label = 'Ruined Hawk Skin', weight = 200, stack = true, close = true, description = 'A ruined hawk skin. (sells 50)', client = { image = 'leather_chickenhawk_bad.png' } },
    ['leather_chickenhawk_good'] = { label = 'Good Hawk Skin', weight = 200, stack = true, close = true, description = 'A hawk skin in good condition. (sells 190)', client = { image = 'leather_chickenhawk_good.png' } },
    ['leather_chickenhawk_perfect'] = { label = 'Perfect Hawk Skin', weight = 200, stack = true, close = true, description = 'A flawless hawk skin. (sells 430)', client = { image = 'leather_chickenhawk_perfect.png' } },
    ['leather_bear_bad'] = { label = 'Ruined Bear Pelt', weight = 4000, stack = true, close = true, description = 'A bear hide, wrecked. Still heavy as sin. (sells 300)', client = { image = 'leather_bear_bad.png' } },
    ['leather_bear_good'] = { label = 'Good Bear Pelt', weight = 4000, stack = true, close = true, description = 'A heavy bear hide in good condition. (sells 1100)', client = { image = 'leather_bear_good.png' } },
    ['leather_bear_perfect'] = { label = 'Perfect Bear Pelt', weight = 4000, stack = true, close = true, description = 'A trophy bear hide. The best money out here. (sells 2400)', client = { image = 'leather_bear_perfect.png' } },

    -- Meat
    ['meat'] = { label = 'Raw Meat', weight = 500, stack = true, close = true, description = 'Fresh game meat. Cook it on a campfire before eating. (sells 20)', client = { image = 'meat.png' } },
    ['cookedMeat'] = { label = 'Cooked Meat', weight = 400, stack = true, close = true, description = 'Cooked over a campfire. Safe to eat.', client = { image = 'cookedmeat.png' } },
    ['deer_meat'] = { label = 'Venison', weight = 500, stack = true, close = true, description = 'Raw venison. (sells 100)', client = { image = 'deer_meat.png' } },
    ['boar_meat'] = { label = 'Boar Meat', weight = 500, stack = true, close = true, description = 'Raw boar meat. (sells 100)', client = { image = 'boar_meat.png' } },
    ['mtlion_meat'] = { label = 'Mountain Lion Meat', weight = 500, stack = true, close = true, description = 'Raw mountain lion meat. (sells 100)', client = { image = 'mtlion_meat.png' } },
    ['coyote_meat'] = { label = 'Coyote Meat', weight = 500, stack = true, close = true, description = 'Raw coyote meat. (sells 100)', client = { image = 'coyote_meat.png' } },
    ['rabbit_meat'] = { label = 'Rabbit Meat', weight = 300, stack = true, close = true, description = 'Raw rabbit meat. (sells 100)', client = { image = 'rabbit_meat.png' } },
    ['cormorant_meat'] = { label = 'Cormorant Meat', weight = 300, stack = true, close = true, description = 'Raw cormorant meat. (sells 100)', client = { image = 'cormorant_meat.png' } },
    ['chickenhawk_meat'] = { label = 'Chicken Hawk Meat', weight = 300, stack = true, close = true, description = 'Raw hawk meat. (sells 100)', client = { image = 'chickenhawk_meat.png' } },
    ['bear_meat'] = { label = 'Bear Meat', weight = 800, stack = true, close = true, description = 'A heavy cut of bear meat. (sells 260)', client = { image = 'bear_meat.png' } },

    -- Special drops
    ['deer_horn'] = { label = 'Deer Antler', weight = 700, stack = true, close = true, description = 'A clean set of antlers. Collectors pay well. (sells 630)', client = { image = 'deer_horn.png' } },
    ['bear_claw'] = { label = 'Bear Claw', weight = 200, stack = true, close = true, description = 'A bear claw. Proof you met one and walked away. (sells 1500)', client = { image = 'bear_claw.png' } },

    -- Bait, feed pile and traps (usable, consume = 0: the script removes them itself)
    ['animal_bait'] = { label = 'Animal Bait', weight = 500, stack = true, close = true, consume = 0, description = 'Drop it and wait. Something will come to it. (buy 50)', client = { image = 'animal_bait.png' } },
    ['hunting_feed'] = { label = 'Feed Pile', weight = 2000, stack = true, close = true, consume = 0, description = 'Pour it near your traps. Deer and boar come over to eat. (buy 90)', client = { image = 'hunting_feed.png' } },
    ['trap_snare'] = { label = 'Wire Snare', weight = 400, stack = true, close = true, consume = 0, description = 'A light noose for small game. Cheap, and they often work free. (buy 120)', client = { image = 'trap_snare.png' } },
    ['trap_leghold'] = { label = 'Leghold Trap', weight = 3000, stack = true, close = true, consume = 0, description = 'Sprung jaws for mid-sized game. Stuns and holds firmly. (buy 480)', client = { image = 'trap_leghold.png' } },
    ['trap_beartrap'] = { label = 'Heavy Jaw Trap', weight = 6000, stack = true, close = true, consume = 0, description = 'Heavy steel jaws for big game. Nothing gets out of it. (buy 1400)', client = { image = 'trap_beartrap.png' } },

    -- Campfire
    ['coal'] = { label = 'Coal', weight = 300, stack = true, close = true, description = 'Burns hot enough to cook meat. (buy 25)', client = { image = 'coal.png' } },
    ['wood'] = { label = 'Wood', weight = 800, stack = true, close = true, description = 'Fuel for a campfire. (buy 15)', client = { image = 'wood.png' } },

    -- Equipment (usable, never consumed)
    ['binoculars'] = { label = 'Binoculars', weight = 700, stack = false, close = true, consume = 0, description = 'Scope animals to read their species, range and star quality. (buy 750)', client = { image = 'binoculars.png' } },
    ['wildlife_tracker'] = { label = 'Wildlife Tracker', weight = 900, stack = false, close = true, consume = 0, description = 'Handheld VHF receiver. Gives you a bearing and a signal, never a map blip. (buy 950)', client = { image = 'wildlife_tracker.png' } },
    ['hunting_license'] = { label = 'Hunting License', weight = 0, stack = false, close = true, consume = 0, description = 'Use it to present your permit to the nearest player. (buy 500)', client = { image = 'hunting_license.png' } },
```

</details>

**Item images:** no item pictures are included. Add a `<item name>.png` for each item to your inventory images folder:

* ox\_inventory: `ox_inventory/web/images/`
* qb-inventory: `qb-inventory/html/images/`

The hunting shop shows the same pictures automatically (ox\_inventory, qb-inventory and qs-inventory are detected). You can also drop `<item name>.png` files in `complete_hunting/html/assets/items/`, or set an `image` URL per item in `Config.Shop` (see [Config](/complete-scripts/scripts/complete-hunting/config.md#hunting-shop)). Without a picture the shop shows the item icon.

### **Framework selection**

There is nothing to select. When it starts, the script detects the framework and the inventory by itself:

| Started resource      | Used as                                  |
| --------------------- | ---------------------------------------- |
| `es_extended`         | ESX                                      |
| `qbx_core`            | QBOX (checked before qb-core)            |
| `qb-core`             | QBCore                                   |
| `ox_inventory`        | Inventory: ox\_inventory                 |
| `core_inventory`      | Inventory: core\_inventory               |
| none of the two above | Inventory: the framework's own functions |

Licenses: on ESX the license type is `hunt` (esx\_license), on QBCore and QBOX it is the `hunt` entry of the player's `licences` metadata. In-game, players hunt with the `hunting_license` **item**, sold in the hunting shop.

{% hint style="info" %} <mark style="color:blue;">**QBCore and QBOX have no black money account: money from the illegal buyer is paid in cash. If your server has a dirty money account, change mapAccount in complete\_hunting/frameworks/qbcore/server.lua or frameworks/qbox/server.lua**</mark>
{% endhint %}

### **Bear model (optional)**

The bear is not part of GTA V. It uses an **external model made by a third party**, that you download and install yourself. Without it the script works normally, there is just no bear.

1. Download the bear model: TODO-LINK
2. Install it as its own resource, following the instructions of its author, and `ensure` it **before** `complete_hunting`.
3. The script spawns the ped model named `bear`. If the model you installed has a different name, replace `bear` with that name in `Config.Animals` (`model`), `Config.AnimalSpecies`, `Config.AnimalLabels` and `Config.SpeciesLimits.limits`.
4. The bear items (`leather_bear_bad`, `leather_bear_good`, `leather_bear_perfect`, `bear_meat`, `bear_claw`) are already in the item lists above.

There is no on/off option: the bear row in `Config.Animals` can stay enabled even without the model. If the model is missing, the server removes the bear from the spawn rotation and prints this in the console (it tries again at the next restart):

```
[complete_hunting] Model "bear" failed to spawn and has been removed from the spawn rotation. If this is the bear, the model is probably not streamed yet.
```

To remove the bear completely, delete (or comment out) the `bear` row in `Config.Animals`. Rarity, health and how many bears can live in one zone are in `Config.AnimalSpecies['bear']` (see [Config](/complete-scripts/scripts/complete-hunting/config.md#animals-and-species)).

### Configure the script

As for the last step is access the config files and modify them as you like, please make sure to have a minimum of coding skills before edit those files, a single character wrong won't let the code start.

Main config file can be found in complete\_hunting/config.lua (see [Config](/complete-scripts/scripts/complete-hunting/config.md)).

For framework related functions (money accounts, licenses, usable items) go into complete\_hunting/frameworks, select the folder of your framework (esx, qbcore or qbox) and edit client.lua and server.lua. Inventory functions are in complete\_hunting/bridge/inventory.lua.

Police alerts are sent from complete\_hunting/bridge/dispatch\_server.lua and complete\_hunting/bridge/dispatch\_client.lua: edit them if your dispatch script expects different fields, or put your own code in `Dispatch.Custom`.
