- Documentation
- Shared functions
- getPedAnimation
Function
getPedAnimation
Returns the block and name of the animation a ped is playing (set with setPedAnimation). On the client, for peds in this game, it also returns the progress (0-1) and speed of an IFP animation. Returns false when the ped is not playing any animation.
Syntax
string, string, float, float getPedAnimation(ped ped)Arguments
pedped- A player or an NPC.
Returns
Block, name and, on the client for file animations, progress 0-1 and speed; or false.
Example
addCommandHandler("anim", function(player)
local block, anim = getPedAnimation(player)
outputChatBox(block and (block .. "/" .. anim) or "brak animacji", player)
end)