Problem with rob timer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with rob timer (
/showthread.php?tid=318621)
Problem with rob timer -
Face9000 - 15.02.2012
Hello,in my robbery gametext timer i've this small check:
Top of gm.
pawn Код:
new IsRobbing[MAX_PLAYERS];
In the rob timer:
IsRobbing = 1 means the player started robbing.
When a player finish robbery:
But here is the problem.It's onplayerdeath,i made if player was robbing and will be killed or he will die,the gametext timer will stop.But dont work,the timer keeps countding down until the robbery finish.
pawn Код:
if(IsRobbing[playerid] == 1)
{
new string2[128];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string2, sizeof(string2), "You died and your robbery failed! NOOB.");
SendClientMessage(playerid,red,string2);
GameTextForPlayer(playerid, "Robbery ~r~FAILED.", 3000, 5);
IsRobbing[playerid] =0;
pRobCount[playerid] = 0;
}
What's wrong?I wanna stop the gametext timer and stop robbery if the player die.
Re: Problem with rob timer -
Twisted_Insane - 15.02.2012
Hey!
You gotta use
pawn Код:
KillTimer(NAME_TIMER[playerid]);
Re: Problem with rob timer -
Face9000 - 15.02.2012
:O Right,forget it,thanks!
Re: Problem with rob timer -
Twisted_Insane - 15.02.2012
Did it work?
Hope I could help!
Re: Problem with rob timer -
Face9000 - 15.02.2012
Yes it worked