EntityClient

isEntityAtCoord

IS_ENTITY_AT_COORD0x20B60995556D004F

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

SignatureJavaScript
isEntityAtCoord(
  entity: Entity,
  xPos: number,
  yPos: number,
  zPos: number,
  xSize: number,
  ySize: number,
  zSize: number,
  p7: boolean,
  p8: boolean,
  p9: number
): boolean
SignatureLua
isEntityAtCoord(
  entity: Entity,
  xPos: number,
  yPos: number,
  zPos: number,
  xSize: number,
  ySize: number,
  zSize: number,
  p7: boolean,
  p8: boolean,
  p9: integer
): boolean

Usage

JavaScript
const result = isEntityAtCoord(entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9);
Lua
local result = isEntityAtCoord(entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9)

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 = isEntityAtCoord(entity, pos, size, p7, p8, p9);
Lua · with vectors
local result = isEntityAtCoord(entity, pos, size, p7, p8, p9)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
xPosfloatnumbernumber
yPosfloatnumbernumber
zPosfloatnumbernumber
xSizefloatnumbernumber
ySizefloatnumbernumber
zSizefloatnumbernumber
p7BOOLbooleanboolean
p8BOOLbooleanboolean
p9intnumberinteger

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.

Checks if entity is within x/y/zSize distance of x/y/z.

Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0

Reference

Namespace
Entity ENTITY
In the game
BOOL IS_ENTITY_AT_COORD(Entity entity, float xPos, float yPos, float zPos, float xSize, float ySize, float zSize, BOOL p7, BOOL p8, int p9)
Hash
0x20B60995556D004F

Open in the interactive natives reference