PedClient

setPedRagdollOnCollision

SET_PED_RAGDOLL_ON_COLLISION0xF0A4F1BBF4FA7497

The GTA V native SET_PED_RAGDOLL_ON_COLLISION of the PED namespace, as LS:MP client scripts call it: the global function setPedRagdollOnCollision, in JavaScript and in Lua.

SignatureJavaScript
setPedRagdollOnCollision(ped: Ped, toggle: boolean): void
SignatureLua
setPedRagdollOnCollision(ped: Ped, toggle: boolean)

Usage

JavaScript
setPedRagdollOnCollision(ped, toggle);
Lua
setPedRagdollOnCollision(ped, toggle)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
toggleBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Causes Ped to ragdoll on collision with any object (e.g Running into trashcan). If applied to player you will sometimes trip on the sidewalk.

Reference

Namespace
Ped PED
In the game
void SET_PED_RAGDOLL_ON_COLLISION(Ped ped, BOOL toggle)
Hash
0xF0A4F1BBF4FA7497

Open in the interactive natives reference