hasEntityClearLosToEntityInFront
HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT0x0267D00AF114F17AThe GTA V native HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT of the ENTITY namespace, as LS:MP client scripts call it: the global function hasEntityClearLosToEntityInFront, in JavaScript and in Lua.
hasEntityClearLosToEntityInFront(entity1: Entity, entity2: Entity): booleanhasEntityClearLosToEntityInFront(entity1: Entity, entity2: Entity): booleanUsage
JavaScript
const result = hasEntityClearLosToEntityInFront(entity1, entity2);Lua
local result = hasEntityClearLosToEntityInFront(entity1, entity2)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity1 | Entity | number | integer |
entity2 | Entity | number | integer |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing.
This is one of the most CPU demanding BOOL natives in the game; avoid calling this in things like nested for-loops
Reference
- Namespace
- Entity ENTITY
- In the game
BOOL HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT(Entity entity1, Entity entity2)- Hash
0x0267D00AF114F17A