/countdown bug
#1

new counter;
new countTimer;
forward timer();

if(!strcmp(cmdtext, "/count", true) || !strcmp(cmdtext, "/countdown", true))
{
if(counter != 0)
return SendClientMessage(playerid, COLOR_YELLOW, "Wait 5 seconds,then try again!");
countTimer = SetTimer("timer", 1000, true);
return true;
}

public timer()
{
counter++;
if(counter == 0)
GameTextForAll("3", 500, 3);
else if(counter == 1)
GameTextForAll("2", 500, 3);
else if(counter == 2)
GameTextForAll("1", 500, 3);
else if(counter == 3)
GameTextForAll("1", 500, 3);
else if(counter == 4)
{
GameTextForAll("GO!", 500, 3);
counter = 0;
KillTimer(countTimer);
}
return true;
}



If it done 2 times in maximum 2 second the countdown will repeat for ever, it stops only if I close/restart server, Need help!
Reply


Messages In This Thread
/countdown bug - by shoru93 - 29.11.2009, 19:55
Re: /countdown bug - by LarzI - 29.11.2009, 20:41
Re: /countdown bug - by shoru93 - 29.11.2009, 21:13
Re: /countdown bug - by LarzI - 29.11.2009, 21:22
Re: /countdown bug - by Outbreak - 29.11.2009, 21:29
Re: /countdown bug - by diesulke - 29.11.2009, 21:43
Re: /countdown bug - by LarzI - 29.11.2009, 21:51
Re: /countdown bug - by shoru93 - 29.11.2009, 21:55
Re: /countdown bug - by lolumadd - 29.11.2009, 22:00
Re: /countdown bug - by Outbreak - 29.11.2009, 22:01

Forum Jump:


Users browsing this thread: 3 Guest(s)