hasPedClearLosToEntity
_HAS_PED_CLEAR_LOS_TO_ENTITY0xA32ABFEB2A03B306The GTA V native _HAS_PED_CLEAR_LOS_TO_ENTITY of the PED namespace, as LS:MP client scripts call it: the global function hasPedClearLosToEntity, in JavaScript and in Lua.
hasPedClearLosToEntity(
ped: Ped,
entity: Entity,
x: number,
y: number,
z: number,
p5: number,
p6: boolean,
p7: boolean
): booleanhasPedClearLosToEntity(
ped: Ped,
entity: Entity,
x: number,
y: number,
z: number,
p5: integer,
p6: boolean,
p7: boolean
): boolean⚠
Not in this game build
The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.
Usage
JavaScript
const result = hasPedClearLosToEntity(ped, entity, x, y, z, p5, p6, p7);Lua
local result = hasPedClearLosToEntity(ped, entity, x, y, z, p5, p6, p7)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 = hasPedClearLosToEntity(ped, entity, pos, p5, p6, p7);Lua · with vectors
local result = hasPedClearLosToEntity(ped, entity, pos, p5, p6, p7)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
entity | Entity | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
p5 | int | number | integer |
p6 | BOOL | boolean | boolean |
p7 | BOOL | boolean | boolean |
Returns
BOOL JavaScript boolean, Lua booleanReference
- Namespace
- Ped PED
- In the game
BOOL _HAS_PED_CLEAR_LOS_TO_ENTITY(Ped ped, Entity entity, float x, float y, float z, int p5, BOOL p6, BOOL p7)- Hash
0xA32ABFEB2A03B306- Introduced
- Game build 3095 legacy numbering