RedM Natives

GET_RESERVED_MISSION_ENTITIES_IN_AREA

Used in Script Function NET_ACE_CLIENT_VERIFY_ENTITY_RESERVATIONS Old name: _GET_RESERVATIONS_FOR_SLOT_WORLD_POSITION

Hash0x5E71E72A94985214
Runtime nameGetReservedMissionEntitiesInArea
NamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xE42D626EEC94E5D9

Signature

void GET_RESERVED_MISSION_ENTITIES_IN_AREA(float x, float y, float z, BOOL p3, int* peds, int* vehicles, int* objects, int* pickups);

Parameters

NameTypeDescription
xfloat—
yfloat—
zfloat—
p3BOOL—
pedsint*—
vehiclesint*—
objectsint*—
pickupsint*—

Returns void

Description

Used in Script Function NET_ACE_CLIENT_VERIFY_ENTITY_RESERVATIONS
Coords: Slot world position

Old name: _GET_RESERVATIONS_FOR_SLOT_WORLD_POSITION

Usage

Lua
local peds, vehicles, objects, pickups = GetReservedMissionEntitiesInArea(x, y, z, p3)

-- always works, by hash
local peds, vehicles, objects, pickups = Citizen.InvokeNative(0x5E71E72A94985214, x, y, z, p3, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt())
JavaScript and C#
JavaScript
const [peds, vehicles, objects, pickups] = GetReservedMissionEntitiesInArea(x, y, z, p3);

// by hash
const [peds, vehicles, objects, pickups] = Citizen.invokeNative('0x5E71E72A94985214', x + 0.0000001, y + 0.0000001, z + 0.0000001, p3, Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt());
C#
var peds = new OutputArgument();
var vehicles = new OutputArgument();
var objects = new OutputArgument();
var pickups = new OutputArgument();
Function.Call((Hash)0x5E71E72A94985214, x, y, z, p3, peds, vehicles, objects, pickups);
// peds.GetResult<int>()
// vehicles.GetResult<int>()
// objects.GetResult<int>()
// pickups.GetResult<int>()
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.