02.03.2012, 15:13
hy my countdown timer not work then i write countdown it shows 3 2 1 1 1 go! go! a lot of times
Quote:
forward CountingDown(playerid, time); if(strcmp(cmdtext,"/countdown",true) == 0) { SetTimerEx("CountingDown", 1000, true, "ii", playerid, 3); } public CountingDown(playerid, time) { if(time != 0) { new string[5]; format(string, sizeof(string), "%d", time); GameTextForPlayer(playerid, string, 1200, 4); SetTimerEx("CountingDown", 1000, true, "ii", playerid, time-1); } else { GameTextForPlayer(playerid, "~g~Go!", 2500, 3); TogglePlayerControllable(playerid, 1); SendClientMessage(playerid, -1, "Go!"); SetTimer("CountingDown", 1000, false); } return true; } |