Lumaktaw patungo sa pangunahing content

GetPlayerAnimationIndex

Description

Returns the index of any running applied animations.

NameDescription
playeridID of the player of whom you want to get the animation index of.

Returns

0 if there is no animation applied.

Examples

public OnPlayerUpdate(playerid)
{
if (GetPlayerAnimationIndex(playerid))
{
new
animationLibrary[32],
animationName[32],
string[128];

GetAnimationName(GetPlayerAnimationIndex(playerid), animationLibrary, sizeof (animationLibrary), animationName, sizeof (animationName));

format(string, sizeof (string), "Running anim: %s %s", animationLibrary, animationName);
SendClientMessage(playerid, 0xFFFFFFFF, string);
}
return 1;
}