Very minor countdown problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Very minor countdown problem (
/showthread.php?tid=158630)
Very minor countdown problem -
[XST]O_x - 10.07.2010
Hi guys.
Listen I'm having a little problem with my countdown script.
Well this is the code:
pawn Code:
forward CountdownTimer();
public CountdownTimer()
{
Seconds--;
if(Seconds == 0)
{
GameTextForAll("~R~Go!",1200,5);
KillTimer(Timer);
CountdownRunning = 0;
}
new Update[24];
format(Update, 24, "~r~%d", Seconds);
GameTextForAll(Update,1000,5);
return 1;
//There's a whole more bunch of code,but I'm sure that that's where the failure is.
}
Well the problem is that when the countdown is up,it still shows 0 while it supposed to show "Go!".
It's not catastrophic,but I'd still like it to be fixed.
Thank you in advance.
Re: Very minor countdown problem -
Hiddos - 10.07.2010
pawn Code:
forward CountdownTimer();
public CountdownTimer()
{
Seconds--;
if(Seconds == 0)
{
GameTextForAll("~R~Go!",1200,5);
KillTimer(Timer);
CountdownRunning = 0;
return 1; //This.
}
new Update[24];
format(Update, 24, "~r~%d", Seconds);
GameTextForAll(Update,1000,5);
return 1;
}
Re: Very minor countdown problem -
[XST]O_x - 10.07.2010
Oh my god!
Htf didn't I know that xD
Thanks it works now