RedM Natives

GET_NTH_CLOSEST_VEHICLE_NODE_ID

Hash0x116443008E5CEFC3
Runtime nameGetNthClosestVehicleNodeId
NamespacePATH
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x22D7275A79FE8215

Signature

int GET_NTH_CLOSEST_VEHICLE_NODE_ID(float x, float y, float z, int nth, int nodetype, float p5, float p6);

Parameters

NameTypeDescription
xfloat—
yfloat—
zfloat—
nthint—
nodetypeint—
p5float—
p6float—

Returns int

Usage

Lua
local retval = GetNthClosestVehicleNodeId(x, y, z, nth, nodetype, p5, p6)

-- always works, by hash
local retval = Citizen.InvokeNative(0x116443008E5CEFC3, x, y, z, nth, nodetype, p5, p6, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetNthClosestVehicleNodeId(x, y, z, nth, nodetype, p5, p6);

// by hash
const retval = Citizen.invokeNative('0x116443008E5CEFC3', x + 0.0000001, y + 0.0000001, z + 0.0000001, nth, nodetype, p5 + 0.0000001, p6 + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x116443008E5CEFC3, x, y, z, nth, nodetype, p5, p6);
  • 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.

Sources

alloc8or RDR3 NativeDB

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