Common problems
Fixes for the problems server owners hit most with Hunting, from startup boxes to weapons, rentals, traps and zones.
Startup
The console shows a RESOURCE NOT FOUND box
Hunting couldn't find a framework, inventory or target. The box names the missing category and lists the resources Hunting supports. Start that resource before gg_hunting in server.cfg and keep its original folder name, because Hunting finds resources by name.
The console shows CONFIG FILES FAILED TO LOAD
One of the config files has a Lua error, usually a missing comma or bracket after an edit. The box lists the files. Check the lines you changed, or compare the file with a fresh copy from your download.
Hunting uses the wrong inventory or target
Detection takes the first supported resource that is installed, even a stopped one. Remove the one you don't run from your resources folder, or set inventory or target in gg_hunting/utility.lua, for example inventory = "ox_inventory".
Items and weapons
The rifle or crossbow can't be equipped or reloaded on ox_inventory
The weapons go in the Weapons table and the ammo in the Ammo table, both in ox_inventory/data/weapons.lua. They don't go in data/items.lua. Fix the entries as shown on the ox_inventory page and restart the server.
Selling on one_inventory says an error has occurred
This was fixed in 2.1.8. Download the latest gg_hunting from the portal and replace your copy.
The rifle scope doesn't show
Hunting doesn't hide the scope. Another resource calls HideHudComponentThisFrame(14) every frame, which hides the scope of every sniper weapon. To confirm, give yourself weapon_sniperrifle and aim: if its scope is missing too, the cause is another resource. Search your resources folder for HideHudComponentThisFrame(14, or stop resources about 10 at a time in txAdmin until the scope comes back.
Hunting
Kills with my own weapon don't count
- For a GTA or addon weapon, add its name to
validWeaponsinconfig/shared/settings.luaand restartgg_hunting. Never addweapon_unarmed. - For a bow that shoots props, Hunting can't see the hit. Count it with the registerKill export.
- A lock next to the animal's name when you target it means your level is too low for that animal. Kills of that animal count once you reach its level, or set
advanced.level_kill_require = false.
Trap bait chances are ignored
In 2.1.9 the trap reads weight while config/shared/traps.lua says chance, so every animal a bait lists is equally likely. In each animalLure list in that file, rename chance to weight:
animalLure = {
{model = "a_c_rabbit_01", weight = 30},
{model = "a_c_hen", weight = 25},
{model = "a_c_cat_01", weight = 15},
}
Leave chance as it is in captureItems. Restart gg_hunting afterwards.
No animals spawn in a zone
- Check on the hunting map that the zone is open. Only five zones are open at a time.
- Stay in the zone for 60 seconds before animals start to spawn.
- After a kill, new animals wait 60 seconds. Each player can have 2 live animals in a zone, and a zone holds 7.
- Animals spawn on natural ground. A zone drawn over roads, water or a town spawns few or none.
Vehicles
The rental won't start or spawns with a broken engine
Since 2.1.8 rentals spawn repaired and start when you press W. Update to the latest version. If a rental still spawns broken, another script, often a vehicle damage or mechanic script, changes new vehicles. Spawn a verus by the lodge with your admin menu: if it's broken too, check that script's settings for spawned vehicles.
The rental has no keys
Hunting gives keys through the first started resource in its list in core/lib/miniBridge/client.lua. A garage script whose own keys you don't use, such as cd_garage, can catch it before your keys script. In gg.keys.AddKeys, remove the branch for that resource.
For a keys script that isn't in the list, add your own branch above if GetResourceState('bhd_garage'). For example, for p_vehiclekeys:
if GetResourceState('p_vehiclekeys') == 'started' then
exports['p_vehiclekeys']:createKey(plate, veh)
return true
end
Start your keys script before gg_hunting. If you don't know your keys script's export, ask in the Discord.
"Can't Place that Inside a Vehicle" when loading a carcass
The vehicle has no position for that animal in that slot. Every vehicle in HuntingVehicles in config/shared/general.lua needs a line for each animal model in each animalPos slot. Copy the lines from the verus or bodhi2 entry and adjust them for your vehicle.
The same message shows when you place a bait, trap or campfire, or use the tracker, from inside a vehicle. Get out first.
Zones and admins
The /gg_hunting:zoneEditor command doesn't exist
- Your identifier isn't in
adminsinutility.lua. On ESX, always add it there. Restartgg_huntingafter the change and rejoin. - There are no zones left in the database, so joining admins don't get the command. Restart
gg_huntingwhile you are in the server, wait about a minute for the command, then draw a zone.
The console says the database readiness check timed out
The gg_hunting_zones table is missing or empty. Hunting adds the default zones only on its very first start. Restart gg_hunting while you are in the server as an admin, wait about a minute for the command, and draw at least one zone with the zone editor.
Editing zone_data.json changes nothing
Hunting reads base/build/zone_data.json only on its first start. After that the zones live in the database. Change them with the zone editor.
