doesObjectOfTypeExistAtCoords
DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS0xBFA48E2FF417213FThe 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.
doesObjectOfTypeExistAtCoords(
x: number,
y: number,
z: number,
radius: number,
hash: Hash,
p5: boolean
): booleandoesObjectOfTypeExistAtCoords(
x: number,
y: number,
z: number,
radius: number,
hash: Hash,
p5: boolean
): booleanUsage
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
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
radius | float | number | number |
hash | Hash | number | integer |
p5 | BOOL | boolean | boolean |
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.
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