Cell Phone Animations -
DJ_Shocker - 29.01.2013
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);
}
Re: Cell Phone Animations -
Threshold - 29.01.2013
Try putting the ClearAnimations before the ApplyAnimation lines. Just see if that works.
Re: Cell Phone Animations -
DJ_Shocker - 29.01.2013
Quote:
Originally Posted by BenzoAMG
Try putting the ClearAnimations before the ApplyAnimation lines. Just see if that works.
|
Tried that. No luck
Re: Cell Phone Animations -
Threshold - 29.01.2013
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.
Re: Cell Phone Animations -
Bakr - 29.01.2013
Why don't you just use SPECIAL_ACTION_STOPUSECELLPHONE?
Re: Cell Phone Animations -
Mean - 29.01.2013
Quote:
Originally Posted by Bakr
Why don't you just use SPECIAL_ACTION_STOPUSECELLPHONE?
|
This, or SPECIAL_ACTION_NONE.
Re: Cell Phone Animations -
DJ_Shocker - 29.01.2013
Quote:
Originally Posted by Bakr
Why don't you just use SPECIAL_ACTION_STOPUSECELLPHONE?
|
Thanks! This worked! +Rep