setPedGravity
SET_PED_GRAVITY0x9FF447B6B6AD960AThe GTA V native SET_PED_GRAVITY of the PED namespace, as LS:MP client scripts call it: the global function setPedGravity, in JavaScript and in Lua.
setPedGravity(ped: Ped, toggle: boolean): voidsetPedGravity(ped: Ped, toggle: boolean)Usage
JavaScript
setPedGravity(ped, toggle);Lua
setPedGravity(ped, toggle)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
toggle | BOOL | boolean | boolean |
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.
enable or disable the gravity of a ped
Examples:
setPedGravity(playerPedId(), 0x00000001);
setPedGravity(Local_289[iVar0 /*20*/], 0x00000001);Reference
- Namespace
- Ped PED
- In the game
void SET_PED_GRAVITY(Ped ped, BOOL toggle)- Hash
0x9FF447B6B6AD960A