isPedHeadingTowardsPosition
IS_PED_HEADING_TOWARDS_POSITION0xFCF37A457CB96DC0The GTA V native IS_PED_HEADING_TOWARDS_POSITION of the PED namespace, as LS:MP client scripts call it: the global function isPedHeadingTowardsPosition, in JavaScript and in Lua.
isPedHeadingTowardsPosition(
ped: Ped,
x: number,
y: number,
z: number,
p4: number
): booleanisPedHeadingTowardsPosition(
ped: Ped,
x: number,
y: number,
z: number,
p4: number
): booleanUsage
JavaScript
const result = isPedHeadingTowardsPosition(ped, x, y, z, p4);Lua
local result = isPedHeadingTowardsPosition(ped, x, y, z, p4)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
const result = isPedHeadingTowardsPosition(ped, pos, p4);Lua · with vectors
local result = isPedHeadingTowardsPosition(ped, pos, p4)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
p4 | float | number | number |
Returns
BOOL JavaScript boolean, Lua booleanReference
- Namespace
- Ped PED
- In the game
BOOL IS_PED_HEADING_TOWARDS_POSITION(Ped ped, float x, float y, float z, float p4)- Hash
0xFCF37A457CB96DC0