The Lab
ENTITY native

_GET_ENTITIES_NEAR_POINT

returns int6 paramsbuild 1207

Fills itemSet with entities within radius of the given point and returns how many were found.

Create the item set first and destroy it after reading the results.

Signature

C
int _GET_ENTITIES_NEAR_POINT(float x, float y, float z, float radius, ItemSet itemSet, int p5); // 0x59B57C4B06531E1E b1207

Parameters

#NameType
1xfloat
2yfloat
3zfloat
4radiusfloat
5itemSetItemSet
6p5int

Facts

Facts about _GET_ENTITIES_NEAR_POINT
Name
_GET_ENTITIES_NEAR_POINT
Hash
0x59B57C4B06531E1E
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0x59B57C4B06531E1E, -- _GET_ENTITIES_NEAR_POINT
  0.0, -- float x
  0.0, -- float y
  0.0, -- float z
  0.0, -- float radius
  0, -- ItemSet itemSet
  0, -- int p5
  Citizen.ResultAsInteger()
)
print(result)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x59B57C4B06531E1E", // _GET_ENTITIES_NEAR_POINT
  0.0, // float x
  0.0, // float y
  0.0, // float z
  0.0, // float radius
  0, // ItemSet itemSet
  0, // int p5
  Citizen.resultAsInteger()
);
console.log(result)
C#
int result = Function.Call<int>((Hash)0x59B57C4B06531E1E, // _GET_ENTITIES_NEAR_POINT
  0.0f, // float x
  0.0f, // float y
  0.0f, // float z
  0.0f, // float radius
  0, // ItemSet itemSet
  0 // int p5
);
All ENTITY natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.