Posts: 1,208
Threads: 36
Joined: Apr 2015
Posts: 1,208
Threads: 36
Joined: Apr 2015
because I said that the start value is 0 and no 300
Posts: 1,208
Threads: 36
Joined: Apr 2015
START: timecnt = 0, timestop = 300
every second:
PHP код:
timecnt++; // 1 2 3 4 ... 300
new timessek, timesmin;
timesmin = ((timestop-timecnt)/60);
timessek = (timestop-(timecnt+(timesmin*60)));
format(buffer,sizeof buffer,"%02d:%02d",timesmin,timessek);
//show time
if(timecnt == timestop){
//The End
timecnt = 0; //reset
}
//edit: despite counting upwards, it shows the time down: 5:00 4:59 ... 0:00
Example:
https://www.youtube.com/watch?v=desa4vyIHGs
countup, time down
Posts: 1,208
Threads: 36
Joined: Apr 2015
Example:
PHP код:
new mytimer;
//Start
mytimer = SetTimer("CountDownTimer", 1000, 1);
//Stop
KillTimer(mytimer);
Posts: 393
Threads: 105
Joined: Dec 2014
Reputation:
0
Anyone fix for ast problem?