Documentation › Hunting System › Installation

Installation

Get the Hunting System running on your server.

Download the resource

Log in to the Portal CFX, open Granted Assets, find smilescripts_hunting and download the package. Extract it into your resources folder.

Start the dependencies first

The resource needs oxmysql and ox_lib, plus your inventory. A target resource is optional; without one an ox_lib TextUI prompt is used. OneSync must be enabled (default on current servers).

cfg
ensure oxmysql
ensure ox_lib
ensure ox_inventory      # or your inventory
ensure ox_target         # optional
ensure smilescripts_hunting

Add the items

All items are defined in config/config_items.lua. With Config.AutoInstallItems = true (default) the resource checks your inventory on every start and never edits other resources' files:

Missing items are written to install/ox_items_missing.lua inside this resource. Paste them into ox_inventory/data/items.lua, copy install/images/* into ox_inventory/web/images/ and restart the server.

Missing items are registered automatically (in memory). You can also copy the entries from install/qb_items.md into qb-core/shared/items.lua. Copy the icons into your inventory's image folder.

Missing items are inserted into the items table automatically; restart the server once. install/esx_items.sql does the same manually. Copy the icons into your inventory's image folder.

Full item list: Items.

Database

Tables are created automatically on the first start. For a manual setup, import install/install.sql. It is safe to run more than once.

Give yourself admin access

Add your license: identifier to Config.Admins in config/config_main.lua, or grant the ACE permission:

cfg
add_ace group.admin smilescripts_hunting.admin allow
add_ace group.admin smilescripts_hunting.boost allow

Not sure what your identifier is? Run /adminh once. Without access, the server console prints all your identifiers so you can copy one.

Start hunting

Restart the server or run ensure smilescripts_hunting. A summary box appears in the server console: version, framework, inventory, target, database, item status, enabled systems and whether an update is available.

Keep Config.Debug = false in production.

Updating

No manual migration is needed: every table uses CREATE TABLE IF NOT EXISTS. Back up your config/ and bridge/ folders before replacing files, then copy your changes back.

From 1.2 to 1.3: add the new items hunting_trap_small and hunting_trap_cage (the console tells you if they are missing), add the new config/config_traps.lua and config/config_items.lua, and remove a separate s_hunting_props resource if you used one. Details: Changelog.

Next: Configuration · Integrations