← All docsCivilian jobs

Swarm Hunting

A hunting job: wildlife spawns in large hunting areas, rifle kills keep the hide intact, and a skinning minigame yields meat, hides and trophies. Includes upgrades, a journal and 10 levels.

QboxQBCoreESXResource: swarm_hunting

New to Swarm scripts? Read Getting started first. It covers Swarm Bridge, install order and the licence.

Requirements

Frameworks: Qbox, QBCore, ESX.

RequirementWhat it's forIncluded
swarm_bridgeTalks to your framework, inventory, target and so on. Included with every Swarm script.Yes
ox_libShared library (callbacks, progress bars, text UI).No
oxmysqlSaves player stats and progress.No
ox_target or qb-targetThe lodge and trader NPCs are opened with your target eye. /hunting still opens the hub without one.No
ox_inventory (recommended)The script checks for weapon items named like WEAPON_KNIFE and WEAPON_MUSKET and sells ammo-musket, which is ox_inventory naming.No

Install

  1. Copy the folders swarm_hunting, swarm_bridge into your server's resources folder. Already have swarm_bridge from another Swarm script? Keep just one copy, the newest.
  2. Add them to server.cfg, dependencies first:
    ensure ox_lib
    ensure oxmysql
    ensure ox_target
    ensure ox_inventory
    ensure swarm_bridge
    ensure swarm_hunting
  3. Database: tables are created automatically the first time the script starts. If you prefer, import install/swarm_hunting.sql yourself first.
  4. Items: add the item definitions for your inventory from install/items/:
    • ox_inventory.items.lua for ox_inventory (any framework)
    • qbcore.items.lua for QBCore or Qbox with qb-inventory
    • esx.items.sql for legacy ESX

    Then copy install/images/*.png into your inventory's image folder (ox_inventory/web/images/ or qb-inventory/html/images/). Icons are named SS_<item>.png so they never overwrite another resource's images. Every item has an icon included.

    Items added (14)
    raw_venison raw_boar raw_coyote raw_rabbit raw_cougar deer_hide boar_hide coyote_hide rabbit_pelt cougar_hide antlers boar_tusk cougar_tooth hunting_permit

    Your server must already have these as inventory items: WEAPON_MUSKET (or WEAPON_SNIPERRIFLE / WEAPON_MARKSMANRIFLE), WEAPON_KNIFE (or hatchet / machete) and ammo-musket.

  5. Licensed edition only: put your ServerSecret in swarm_bridge/licence/private_config.lua. One secret unlocks every Swarm script you own. How to get it. The Source Code edition has no licence check, so skip this.
  6. Start the server and check the console for errors.

Configuration

Open config.lua and check these before going live. Anything marked as a placeholder should be moved to a spot that suits your map.

SettingWhat it does
Config.LodgePed.coordsWhere the Hunting Lodge NPC stands (clock in and shop). Placeholder coords.
Config.MarketPed.coordsWhere the game trader NPC stands.
Config.AreasHunting grounds: coords, radius, minimum level and spawns.
Config.ShopWeapon, ammo and knife item names. They must match your inventory.
Config.RequirePermit / Config.PermitItemRequire a hunting_permit to clock in. The permit isn't sold by this script, so hand it out another way if you turn this on.
Config.SpawnAnimal spawn density and distances.
Config.MoneyAccountAccount players are paid into. 'cash' by default.
Config.Locale'auto' follows the language set in Swarm Bridge. Set a code such as 'de' to force this script into another language. See Languages.

Commands & permissions

CommandWhoWhat it does
/huntingEveryoneOpens the hunting hub from anywhere.
/huntposDebug mode onlyCopies your current position as a vec4. Only exists while Config.Debug = true.

Debug helpers only exist while Config.Debug = true in config.lua. Leave debug off on a live server.

No ACE permissions are needed.

Keys

  • E: skin a dead animal within 2 m

Good to know

  • Kills with anything other than a rifle ruin the hide.
  • Cougars are dangerous and will attack the player.
  • /hunting opens the hub from anywhere, so players can buy and sell without visiting the NPCs.

Need help?

Ask in the Swarm Scripts Discord and we'll help you get set up.