SA-MP Forums Archive
[UNSOLVED]countdown timer not starting at 6:00 - 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: [UNSOLVED]countdown timer not starting at 6:00 (/showthread.php?tid=147484)



[UNSOLVED]countdown timer not starting at 6:00 - ~Dangun! - 12.05.2010

Title says all
this is the code.
pawn Код:
public Timer()
{
    gTimePassed++;
  new timeleft = ((ROUND_TIME() * 60) - gTimePassed); //

    new minutes = (timeleft / 60);
    new seconds = (timeleft - minutes * 60);

    new tmpmsg[128];
    format(tmpmsg,sizeof(tmpmsg),"%d:%d",minutes, seconds);
    TextDrawSetString(TimerCD, tmpmsg);
    TextDrawShowForAll(TimerCD);
    if(minutes == 0 && seconds == 0)
    {
        new string[128];
        format(string,sizeof(string),"Round is over, if this message show up, the timer is also killed");
        SendClientMessageToAll(0x33CCFFAA,string);
        KillTimer(Timer());
        KillTimer(ROUND_TIME());
        TextDrawDestroy(TimerCD);
    }

}