_COMPUTE_SPEED_FOR_PED_MOVE_BLEND_RATIO
Returns ped move blend ratio corresponding to the specified speed.
Hash
0xCA95924C893A0C91Runtime name
ComputeSpeedForPedMoveBlendRatioNamespacePED
SideClient
NameCommunity guess
Docs
Since build1207
Signature
float _COMPUTE_SPEED_FOR_PED_MOVE_BLEND_RATIO(Ped ped, float speed);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
speed | float | — |
Returns float
Description
Returns ped move blend ratio corresponding to the specified speed.
Returns vehicle speed
Usage
local retval = ComputeSpeedForPedMoveBlendRatio(ped, speed)
-- always works, by hash
local retval = Citizen.InvokeNative(0xCA95924C893A0C91, ped, speed, Citizen.ResultAsFloat())JavaScript and C#
const retval = ComputeSpeedForPedMoveBlendRatio(ped, speed);
// by hash
const retval = Citizen.invokeNative('0xCA95924C893A0C91', ped, speed + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsFloat());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. 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.