GET_NTH_CLOSEST_VEHICLE_NODE_ID
Returns the id of the Nth closest vehicle node to the given coordinates.
Signature
int GET_NTH_CLOSEST_VEHICLE_NODE_ID(float x, float y, float z, int nth, int nodetype, float p5, float p6); // 0x116443008E5CEFC3 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | x | float |
| 2 | y | float |
| 3 | z | float |
| 4 | nth | int |
| 5 | nodetype | int |
| 6 | p5 | float |
| 7 | p6 | float |
Facts
| Name | GET_NTH_CLOSEST_VEHICLE_NODE_ID |
|---|---|
| Hash | 0x116443008E5CEFC3 |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x116443008E5CEFC3, -- GET_NTH_CLOSEST_VEHICLE_NODE_ID
0.0, -- float x
0.0, -- float y
0.0, -- float z
0, -- int nth
0, -- int nodetype
0.0, -- float p5
0.0, -- float p6
Citizen.ResultAsInteger()
)
print(result)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x116443008E5CEFC3", // GET_NTH_CLOSEST_VEHICLE_NODE_ID
0.0, // float x
0.0, // float y
0.0, // float z
0, // int nth
0, // int nodetype
0.0, // float p5
0.0, // float p6
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0x116443008E5CEFC3, // GET_NTH_CLOSEST_VEHICLE_NODE_ID
0.0f, // float x
0.0f, // float y
0.0f, // float z
0, // int nth
0, // int nodetype
0.0f, // float p5
0.0f // float p6
);Related PATH natives
- GET_NTH_CLOSEST_VEHICLE_NODE_ID_WITH_HEADING
- GET_NTH_CLOSEST_VEHICLE_NODE
- GET_NTH_CLOSEST_VEHICLE_NODE_FAVOUR_DIRECTION
- GET_NTH_CLOSEST_VEHICLE_NODE_WITH_HEADING
- GET_CLOSEST_VEHICLE_NODE
- GET_CLOSEST_VEHICLE_NODE_WITH_HEADING
- GET_RANDOM_VEHICLE_NODE
- GET_VEHICLE_NODE_IS_SWITCHED_OFF
- GET_VEHICLE_NODE_POSITION
- IS_VEHICLE_NODE_ID_VALID
- GET_CLOSEST_ROAD
- _GET_SPAWN_DATA_FOR_ROAD_NODE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.