Countdown
#2

somethign like this
pawn Код:
//top of script
new count = 5;
new counttimer;
forward CountDown();

//after main()
public CountDown()
{
  if(count <= 0)
  {
   GameTextForAll("~g~ Go ~n~ Go ~n~ Go!", 5000, 5);
   KillTimer(counttimer);
   count = 5;
   return 1;
  }
  else
  {
   new str[128];
   format(str, sizeof str, "~b~ %d", count);
   GameTextForAll(str, 500, 5);
   counttimer = SetTimer("CountDown", 1000, 0);
  }
  return 1;
}

//command
if(strcmp(cmdtext, "/countdown", true) == 0)
{
  CountDown();
}
Reply


Messages In This Thread
Countdown - by sggassasin - 27.06.2009, 04:44
Re: Countdown - by Grim_ - 27.06.2009, 04:51
Re: Countdown - by sggassasin - 27.06.2009, 05:13
Re: Countdown - by Grim_ - 27.06.2009, 05:18
Re: Countdown - by sggassasin - 27.06.2009, 05:43
Re: Countdown - by Grim_ - 27.06.2009, 05:48

Forum Jump:


Users browsing this thread: 2 Guest(s)