SA-MP Forums Archive
Punch animation - 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: Punch animation (/showthread.php?tid=595551)



Punch animation - NeamPojma - 04.12.2015

Anyone know punch animlib and animname, i tried searching but no luck


Re: Punch animation - Crayder - 04.12.2015

So find it yourself?

pawn Код:
#include a_samp

new lastIndex[MAX_PLAYERS];
public OnPlayerUpdate(playerid) {
    new currIndex = GetPlayerAnimationIndex(playerid);
    if(currIndex != lastIndex[playerid]) {
        new currLib[32], curName[32], msg[32 + 32 + 12];
        GetAnimationName(currIndex, currLib, 32, curName, 32);
        format(msg, 128, "Animation [%i]: %s, %s", currIndex, currLib, curName);
        SendClientMessage(playerid, -1, msg);
       
        lastIndex[playerid] = currIndex;
    }
    return 1;
}
Run this code as a filterscript and throw some punches. It'll print the information in the chat.

Also be sure to run it with other fight style if you plan on using fight styles.