# VEHICLE::_SET_VEHICLE_STOP_DISTANCE_BUFFER

- **Hash:** `0xA13028E22564A1BD`
- **Namespace:** VEHICLE
- **Runtime name (Lua/JS):** `SetVehicleStopDistanceBuffer`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **Other names:** `_SET_VEHICLE_STOP_DISTANCE`
- **URL:** https://natives.borderlinerp.com/natives/VEHICLE/_SET_VEHICLE_STOP_DISTANCE_BUFFER

## Signature

```c
void _SET_VEHICLE_STOP_DISTANCE_BUFFER(Vehicle vehicle, float bufferDistance);
```

## Parameters

- `vehicle` (`Vehicle`)
- `bufferDistance` (`float`)

## Returns

`void`

## Description

*Source: alloc8or RDR3 NativeDB*

Adds a forward buffer to the AI stopping distance for a specific vehicle.
Important for long vehicles such as wagons with draft horses. The AI normally calculates stopping distance from the front bounds of the vehicle; this extends that forward collision/stopping sphere.

*Source: VORPCORE RDR3natives*

Sets the stop distance of a vehicle when there something in it's way that forces it to stop or sets the view distance of the vehicle making it stop at a distance

## Usage

### Lua

```lua
SetVehicleStopDistanceBuffer(vehicle, bufferDistance)

-- always available, by hash
Citizen.InvokeNative(0xA13028E22564A1BD, vehicle, bufferDistance)
```

### JavaScript

```js
SetVehicleStopDistanceBuffer(vehicle, bufferDistance);

// by hash
Citizen.invokeNative('0xA13028E22564A1BD', vehicle, bufferDistance + 0.0000001);
```

### C#

```csharp
Function.Call((Hash)0xA13028E22564A1BD, vehicle, bufferDistance);
```

- 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.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
