PedClient2 outputs

getPedCurrentMoveBlendRatio

GET_PED_CURRENT_MOVE_BLEND_RATIO0xF60165E1D2C5370B

The GTA V native GET_PED_CURRENT_MOVE_BLEND_RATIO of the PED namespace, as LS:MP client scripts call it: the global function getPedCurrentMoveBlendRatio, in JavaScript and in Lua.

SignatureJavaScript
getPedCurrentMoveBlendRatio(ped: Ped): [
  ok: boolean,
  speedX: number,
  speedY: number
]
SignatureLua
getPedCurrentMoveBlendRatio(ped: Ped): boolean, number, number

Usage

JavaScript
const [ok, speedX, speedY] = getPedCurrentMoveBlendRatio(ped);
Lua
local ok, speedX, speedY = getPedCurrentMoveBlendRatio(ped)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger

Returns

3 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2speedXfloatnumbernumberoutput
3speedYfloatnumbernumberoutput

Reference

Namespace
Ped PED
In the game
BOOL GET_PED_CURRENT_MOVE_BLEND_RATIO(Ped ped, float* speedX, float* speedY)
Hash
0xF60165E1D2C5370B
Formerly
_GET_PED_CURRENT_MOVEMENT_SPEED

Open in the interactive natives reference