setPedCanCowerInCover
SET_PED_CAN_COWER_IN_COVER0xCB7553CDCEF4A735The GTA V native SET_PED_CAN_COWER_IN_COVER of the PED namespace, as LS:MP client scripts call it: the global function setPedCanCowerInCover, in JavaScript and in Lua.
setPedCanCowerInCover(ped: Ped, toggle: boolean): voidsetPedCanCowerInCover(ped: Ped, toggle: boolean)Usage
JavaScript
setPedCanCowerInCover(ped, toggle);Lua
setPedCanCowerInCover(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.
It simply makes the said ped to cower behind cover object(wall, desk, car)
Peds flee attributes must be set to not to flee, first. Else, most of the peds, will just flee from gunshot sounds or any other panic situations.
Reference
- Namespace
- Ped PED
- In the game
void SET_PED_CAN_COWER_IN_COVER(Ped ped, BOOL toggle)- Hash
0xCB7553CDCEF4A735