countdown - 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 (
/showthread.php?tid=170813)
countdown -
LifeStyle - 24.08.2010
My problem: It's only showing "go!"
pawn Код:
gCountDown--;
if(gCountDown == 3) { format(str, sizeof(str),"~r~3"); GameTextForAll(str, 1000, 3); }
else if(gCountDown == 2) { format(str, sizeof(str),"~y~2"); GameTextForAll(str, 1000, 3); }
else if(gCountDown == 1) { format(str, sizeof(str),"~b~1"); GameTextForAll(str, 1000, 3); }
else if(gCountDown == 0)
{
format(str, sizeof(str),"~g~go!");
GameTextForAll(str, 1000, 3);
Re: countdown -
LifeStyle - 24.08.2010
Anyone? :S
Re: countdown -
LifeStyle - 24.08.2010
I am beggin everyone!
Re: countdown -
Vince - 24.08.2010
Show the whole function ..
Re: countdown -
LifeStyle - 24.08.2010
It's just in a public that goes each sec. :S
Re: countdown -
Vince - 24.08.2010
Then try this (assuming that gCountDown is set to 3 when timer starts)
pawn Код:
switch(gCountDown)
{
case 0: GameTextForAll("~g~GO!", 1000, 3);
case 1: GameTextForAll("~b~1", 1000, 3);
case 2: GameTextForAll("~y~2", 1000, 3);
case 3: GameTextForAll("~r~3", 1000, 3);
}
gCountDown--;
Re: countdown -
LifeStyle - 24.08.2010
Still only showing: GO!