Help with anims
#1

Hello ladies and gent's I have currently made an animation called crack!

So currently only pressing RMB will get me out of the anim, how could I make it so every key would exit the anim?

Heres the code:

Код:
if (strcmp("/crack", cmdtext, true, 6) == 0) {
          LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
		  return 1;
Help is much apprecciated and rep for the helper.

Regards, Eemale
Reply
#2

I still need help :P ... bump!
Reply
#3

pawn Код:
new bool:doingAnim[MAX_PLAYERS char];

//Under your animation cmd
doingAnim{playerid} = true;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_FIRE)
    {
    if (doingAnim{playerid})
    {
        ClearAnimations(playerid);
        doingAnim{playerid} = false;
    }
    }
return 1;
}
EDIT:
If you want it to be RMB, just simply replace KEY_FIRE with KEY_AIM
Reply
#4

Yes but is there a way or a callback for ALL KEYS?
So if ANY key on your keyboard is pressed it would cancel the anim.

Also when I do the anim it says "SPACE to stop the anim" textdraw how would I remove that?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)