setPedToRagdoll
SET_PED_TO_RAGDOLL0xAE99FB955581844AThe GTA V native SET_PED_TO_RAGDOLL of the PED namespace, as LS:MP client scripts call it: the global function setPedToRagdoll, in JavaScript and in Lua.
setPedToRagdoll(
ped: Ped,
time1: number,
time2: number,
ragdollType: number,
p4: boolean,
p5: boolean,
p6: boolean
): booleansetPedToRagdoll(
ped: Ped,
time1: integer,
time2: integer,
ragdollType: integer,
p4: boolean,
p5: boolean,
p6: boolean
): booleanUsage
const result = setPedToRagdoll(ped, time1, time2, ragdollType, p4, p5, p6);local result = setPedToRagdoll(ped, time1, time2, ragdollType, p4, p5, p6)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
time1 | int | number | integer |
time2 | int | number | integer |
ragdollType | int | number | integer |
p4 | BOOL | boolean | boolean |
p5 | BOOL | boolean | boolean |
p6 | BOOL | boolean | boolean |
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.
p4/p5: Unused in TU27
time1- Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1.
time2- Unknown time, in milliseconds
ragdollType-
0 : Normal ragdoll
1 : Falls with stiff legs/body
2 : Narrow leg stumble(may not fall)
3 : Wide leg stumble(may not fall)
p4, p5, p6- No idea. In R*'s scripts they are usually either "true, true, false" or "false, false, false".
EDIT 3/11/16: unclear what 'mircoseconds' mean-- a microsecond is 1000x a ms, so time2 must be 1000x time1? more testing needed. -sob
Edit Mar 21, 2017: removed part about time2 being the microseconds version of time1. this just isn't correct. time2 is in milliseconds, and time1 and time2 don't seem to be connected in any way.
Reference
- Namespace
- Ped PED
- In the game
BOOL SET_PED_TO_RAGDOLL(Ped ped, int time1, int time2, int ragdollType, BOOL p4, BOOL p5, BOOL p6)- Hash
0xAE99FB955581844A