_SET_VEHICLE_STOP_DISTANCE_BUFFER
Adds a forward buffer to the AI stopping distance for a specific vehicle.
Hash
0xA13028E22564A1BDRuntime name
SetVehicleStopDistanceBufferNamespaceVEHICLE
SideClient
NameCommunity guess
Docs
Since build1207
Also known as
_SET_VEHICLE_STOP_DISTANCESignature
void _SET_VEHICLE_STOP_DISTANCE_BUFFER(Vehicle vehicle, float bufferDistance);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | — |
bufferDistance | float | — |
Returns void
Description
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.
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
SetVehicleStopDistanceBuffer(vehicle, bufferDistance)
-- always works, by hash
Citizen.InvokeNative(0xA13028E22564A1BD, vehicle, bufferDistance)JavaScript and C#
SetVehicleStopDistanceBuffer(vehicle, bufferDistance);
// by hash
Citizen.invokeNative('0xA13028E22564A1BD', vehicle, bufferDistance + 0.0000001);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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to 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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.