RedM Natives

_SET_VEHICLE_STOP_DISTANCE_BUFFER

Adds a forward buffer to the AI stopping distance for a specific vehicle.

Hash0xA13028E22564A1BD
Runtime nameSetVehicleStopDistanceBuffer
NamespaceVEHICLE
SideClient
NameCommunity guess
Docs
Since build1207
Also known as_SET_VEHICLE_STOP_DISTANCE

Signature

void _SET_VEHICLE_STOP_DISTANCE_BUFFER(Vehicle vehicle, float bufferDistance);

Parameters

NameTypeDescription
vehicleVehicle—
bufferDistancefloat—

Returns void

Description

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.

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
SetVehicleStopDistanceBuffer(vehicle, bufferDistance)

-- always works, by hash
Citizen.InvokeNative(0xA13028E22564A1BD, vehicle, bufferDistance)
JavaScript and C#
JavaScript
SetVehicleStopDistanceBuffer(vehicle, bufferDistance);

// by hash
Citizen.invokeNative('0xA13028E22564A1BD', vehicle, bufferDistance + 0.0000001);
C#
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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.