Carry
The client-side Carry global manages attaching a ped to the player with mode-specific bone offsets and animations. Use it for handcuffing, rescuing, or dragging scenarios. Never call AttachEntityToEntity directly for these cases — Carry handles animation loading, bone alignment, and automatic cleanup.
Three Modes
| Mode | Description |
|---|---|
carry | Player holds the ped in their arms (over-the-shoulder) |
escort | Player walks alongside the ped, hand on shoulder |
drag | Player drags the ped along the ground behind them |
Starting a Carry
Carry.start(targetPed, mode)-- Carry an incapacitated ped
Carry.start(targetPed, 'carry')
-- Escort a handcuffed player
Carry.start(targetPed, 'escort')
-- Drag an unconscious ped
Carry.start(targetPed, 'drag')mode defaults to 'carry' if not provided.
Stopping a Carry
Carry.stop()Detaches the ped, clears animations on both the player and target, and emits carry:stopped.
Checking State
Carry.isActive() -- boolean — is a carry currently active?
Carry.getTarget() -- integer|nil — entity handle of the carried ped
Carry.getMode() -- string|nil — 'carry' | 'escort' | 'drag'Events
Carry emits EventBus events you can subscribe to from any module:
| Event | Payload | When |
|---|---|---|
carry:started | { ped, mode } | A carry begins |
carry:stopped | { ped, mode } | A carry ends |
EventBus.on('carry:started', function(data)
-- e.g. restrict player movement speed
end)
EventBus.on('carry:stopped', function(data)
-- e.g. restore movement speed
end)Safety Monitor
Carry runs a background thread that checks every 500ms whether the target ped still exists. If the entity is destroyed (player disconnects, ped deleted), Carry.stop() is called automatically.
Full Example — Handcuff System
-- Server: tell the target's client to enter carry state
TriggerClientEvent('net:mymodule:beingCarried', targetSource, GetPlayerPed(playerSource))
-- Target client handler
AddEventHandler('net:mymodule:beingCarried', function(carrierPed)
-- disable controls while being carried
CreateThread(function()
while Carry.isActive() do
DisableAllControlActions(0)
Wait(0)
end
end)
end)
-- Carrier client: start escort
Carry.start(GetPlayerPed(targetSource), 'escort')
-- When done
Carry.stop()API Reference
| Method | Description |
|---|---|
Carry.start(targetPed, mode?) | Begin carrying the target ped in the given mode |
Carry.stop() | Release the target ped and clear animations |
Carry.isActive() | Returns true if a carry is currently active |
Carry.getTarget() | Returns the entity handle of the carried ped, or nil |
Carry.getMode() | Returns the current mode string, or nil |
Client-only
Carry is a client-side global. It is not available in server scripts.