RedM Natives

_COMPUTE_SPEED_FOR_PED_MOVE_BLEND_RATIO

Returns ped move blend ratio corresponding to the specified speed.

Hash0xCA95924C893A0C91
Runtime nameComputeSpeedForPedMoveBlendRatio
NamespacePED
SideClient
NameCommunity guess
Docs
Since build1207

Signature

float _COMPUTE_SPEED_FOR_PED_MOVE_BLEND_RATIO(Ped ped, float speed);

Parameters

NameTypeDescription
pedPed—
speedfloat—

Returns float

Description

alloc8or RDR3 NativeDB

Returns ped move blend ratio corresponding to the specified speed.

VORPCORE RDR3natives

Returns vehicle speed

Usage

Lua
local retval = ComputeSpeedForPedMoveBlendRatio(ped, speed)

-- always works, by hash
local retval = Citizen.InvokeNative(0xCA95924C893A0C91, ped, speed, Citizen.ResultAsFloat())
JavaScript and C#
JavaScript
const retval = ComputeSpeedForPedMoveBlendRatio(ped, speed);

// by hash
const retval = Citizen.invokeNative('0xCA95924C893A0C91', ped, speed + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
C#
float retval = Function.Call<float>((Hash)0xCA95924C893A0C91, ped, speed);
  • 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.