I need help - 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: I need help (
/showthread.php?tid=256144)
I need help -
Cjgogo - 19.05.2011
How to make a countdown function (like THe shop will be robbed in 14/13/12.....0 - only the numbers change )because I found only 2 tutorials on ******,both awful and bad as listed in comments ,even comments by vince or alpha were saying it's bad,so anyone could give me a good tutorial?
Re: I need help -
Sascha - 19.05.2011
pawn Код:
new countn, counttimer;
forward CountDown();
at the start countdown command or w/e
pawn Код:
countn = 15;
counttimer = SetTime("CountDown", 1000, true);
and somewhere
pawn Код:
public CountDown()
{
new string[20];
format(string, sizeof(string), "~g~%d", countn);
GameTextForAll(string, 0, 500);
countn--;
if(countn <= -1)
{
KillTimer(counttime);
}
return 1;
}
I hope that works, as I just wrote it up...