SA-MP Forums Archive
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: Countdown problem... (/showthread.php?tid=93412)



Countdown problem... - LasTRace - 25.08.2009

hi all

i wanted to try that countdown codes(and a countdown antispawn), it didnt give any arror on pawno, but i came online with my friend on server, i started a countdown, then he did too at the same time, both of countdowns mixed :S

i need a countdown anti-spammer with codes, if a countdown in a progress, it will give a message as "need to wait for finish of countdown to start a countdown"(for max_players)

here is my countdown codes(without my anti-spam):
Код:
 	if(strcmp(cmdtext, "/countdown 3", true)== 0)
	{
			SetTimer("Three", 1000, 0);
			SetTimer("Two", 2000, 0);
			SetTimer("One", 3000, 0);
			SetTimer("GoGoGo", 4000, 0);
		return 1;
 	}
can some1 help?


Re: Countdown problem... - Jefff - 25.08.2009

Top
Код:
new CdOn;
command
Код:
if(strcmp(cmdtext, "/countdown 3", true)== 0)
{
	if(!CdOn) {
		CdOn = 1;
		SetTimer("Three", 1000, 0);
		SetTimer("Two", 2000, 0);
		SetTimer("One", 3000, 0);
		SetTimer("GoGoGo", 4000, 0);
	}else SendClientMessage(playerid,YOUR_COLOR,"SERVER: Countdown is ON kid !!");
	return 1;
}
in public GoGoGo
Код:
CdOn = 0;



Re: Countdown problem... - Donny_k - 25.08.2009

Clicky.