24.01.2010, 09:44
It starts on 8 minutes left and it counts down to 0 how do i make this?
new Tmin = 0; Thour = 00;
...
new cdTimer = SetTimer("countdown", 1000, 1);
...
public countdowntimer()
{
Tmin--;
if(Tmin < 0) Thour--, Tmin=59;
if(Thour < 0)
{
KillTimer(cdTimer);
...do whatever you do when timer runs out
return 1;
}
//set your textdraw to the new time and reshow for players
}
new timeleft = 480; // 8 minutes in seconds
minutes = timeleft / 60;
seconds = timeleft % 60;