| Property | Value |
|---|---|
| Native Name | GET_CLOSEST_VEHICLE_NODE |
| Hash | 0x240A18690AE96513 |
| Return Type | BOOL |
| Build | 1207 |
| Parameters | x (float), y (float), z (float), outPosition (Vector3*), nodeFlags (int), zMeasureMult (float), zTolerance (float) |
Description: ```cpp enum eGetClosestNodeFlags { GCNF_INCLUDE_SWITCHED_OFF_NODES = 1, GCNF_INCLUDE_BOAT_NODES = 2, GCNF_IGNORE_SLIPLANES = 4, GCNF_IGNORE_SWITCHED_OFF_DEADENDS = 8, GCNF_GET_HEADING = 256, GCNF_FAVOUR_FACING = 512 }
### Parameters
- **`x`** (`float`) — X coordinate
- **`y`** (`float`) — Y coordinate
- **`z`** (`float`) — Z coordinate
- **`outPosition`** (`Vector3*`) — Pointer to the found nodes coords
- **`nodeFlags`** (`int`) — Node flags
- **`zMeasureMult`** (`float`) — How strongly the difference in the Z direction should be weighted
- **`zTolerance`** (`float`) — How far apart the Z coords have to be before `zMeasureMult` kicks in
### Usage
**Lua (Direct):**
```lua
local result = GetClosestVehicleNode(x, y, z, outPosition, nodeFlags, zMeasureMult, zTolerance)
Lua (Hash):
local result = Citizen.InvokeNative(0x240A18690AE96513, x, y, z, outPosition, nodeFlags, zMeasureMult, zTolerance)