# mack-beartrap
Video Link : https://medal.tv/games/red-dead-2/clips/nwTOSAHNstBXpvSoj?invite=cr-MSxzc2YsMTkxMDIwMzU5
A RedM bear trap resource, written as a from-scratch re-implementation of the
classic beartrap scripts. Fully plaintext — nothing is encrypted or obfuscated.
## Features
- **Server-authoritative trap pool** — traps are pure data on the server; every
client renders its *own local* (non-networked) trap prop within
`Config.TrapStreamDistance`. No owner-migration desync.
- **Placed on the ground in front of the player** (`Config.TrapPlaceForwardDistance`),
not underneath their feet.
- **Always placed closed** — a freshly placed trap spawns in its closed model
state, then (if `Config.PlaceTrapOpened` is true) plays its opening
animation and becomes armed after `Config.TrapOpenDelay` ms.
- **Open / close animations** on the trap object using
`script_re@bear_trap` (`bandage_dailog01_trap` / `bandage_dailog02_trap`).
- **Placement** from the inventory using the RSG core usable item.
- **Capture system** — players and/or NPCs/animals get caught, frozen, blocked
controls, optional HP drain and death timeout. Whether players, NPCs, and
the trap's own owner can be caught are each independently configurable.
- **Notifications** via the **bln_notify** resource (`bln_notify:send`).
- **Free yourself minigame** — mouse clicker to escape.
- **Injured walk** after being freed.
- **Rescue** by other players (open or take the trap on the victim).
- **Bait system** — place bait (consuming the item from inventory) on an open
trap to attract animals of the matching category. If no real matching
animal is found nearby within `Config.BaitSpawnFallbackDelay`, one is
spawned a short distance away and sent walking to the trap instead, so
baiting always produces a visible result (`Config.EnableBaitSpawnFallback`).
- **Map blips** — each active trap shows a blip (removed automatically when
taken), optionally restricted to just the owner.
- **Interactions via ox_target** — open / take / bait options on each trap.
- **Clean restarts** — all trap props/blips are removed on resource
stop/start, both for the client itself and for already-connected clients
when only the server side restarts.
- **Discord logging**, restricted placement zones, debug mode.