GET_NTH_CLOSEST_VEHICLE_NODE_ID
Hash
0x116443008E5CEFC3Runtime name
GetNthClosestVehicleNodeIdNamespacePATH
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x22D7275A79FE8215Signature
int GET_NTH_CLOSEST_VEHICLE_NODE_ID(float x, float y, float z, int nth, int nodetype, float p5, float p6);Parameters
| Name | Type | Description |
|---|---|---|
x | float | — |
y | float | — |
z | float | — |
nth | int | — |
nodetype | int | — |
p5 | float | — |
p6 | float | — |
Returns int
Usage
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#
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());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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.