# PATH::GET_NTH_CLOSEST_VEHICLE_NODE_ID

- **Hash:** `0x116443008E5CEFC3`
- **Namespace:** PATH
- **Runtime name (Lua/JS):** `GetNthClosestVehicleNodeId`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/PATH/GET_NTH_CLOSEST_VEHICLE_NODE_ID

## Signature

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

## Parameters

- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `nth` (`int`)
- `nodetype` (`int`)
- `p5` (`float`)
- `p6` (`float`)

## Returns

`int`

## Usage

### Lua

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

-- always available, by hash
local retval = Citizen.InvokeNative(0x116443008E5CEFC3, x, y, z, nth, nodetype, p5, p6, Citizen.ResultAsInteger())
```

### JavaScript

```js
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#

```csharp
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.*
