EntityClient

hasEntityClearLosToEntity

HAS_ENTITY_CLEAR_LOS_TO_ENTITY0xFCDFF7B72D23A1AC

The GTA V native HAS_ENTITY_CLEAR_LOS_TO_ENTITY of the ENTITY namespace, as LS:MP client scripts call it: the global function hasEntityClearLosToEntity, in JavaScript and in Lua.

SignatureJavaScript
hasEntityClearLosToEntity(
  entity1: Entity,
  entity2: Entity,
  traceType: number
): boolean
SignatureLua
hasEntityClearLosToEntity(
  entity1: Entity,
  entity2: Entity,
  traceType: integer
): boolean

Usage

JavaScript
const result = hasEntityClearLosToEntity(entity1, entity2, traceType);
Lua
local result = hasEntityClearLosToEntity(entity1, entity2, traceType)

Parameters

ParameterTypeJavaScriptLua
entity1Entitynumberinteger
entity2Entitynumberinteger
traceTypeintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

traceType is always 17 in the scripts.

There is other codes used for traceType:
19 - in jewelry_prep1a
126 - in am_hunt_the_beast
256 & 287 - in fm_mission_controller

Reference

Namespace
Entity ENTITY
In the game
BOOL HAS_ENTITY_CLEAR_LOS_TO_ENTITY(Entity entity1, Entity entity2, int traceType)
Hash
0xFCDFF7B72D23A1AC

Open in the interactive natives reference