SA-MP Forums Archive
Please help finding animation index. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Please help finding animation index. (/showthread.php?tid=396546)



Please help finding animation index. - [WSF]ThA_Devil - 01.12.2012

Hello, I've problems with finding animation if for: RIFLE RIFLE_FIRE
because when i tried the method in sa-mp wiki:
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        new msg[128];
        GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
        format(msg, 128, "Running anim: %s %s %i", animlib, animname,GetPlayerAnimationIndex(playerid));
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
    }
    return 1;
}
It didn't returned the RIFLE_FIRE animation...
it returned [13:10:51] Running anim: PED GUN_2_IDLE 1164

[13:10:52] Running anim: PED GUN_STAND 1167 and PED GUN_2_IDLE 1164
I just need to detect when player has shot their rifle...