Check if player is using animation ?
#7

Quote:
Originally Posted by HeLiOn_PrImE
Посмотреть сообщение
What's with the numbers? Sorry I am at the beggining of scripting right now, si I don't understand much of this. I don't need a message displayed or anything. I just want that animation to stop if the player is clicking (to punch).

pawn Код:
if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        new msg[128];
        GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
        format(msg, 128, "libary: %s || name: %s || index: %d", animlib, animname,GetPlayerAnimationIndex(playerid));
        SendClientMessage(playerid, 0xFFFFFFFF, msg);
    }
How can you check:

pawn Код:
if(GetPlayerAnimationIndex(playerid))
    {
        new animlib[32];
        new animname[32];
        new msg[128];
        GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
        if(!strcmp(animname, "WALK_DRUNK", true)) {
          // the player is with walk drunk animation
        }
}
More details here:

https://sampwiki.blast.hk/wiki/ApplyAnimation
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)