26.10.2010, 09:40
You can find it yourself. This should work (haven't tested it):
pawn Код:
#include <a_samp>
new
g_iPreviousAnimation[ MAX_PLAYERS ]
;
public OnPlayerUpdate( playerid )
{
static
s_iAnimation
;
s_iAnimation = GetPlayerAnimationIndex( playerid );
if ( s_iAnimation != g_iPreviousAnimation[ playerid ] )
{
new
s_szMessage[ 80 ],
s_szLibrary[ 32 ],
s_szAnimation[ 32 ]
;
g_iPreviousAnimation[ playerid ] = s_iAnimation;
GetAnimationName( s_iAnimation, s_szLibrary, sizeof( s_szLibrary ), s_szAnimation, sizeof( s_szAnimation ) );
format( s_szMessage, sizeof( s_szMessage ), "Animation: %s_%s (%d)", s_szLibrary, s_szAnimation, s_iAnimation );
SendClientMessage( playerid, -1, s_szMessage );
}
return 1;
}