How to make a 1 minute countdown
#1

I want to make a timer that starts at 1:00 and goes down to 0. I want it also to show and the screen ( bottom right ) as it counts down.
Reply
#2

Код:
forward CountDown(cd);
public CountDown(cd)
{
      new ctd[20];
      format(ctd, sizeof(ctd), "%d", cd);
      GameTextForAll(ctd,1000,3);
      if(cd > 0)
      {
              cd--;
              SetTimerEx("CountDown",false, 1000, "d", cd);
       }
       else GameTextForAll("Go",1000,3);
       return 1;
}
and if you want to do a 1 min countdown you use:
CountDown(60);


hope i help
Reply
#3

avi why you are formating a string ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)