setPedToRagdollWithFall
SET_PED_TO_RAGDOLL_WITH_FALL0xD76632D99E4966C8The GTA V native SET_PED_TO_RAGDOLL_WITH_FALL of the PED namespace, as LS:MP client scripts call it: the global function setPedToRagdollWithFall, in JavaScript and in Lua.
setPedToRagdollWithFall(
ped: Ped,
time: number,
p2: number,
ragdollType: number,
x: number,
y: number,
z: number,
velocity: number,
p8: number,
p9: number,
p10: number,
p11: number,
p12: number,
p13: number
): booleansetPedToRagdollWithFall(
ped: Ped,
time: integer,
p2: integer,
ragdollType: integer,
x: number,
y: number,
z: number,
velocity: number,
p8: number,
p9: number,
p10: number,
p11: number,
p12: number,
p13: number
): booleanUsage
const result = setPedToRagdollWithFall(
ped, time, p2, ragdollType, x, y, z, velocity, p8, p9, p10, p11, p12, p13
);local result = setPedToRagdollWithFall(
ped, time, p2, ragdollType, x, y, z, velocity, p8, p9, p10, p11, p12, p13
)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
const result = setPedToRagdollWithFall(
ped, time, p2, ragdollType, pos, velocity, p8, p9, p10, p11, p12, p13
);local result = setPedToRagdollWithFall(
ped, time, p2, ragdollType, pos, velocity, p8, p9, p10, p11, p12, p13
)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
time | int | number | integer |
p2 | int | number | integer |
ragdollType | int | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
velocity | float | number | number |
p8 | float | number | number |
p9 | float | number | number |
p10 | float | number | number |
p11 | float | number | number |
p12 | float | number | number |
p13 | float | number | number |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Return variable is never used in R*'s scripts.
Not sure what p2 does. It seems like it would be a time judging by it's usage in R*'s scripts, but didn't seem to affect anything in my testings.
x, y, and z are coordinates, most likely to where the ped will fall.
p8 to p13 are always 0f in R*'s scripts.
(Simplified) Example of the usage of the function from R*'s scripts:
ped::set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forward_vector(ped), 1f, 0f, 0f, 0f, 0f, 0f, 0f);Reference
- Namespace
- Ped PED
- In the game
BOOL SET_PED_TO_RAGDOLL_WITH_FALL(Ped ped, int time, int p2, int ragdollType, float x, float y, float z, float velocity, float p8, float p9, float p10, float p11, float p12, float p13)- Hash
0xD76632D99E4966C8