GetPedAnimationSpeed

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

ADDED/UPDATED IN VERSION 1.6.0 r22780:

This function returns the speed of a current running ped animation.

Syntax

float getPedAnimationSpeed ( ped thePed )

Required Arguments

Returns

Returns animation speed on success, -1 otherwise.

Examples

addCommandHandler("getanimspeed",
    function()
        local animSpeed = getPedAnimationSpeed(localPlayer)

        if animSpeed ~= -1 then
            outputChatBox("Your current animation speed is: " .. tostring(animSpeed))
        else
            outputChatBox("Could not retrieve your animation speed.")
        end
    end
)

See Also