isPedEvasiveDiving
IS_PED_EVASIVE_DIVING0x414641C26E105898The GTA V native IS_PED_EVASIVE_DIVING of the PED namespace, as LS:MP client scripts call it: the global function isPedEvasiveDiving, in JavaScript and in Lua.
isPedEvasiveDiving(ped: Ped): [ok: boolean, evadingEntity: Entity]isPedEvasiveDiving(ped: Ped): boolean, EntityUsage
JavaScript
const [ok, evadingEntity] = isPedEvasiveDiving(ped);Lua
local ok, evadingEntity = isPedEvasiveDiving(ped)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | ok | BOOL | boolean | boolean | The native’s own return value. |
| 2 | evadingEntity | Entity | number | integer | output |
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Presumably returns the Entity that the Ped is currently diving out of the way of.
var num3;
if (isPedEvasiveDiving(A_0, &num3) != 0)
if (isEntityAVehicle(num3) != 0)Reference
- Namespace
- Ped PED
- In the game
BOOL IS_PED_EVASIVE_DIVING(Ped ped, Entity* evadingEntity)- Hash
0x414641C26E105898