How to make a countdown?
#2

Replace textdraw0 with your textdraw.
pawn Код:
new Timer, TimeS;

stock Countdown()
{
  TextdrawShowForAll(textdraw0);
  TextDrawSetString(textdraw0, "60");
  Timer = SetTimer("Counting", 1000, true);
  TimeS = 60;
}

forward Counting();
public Counting()
{
  TimeS --;
  if(TimeS == 0)
  {
    KillTimer(Timer);
    TextDrawHideForAll(textdraw0);
  }
  new TimeF[3];
  format(TimeF, 3, "%d", TimeS);
  TextDrawSetString(textdraw0, TimeF);
  return 1;
}
Reply


Messages In This Thread
How to make a countdown? - by biltong - 27.02.2010, 20:57
Re: How to make a countdown? - by [HiC]TheKiller - 27.02.2010, 22:10
Re: How to make a countdown? - by biltong - 15.03.2010, 19:20
Re: How to make a countdown? - by biltong - 16.03.2010, 13:18
Re: How to make a countdown? - by Jeffry - 16.03.2010, 13:24
Re: How to make a countdown? - by aircombat - 16.03.2010, 13:42
Re: How to make a countdown? - by Jeffry - 16.03.2010, 13:44

Forum Jump:


Users browsing this thread: 1 Guest(s)