ev_bodydrag
EV_BODYDRAG is a forked ressource from IceMallowz. Completely edited and changed to work properly and optimized.

EV Body Drag System
This document provides detailed instructions for setting up and using the EV Body Drag System. The system allows players to drag other players when they are incapacitated or dead. It integrates with QBCore and uses the osp_ambulance resource for death state checks.
Configuration
Core Settings
The system includes basic settings for distances and key mappings.
Client-Side Functionality
Core Functions
Get Closest Player
Finds the closest player to the current player using QBCore utilities.
Check if a Player is Dead
This function checks if the target player is dead using the osp_ambulance export.
Dragging Logic
The dragging functionality is triggered through events and can be controlled using ox_target and keybinds.
Start/Stop Dragging
Drag or stop dragging a player using the ev_target:drag event.
Interaction Integration
The system uses ox_target for interaction:
Keybinds
Custom keybinds for control during dragging:
Move Right: Default key:
DMove Left: Default key:
AStop Dragging: Default key:
G
Example of adding a keybind:
Server-Side Functionality
Core Events
Attach Player
Trigger a client event to attach the dragging player.
Detach Player
Trigger a client event to detach the dragging player.
Usage Guide
Dragging a Player
Approach a dead or incapacitated player.
Use the ox_target interaction to drag the player (default label:
Drag).Follow the prompts to drag the player.
Use the
Gkey to stop dragging.
Interaction Validation
The interaction option is only available if:
The player is dead or incapacitated (validated using
osp_ambulance).The target player is within the defined interaction distance.
Notes
This script requires the
osp_ambulanceresource for death state checks.Ensure that the
osp_ambulanceexport (:isDead) is properly integrated and functional.Customize distances, key mappings, and labels as needed to suit your server's preferences.
Last updated