EntityClient

isEntityInAngledArea

IS_ENTITY_IN_ANGLED_AREA0x51210CED3DA1C78A

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

SignatureJavaScript
isEntityInAngledArea(
  entity: Entity,
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  width: number,
  debug: boolean,
  includeZ: boolean,
  p10: any
): boolean
SignatureLua
isEntityInAngledArea(
  entity: Entity,
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  width: number,
  debug: boolean,
  includeZ: boolean,
  p10: any
): boolean

Usage

JavaScript
const result = isEntityInAngledArea(
  entity, x1, y1, z1, x2, y2, z2, width, debug, includeZ, p10
);
Lua
local result = isEntityInAngledArea(entity, x1, y1, z1, x2, y2, z2, width, debug, includeZ, p10)

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 = isEntityInAngledArea(entity, pos1, pos2, width, debug, includeZ, p10);
Lua · with vectors
local result = isEntityInAngledArea(entity, pos1, pos2, width, debug, includeZ, p10)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
x1floatnumbernumber
y1floatnumbernumber
z1floatnumbernumber
x2floatnumbernumber
y2floatnumbernumber
z2floatnumbernumber
widthfloatnumbernumber
debugBOOLbooleanboolean
includeZBOOLbooleanboolean
p10Anyanyany

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.

p8 is a debug flag invoking functions in the same path as

drawMarker

p10 is some entity flag check, also used in isEntityAtEntity, isEntityInArea, and isEntityAtCoord.
See isPointInAngledArea for the definition of an angled area.

Reference

Namespace
Entity ENTITY
In the game
BOOL IS_ENTITY_IN_ANGLED_AREA(Entity entity, float x1, float y1, float z1, float x2, float y2, float z2, float width, BOOL debug, BOOL includeZ, Any p10)
Hash
0x51210CED3DA1C78A

Open in the interactive natives reference