> 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/common-errors.md).

# Common errors

Check common issues to prevent contacting support

> *If your error is not here and it has a simple solution, you can comment it so that we can add it.*

{% hint style="danger" %} <mark style="color:red;">**You lack the required entitlement to use Complete Hunting**</mark>
{% endhint %}

Restart your server and make sure your server license key belongs to the same Cfx.re account that owns the script. If you bought it on another account, transfer it with the Keymaster transfer system.

{% hint style="danger" %} <mark style="color:red;">**The script doesn't start or nothing works after renaming the folder**</mark>
{% endhint %}

The folder must be named `complete_hunting`. Renaming it breaks the events inside the script.

{% hint style="danger" %} <mark style="color:red;">**Errors after updating from V1**</mark>
{% endhint %}

The V1 `config.lua` is not compatible with V2. Use the V2 `config.lua` and copy your own values into it by hand, then add the new items (see [Upgrading from V1](https://complete-scripts.gitbook.io/complete-scripts/scripts/complete-hunting/updates.md#upgrading-from-v1)). Also check that `Config.Debug = false`.

{% hint style="danger" %} <mark style="color:red;">**No such export getSharedObject in resource es\_extended (on QBCore or QBOX)**</mark>
{% endhint %}

The script detects your framework when it starts. If `complete_hunting` starts before `qb-core` or `qbx_core`, it doesn't find them and falls back to ESX. In your server.cfg, `ensure` your framework **before** `complete_hunting` (see [Correct Asset Placement](https://complete-scripts.gitbook.io/complete-scripts/scripts/complete-hunting/installation.md#correct-asset-placement)).

{% hint style="danger" %} <mark style="color:red;">**No animals in the hunting zone**</mark>
{% endhint %}

In V2 animals are always spawned by the server, and **only inside the hunting zones**. GTA's own wild deer, boar, mountain lions and so on are disabled on purpose, so you won't find them around the map anymore. Check that:

* you are within `Config.huntRadious` (300 m by default) of a point in `Config.huntPoint`, look for the **Hunting Zone** blip;
* the points of `Config.huntPoint` are on open land, not in water or on a cliff, and no `id` is used twice;
* `Config.MaxAnimalsPerZone` is higher than 0;
* OneSync is enabled on your server.

If you see animals with blips but they run away immediately, that's the animal AI: crouch, move slowly and approach downwind (see [How to play](https://complete-scripts.gitbook.io/complete-scripts/scripts/complete-hunting/how-to-play.md)).

{% hint style="danger" %} <mark style="color:red;">**Too many animals in a zone**</mark>
{% endhint %}

The server enforces `Config.MaxAnimalsPerZone` (10 by default) per zone, also with many players in the same zone. Lower it, or use `maxPerZone` in `Config.AnimalSpecies` to limit one species. Dead animals don't count, so a zone refills after you hunt it.

{% hint style="danger" %} <mark style="color:red;">**An animal I added is ignored**</mark>
{% endhint %}

Only the models in `Config.Animals` are spawned and can be harvested. Add a row for the new model (with its `dimension`, pelt items and prices), optionally an entry in `Config.AnimalSpecies` and `Config.AnimalLabels`, and add its items to your inventory.

{% hint style="danger" %} <mark style="color:red;">**The bear never appears**</mark>
{% endhint %}

The bear needs the optional external model (see [Bear model](https://complete-scripts.gitbook.io/complete-scripts/scripts/complete-hunting/installation.md#bear-model-optional)). If the model is not installed, the server console shows `Model "bear" failed to spawn and has been removed from the spawn rotation`. If it is installed, check that it starts before `complete_hunting` and that its model name is `bear` (or change the name in the config). The bear is also very rare by default (`spawnWeight = 1`): raise it in `Config.AnimalSpecies['bear']` to test.

{% hint style="danger" %} <mark style="color:red;">**I don't receive the items, or items have no name or image**</mark>
{% endhint %}

The items are not in your server yet. Add them as shown in [Item Configuration](https://complete-scripts.gitbook.io/complete-scripts/scripts/complete-hunting/installation.md#item-configuration): every pelt, meat and special item of `Config.Animals` must exist, bear items included. If you renamed an item in `config.lua`, rename it in your items too. Item pictures are not included: add a `<item name>.png` to your inventory's images folder.

{% hint style="danger" %} <mark style="color:red;">**"Another hunter is working this animal"**</mark>
{% endhint %}

Another player is harvesting or carrying that carcass, so it is locked for everyone else. The lock is released when they finish or leave, or after `Config.HarvestClaimTimeout` seconds.

{% hint style="danger" %} <mark style="color:red;">**The carcass disappeared**</mark>
{% endhint %}

A carcass stays in the world for `Config.Carcass.lifetime` seconds (15 minutes by default) and is never removed while a player is within `Config.Carcass.keepRadius`. To take it further, load it in a vehicle trunk: carcasses in a trunk never despawn.

{% hint style="danger" %} <mark style="color:red;">**"The trunk is closed" or "It won't fit"**</mark>
{% endhint %}

Open the vehicle's trunk first (`Config.Trunk.requireOpenBoot`). Every vehicle class has a weight limit in `Config.Trunk.capacityByClass`: motorcycles and bicycles have 0, so nothing fits.

{% hint style="danger" %} <mark style="color:red;">**My traps never catch anything**</mark>
{% endhint %}

Traps are realistic on purpose. Place them inside a hunting zone, then walk away: animals don't come near while a player is within 18 m, and a fresh trap smells of you for a few minutes. Conceal it, put it on a game trail or next to a feed pile, and use the right trap for the animal size (the snare is for rabbits). Birds are never trapped.

{% hint style="danger" %} <mark style="color:red;">**"You need to wait before use it again" with the bait or the campfire**</mark>
{% endhint %}

There is a cooldown between baits (`Config.TimeBetween`, in seconds) and between cooking (`Config.CampfireTimeBetween`). In the current version these cooldowns are shared by the whole server, not counted per player: lower them if players on a busy server have to wait too often.

{% hint style="danger" %} <mark style="color:red;">**Campfire not working**</mark>
{% endhint %}

If `/campfire` does nothing, check `Config.UseNativeCampfire`: with `true` players can only cook at the campfires already on the map and can't place their own. Set it to `false`. Placing a campfire needs 2 `coal` and 4 `wood` by default, and is not allowed near a `Config.noCampfireZone`.

{% hint style="danger" %} <mark style="color:red;">**The vendor or the illegal buyer is missing**</mark>
{% endhint %}

Check `Config.EnableShopNpc = true` and the coordinates in `Config.Locations`. The vendors and the animals are spawned by the server: if your anticheat deletes server-spawned peds, whitelist `complete_hunting` in it.

{% hint style="danger" %} <mark style="color:red;">**The legal shop refuses my pelts**</mark>
{% endhint %}

You reached the weekly limit for that species (the Sell tab shows it), or the species is protected (`isIllegal = true`) and only the illegal buyer takes it. With `Config.SpeciesLimits.requireLicenseToSellLegal = true` you also need the `hunting_license` item. Limits are in `Config.SpeciesLimits`.

{% hint style="danger" %} <mark style="color:red;">**Money from the illegal buyer goes to cash on QBCore or QBOX**</mark>
{% endhint %}

QBCore and QBOX have no black money account, so it is paid in cash. If your server has one, change `mapAccount` in `complete_hunting/frameworks/qbcore/server.lua` (or `frameworks/qbox/server.lua`).

{% hint style="danger" %} <mark style="color:red;">**The binoculars or tracker key does nothing**</mark>
{% endhint %}

The player must have the `binoculars` or `wildlife_tracker` item. If you changed `toggleKey` in the config, players who already joined keep the old key: FiveM saves key bindings per player, they can change it in Settings > Key Bindings > FiveM.

{% hint style="danger" %} <mark style="color:red;">**No police alerts on illegal sales**</mark>
{% endhint %}

The alert is a chance (`Config.PoliceAlert.illegalRisk`, 25% per selling session), not every sale. Check that `Config.PoliceAlert.minPolice` is not higher than the police online and that their jobs are in `policeJobs` and on duty. With `system = 'auto'` the script uses the first dispatch script it finds started, otherwise the built-in alert.

{% hint style="danger" %} <mark style="color:red;">**No such export addModel in resource ox\_target**</mark>
{% endhint %}

You set `Config.UseTarget = true` but ox\_target is not started (or is outdated). Install and `ensure` ox\_target before `complete_hunting`, or set `Config.UseTarget = false`. To use another target script, edit `InitializeTarget` at the bottom of `config.lua` (see [Exports](https://complete-scripts.gitbook.io/complete-scripts/scripts/complete-hunting/exports.md#client-events-for-custom-target-setups)).

{% hint style="danger" %} <mark style="color:red;">**"Where do you get hunting weapons?"**</mark>
{% endhint %}

The script doesn't give weapons: players bring their own. Knives for harvesting are in `Config.KnifesForHarvest`. With `Config.WeaponsOnlyHunting = true` the weapons in `Config.HuntingWeapons` only work inside hunting zones.
