GetNthClosestVehicleNodeWithHeading — FiveM Natives
0x80CA6A8B6C094CC4 · PATHFIND · all
Get the nth closest vehicle node with its heading and total lane count. If you need specific forward and backward lane counts use GET_CLOSEST_ROAD ``cpp enum eNodeFlags { NONE = 0, INCLUDE_SWITCHED_OFF_NODES = 1, INCLUDE_BOAT_NODES = 2, IGNORE_SLIPLANES = 4, IGNORE_SWITCHED_OFF_DEAD_ENDS = 8, } ``
Parameters
| Name | Type | Description |
|---|---|---|
| x | float | x position |
| y | float | y position |
| z | float | z position |
| nthClosest | int | nth closest node |
| outPosition | Vector3* | returned position of the found node |
| heading | float* | returned heading of the found node |
| totalLanes | int* | total lanes (forward + backward) of the found node |
| searchFlags | int | Flags used when searching for a node, see `eNodeFlags` |
| zMeasureMult | float | How strongly the difference in z direction should be weighted (defaults to 3.0) |
| zTolerance | float | How far apart the Z coords have to be before the zMeasureMult kicks in |
Returns
BOOL