Cell Phone Animations
#1

I'm trying to stop the animations for both sides. This is the /hangup command. I have a /pickup (to answer) and a /call that plays the special action for being on the phone.
pawn Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "* %s takes out a cellphone.", sendername);
            SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            new phonenumb = strval(tmp);

However this is the /hangup. I have it to clear the animations, but when the hangup finishes, the players still show being on the phone:
pawn Код:
SendClientMessage(caller,  COLOR_GRAD2, "   They hung up.");
                            ApplyAnimation(caller,"ped","phone_in",4.0,0,0,0,0,0);
                            ClearAnimations(caller);
                            CellTime[caller] = 0;
                            CellTime[playerid] = 0;
                            SendClientMessage(playerid,  COLOR_GRAD2, "   You hung up.");
                            ApplyAnimation(playerid,"ped","phone_in",4.0,0,0,0,0,0);
                            ClearAnimations(playerid);
                            Mobile[caller] = 255;
                            if(IsAtPublicPhone(caller)) TogglePlayerControllable(caller, 1);
                        }
Reply
#2

Try putting the ClearAnimations before the ApplyAnimation lines. Just see if that works.
Reply
#3

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Try putting the ClearAnimations before the ApplyAnimation lines. Just see if that works.
Tried that. No luck
Reply
#4

Add the clearanimations to a timer of about 2 seconds or something. That might work.

EDIT: Sorry, I didn't see the SetPlayerSpecialAction part... my mistake. I'm not very involved with things like animations, textdraws or MySQL.
Reply
#5

Why don't you just use SPECIAL_ACTION_STOPUSECELLPHONE?
Reply
#6

Quote:
Originally Posted by Bakr
Посмотреть сообщение
Why don't you just use SPECIAL_ACTION_STOPUSECELLPHONE?
This, or SPECIAL_ACTION_NONE.
Reply
#7

Quote:
Originally Posted by Bakr
Посмотреть сообщение
Why don't you just use SPECIAL_ACTION_STOPUSECELLPHONE?
Thanks! This worked! +Rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)