getPedMoveState
Client
Tells how a ped on foot is moving.
string|false getPedMoveState(ped ped)
Parameters
| Name | Type | Description |
|---|---|---|
| ped | ped | The ped or player. |
Returns
One of: stand, walk, jog, sprint, crouch, crawl, roll, climb, hanging, jump, walk_to_point, swim or fall. false when the ped is in a vehicle, getting in or out of one, or in none of those states.
hanging is the ped holding on to a ledge while climbing. crawl and roll are a crouched ped moving, roll when it is also aiming.
Example
addEventHandler("onClientRender", root, function()
local state = getPedMoveState(localPlayer)
if state then
dxDrawText(state, 20, 300)
end
end)