ObjectClient

doesObjectOfTypeExistAtCoords

DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS0xBFA48E2FF417213F

The GTA V native DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS of the OBJECT namespace, as LS:MP client scripts call it: the global function doesObjectOfTypeExistAtCoords, in JavaScript and in Lua.

SignatureJavaScript
doesObjectOfTypeExistAtCoords(
  x: number,
  y: number,
  z: number,
  radius: number,
  hash: Hash,
  p5: boolean
): boolean
SignatureLua
doesObjectOfTypeExistAtCoords(
  x: number,
  y: number,
  z: number,
  radius: number,
  hash: Hash,
  p5: boolean
): boolean

Usage

JavaScript
const result = doesObjectOfTypeExistAtCoords(x, y, z, radius, hash, p5);
Lua
local result = doesObjectOfTypeExistAtCoords(x, y, z, radius, hash, p5)

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 = doesObjectOfTypeExistAtCoords(pos, radius, hash, p5);
Lua · with vectors
local result = doesObjectOfTypeExistAtCoords(pos, radius, hash, p5)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
radiusfloatnumbernumber
hashHashnumberinteger
p5BOOLbooleanboolean

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.

p5 is usually 0.

Reference

Namespace
Object OBJECT
In the game
BOOL DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS(float x, float y, float z, float radius, Hash hash, BOOL p5)
Hash
0xBFA48E2FF417213F

Open in the interactive natives reference