RedM Natives

SET_PED_TO_RAGDOLL

p4/p5: Unusued in TU27 Ragdoll Types This is the server-side RPC native equivalent of the client native SET_PED_TO_RAGDOLL.

Hash0x83CB5052
Runtime nameSetPedToRagdoll
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void SET_PED_TO_RAGDOLL(Ped ped, int minTime, int maxTime, int ragdollType, BOOL bAbortIfInjured, BOOL bAbortIfDead, BOOL bForceScriptControl);

Parameters

NameTypeDescription
pedPed

The ped to ragdoll.

minTimeint

Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1.

maxTimeint—
ragdollTypeint—
bAbortIfInjuredBOOL

unused

bAbortIfDeadBOOL

unused

bForceScriptControlBOOL—

Returns void

Description

Cfx.re native reference

p4/p5: Unusued in TU27

Ragdoll Types

0: CTaskNMRelax 1: CTaskNMScriptControl: Hardcoded not to work in networked environments. Else: CTaskNMBalance

This is the server-side RPC native equivalent of the client native SET_PED_TO_RAGDOLL.

Usage

Lua
SetPedToRagdoll(ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl)

-- always works, by hash
Citizen.InvokeNative(0x83cb5052, ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl)
JavaScript and C#
JavaScript
SetPedToRagdoll(ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl);

// by hash
Citizen.invokeNative('0x83cb5052', ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl);
C#
Function.Call((Hash)0x83cb5052, ped, minTime, maxTime, ragdollType, bAbortIfInjured, bAbortIfDead, bForceScriptControl);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.