Animation
#1

Hey I've a problem with an animation.

If I want to stop the animation, nothing happen and he still does the animation.

Script:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,20.0, 286.58, -109.37, 1001.56))
        {
            if (PRESSED(KEY_NO))
            {
                ClearAnimations(playerid); // And here to stop the animation if he presses KEY_NO, but it doesn't stop the animation
                TogglePlayerControllable(playerid,1);
                TextDrawHideForPlayer(playerid, Text:Textdraw0);
                TextDrawHideForPlayer(playerid, Text:Textdraw1);
                TextDrawHideForPlayer(playerid, Text:Textdraw11);
                TextDrawHideForPlayer(playerid, Text:Textdraw111);
                TextDrawHideForPlayer(playerid, Text:Textdraw1111);
                TextDrawHideForPlayer(playerid, Text:Textdraw2);
                TextDrawHideForPlayer(playerid, Text:Textdraw3);
                TextDrawHideForPlayer(playerid, Text:Textdraw4);
                TextDrawHideForPlayer(playerid, Text:Textdraw5);
                TextDrawHideForPlayer(playerid, Text:Textdraw6);
                TextDrawHideForPlayer(playerid, Text:Textdraw7);
                TextDrawHideForPlayer(playerid, Text:Textdraw8);
                TextDrawHideForPlayer(playerid, Text:Textdraw9);
                TextDrawHideForPlayer(playerid, Text:Textdraw10);
                TextDrawHideForPlayer(playerid, Text:Textdraw12);
                TextDrawHideForPlayer(playerid, Text:Textdraw13);
                TextDrawHideForPlayer(playerid, Text:Textdraw14);
                TextDrawHideForPlayer(playerid, Text:Textdraw15);
            }
        }

    if (PRESSED(KEY_SECONDARY_ATTACK))
    {
        if(IsPlayerInRangeOfPoint(playerid,1.0, 286.58, -109.37, 1001.56))
        {
            TogglePlayerControllable(playerid,0);
            SendClientMessage(playerid, COLOR_GREEN, "MP5 $7000");
            ApplyAnimation(playerid,"INT_SHOP","shop_lookB",4.1,1,1,1,1,1,1); // Here the animation begins.

            TextDrawShowForPlayer(playerid, Text:Textdraw0);
            TextDrawShowForPlayer(playerid, Text:Textdraw11);
            TextDrawShowForPlayer(playerid, Text:Textdraw2);
            TextDrawShowForPlayer(playerid, Text:Textdraw3);
            TextDrawShowForPlayer(playerid, Text:Textdraw15);
            TextDrawShowForPlayer(playerid, Text:Textdraw5);
            TextDrawShowForPlayer(playerid, Text:Textdraw6);
            TextDrawShowForPlayer(playerid, Text:Textdraw7);
            TextDrawShowForPlayer(playerid, Text:Textdraw8);
        }
Reply
#2

BUMP Reason: This topic was on page 6 -.-
Reply
#3

Try this:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,20.0, 286.58, -109.37, 1001.56))
        {
            if (PRESSED(KEY_NO))
            {
                TogglePlayerControllable(playerid,1);
                TextDrawHideForPlayer(playerid, Text:Textdraw0);
                TextDrawHideForPlayer(playerid, Text:Textdraw1);
                TextDrawHideForPlayer(playerid, Text:Textdraw11);
                TextDrawHideForPlayer(playerid, Text:Textdraw111);
                TextDrawHideForPlayer(playerid, Text:Textdraw1111);
                TextDrawHideForPlayer(playerid, Text:Textdraw2);
                TextDrawHideForPlayer(playerid, Text:Textdraw3);
                TextDrawHideForPlayer(playerid, Text:Textdraw4);
                TextDrawHideForPlayer(playerid, Text:Textdraw5);
                TextDrawHideForPlayer(playerid, Text:Textdraw6);
                TextDrawHideForPlayer(playerid, Text:Textdraw7);
                TextDrawHideForPlayer(playerid, Text:Textdraw8);
                TextDrawHideForPlayer(playerid, Text:Textdraw9);
                TextDrawHideForPlayer(playerid, Text:Textdraw10);
                TextDrawHideForPlayer(playerid, Text:Textdraw12);
                TextDrawHideForPlayer(playerid, Text:Textdraw13);
                TextDrawHideForPlayer(playerid, Text:Textdraw14);
                TextDrawHideForPlayer(playerid, Text:Textdraw15);
                ClearAnimations(playerid); // And here to stop the animation if he presses KEY_NO, but it doesn't stop the animation
            }
        }

    if (PRESSED(KEY_SECONDARY_ATTACK))
    {
        if(IsPlayerInRangeOfPoint(playerid,1.0, 286.58, -109.37, 1001.56))
        {
            TogglePlayerControllable(playerid,0);
            SendClientMessage(playerid, COLOR_GREEN, "MP5 $7000");
            ApplyAnimation(playerid,"INT_SHOP","shop_lookB",4.1,1,1,1,1,1,1); // Here the animation begins.

            TextDrawShowForPlayer(playerid, Text:Textdraw0);
            TextDrawShowForPlayer(playerid, Text:Textdraw11);
            TextDrawShowForPlayer(playerid, Text:Textdraw2);
            TextDrawShowForPlayer(playerid, Text:Textdraw3);
            TextDrawShowForPlayer(playerid, Text:Textdraw15);
            TextDrawShowForPlayer(playerid, Text:Textdraw5);
            TextDrawShowForPlayer(playerid, Text:Textdraw6);
            TextDrawShowForPlayer(playerid, Text:Textdraw7);
            TextDrawShowForPlayer(playerid, Text:Textdraw8);
        }
    }
I have a feeling it has something to do with the order of TogglePlayerControllable and ClearAnimations.
Reply
#4

Nop didn't work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)