EARLY ACCESS – This release will receive constant updates if needed to ensure you use it to the best! One-Time Purchase - Video Preview.
What MFPD-DragCorpse Does
- Drag any downed entity – Players can
/dragplayerto haul another (downed) player, or/dragto pick up an NPC — alive or dead — and move them around with smooth start/loop/end animations. - Seamless network sync – All attach/detach actions are routed through server events (
syncPlayer/syncNPC → syncTarget/syncNPCTarget), so everyone sees the same dragging motion and final placement. - Auto-release & cleanup – Press the “duck” key (default X) to drop instantly; if either the dragger or dragged disconnects, the other is freed and animations are cleaned up automatically.
Framework & Job-Permission Support (new)
- Config-driven –
config.lualets you pick"Standalone","ESX"(legacy or new export) or"QB", and list jobs (e.g.,"police","ambulance") allowed to use the drag commands. - Silent checks –
HasDragPerm()runs each time; if the player’s job isn’t authorised, nothing happens—no chat spam. - Live job updates – ESX/QB job-change events update the cached job instantly, so permission is gained or lost without a relog.
- Zero impact for Standalone – Set
Framework = "Standalone"and all job logic is skipped.
Key Failsafes & Edge-Case Handling
- Distance & vehicle checks
Rejects drag attempts beyond ≈5 m (players) or 4 m (NPCs) and blocks dragging anyone inside a vehicle. - Entity protection
Nearby vehicles/NPCs within 10 m are flagged as “mission entities” to prevent despawn; flags are cleared on release. - AI-lock for NPCs
Clears tasks, forces them out of vehicles, and freezes ambient AI so corpses don’t flail or wander off. - Network-control timeouts
When reviving a corpse (wasDead), requests control for up to 1 s before health-reset/kill operations. - Disconnect safety
Server keepsdragging,dragged,npcDraggingtables; onplayerDroppedit fires “stop” events so no one stays stuck.
Why It’s More Complex:
- Coroutine-based enumeration – Custom
EnumerateEntitieswraps native find/next APIs for cleaner loops. - Animation lifecycle management – Overrides
TaskPlayAnimto auto-unload dictionaries after each play. - Dual code paths – Separate flows for “player → player” vs. “player → NPC” with distinct revive/kill logic.
- Server-side enforcement – Range checks, integration hooks, and once-per-corpse guards ensure consistent behaviour.
Together, MFPD-DragCorpse is a robust, network-safe system for moving bodies (or live NPCs) around.

