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=194114)



Countdown problem - BlackWolf120 - 28.11.2010

hi,

i have a countdown that starts when a player enters a certain checkpoint. it counts backwards from 60.
After the countdown started there is a 2nd cp and if u enter that cp the countdown has to stop an diasappear from the screen.
How to do that?

pawn Код:
public counter(playerid)
{

if(countdown > 1)
{
new string[128];
format(string,sizeof(string),"~l~! ~r~Detonating: ~y~%d ~l~!",countdown);
GameTextForAll(string,990,5);
SetTimer("counter",990,0);
countdown --;
}
else
{

countdown = 0;
}
return 1;
}
regards.