F.A.Q

4 min readUpdated 1 weeks ago

Setup

Traps are saved to the ml_traps table so they survive restarts, which needs oxmysql. To run without a database, set:

shared/config.lua
1Config.Persistence = { enabled = false }

Set the language code. Translation files live in locales/.

shared/config.lua
1Config.locale = 'en'

Yes. Switch the interaction method:

shared/config.lua
1Config.InteractionMethod = 'textui'

Traps and Cages

A snap trap sits on the ground. Animals walk up, feed on the bait, then wander off. It does not hold anything. A cage trap closes a door on whatever enters its radius and holds it alive, ready to be killed, released or picked up.

Not by default. Turn it on with:

shared/config.lua
1Config.AllowPlayerCapture = true

Only cage types flagged capturesPlayers trap players, and the shipped Large Cage is the one that has it. A non-owner who steps into the baited cage springs it shut on themselves, and the owner or an admin can close it on a player standing inside. The captive cannot open the cage and is auto-released after Config.MaxPlayerCaptureSeconds.

Each bait lists the ped models it lures, set per trap type:

shared/config.lua
1['meat_bait'] = {
2    animals = { 'a_c_mtlion', 'a_c_coyote', 'a_c_boar' },
3}

A cage with Config.CageCatchAll = true also catches any animal or NPC that physically enters the cage, regardless of the bait list. Players are never caught this way, that is what Config.AllowPlayerCapture controls.

One. The trap walks the nearest matching animal in and leaves the rest alone until it is free again. This also holds with the ambient spawner on.

Yes. Turn on the ambient spawner:

shared/config.lua
1Config.AmbientSpawn = { enabled = true }

A baited trap with no animal to lure asks the server to spawn one in the distance, synced for every player, and it wanders in on its own. One animal per trap at a time, with a per-trap timer between spawns.

Hold a melee weapon from Config.KillWeapons and use the Kill option in the panel. The server checks the held weapon before allowing the kill. The animal drops where it stands and leaves a carcass on the ground to loot.

Not out of the box. Set enabled = true in Config.KillLoot, then tune the per-animal lists:

shared/config.lua
1['a_c_boar'] = {
2    { item = 'meat', min = 2, max = 4, chance = 100 },
3    { item = 'hide', min = 1, max = 1, chance = 50 },
4},

Each entry rolls its own chance and amount, and the items go to the killer, or on the ground when the inventory is full. The item names must exist in your inventory. Leave the table off to keep rewards in open/server.lua.

Not while these stay on, which is the default:

shared/config.lua
1Config.OwnerOnlyPickup = true
2Config.OwnerOnlyCage = true

OwnerOnlyPickup blocks anyone but the owner or an admin from picking the trap up. OwnerOnlyCage blocks them from opening the cage or killing the captive.

Durability

A trap with a durability value drains hours of active use while it is baited or holding a capture. At zero it breaks: the bait is lost, any captive is released, and it cannot be used again until repaired with the configured materials.

Remove the durability and RepairItems fields from that trap type. The wear system and the repair tab disappear for it.

Persistence

Yes, by default. Both snap and cage traps ship persistent, so they reload where you left them. The persistent field on each trap type controls this: set it to false to keep that type in memory only.

The cleanup pass removes persistent traps that have not been used for Config.Cleanup.inactiveDays. Raise the value or disable it:

shared/config.lua
1Config.Cleanup = { enabled = false }

Updates

  1. Download latest from CFX Portal
  2. Backup config files
  3. Replace all files except config
  4. Restart the resource

Traps in the ml_traps table are preserved. If you rename any trap or bait item key, update the matching trap_type and bait_type values in that table.