A timer question :|
#6

Oh you want to show the timer the countdown for their timer, i see.

Timers can't be directly shown, they work in the background, so you have to make a textdraw, and have another timer per second.

I don't know textdraws that well, so I would wait for thekiller to explain that, he knows textdraws better than i do.

Something like:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  //your textdraw stuff
  new mytimer = SetTimerEx("updateTextDraw",1000, true, "d", textdrawid)
  mytimers[playerid] = SetTimerEX("yourfunction",30000,false,"dd", countdowntimer, countdowntextdraw );

  return 1;
}

forward updateTextDraw(textdrawid);
public updateTextDraw(textdrawid)
{
 //update textdraw stuff(aka minus one second)
}

forward yourfunction(timerid, textdrawid);
public yourfunction(timerid, textdrawid)
{
  KillTimer(timerid);
  //destroy textdraw
}
Reply


Messages In This Thread
A timer question :| - by [Bm]rap45 - 13.02.2010, 06:30
Re: A timer question :| - by [HiC]TheKiller - 13.02.2010, 06:36
Re: A timer question :| - by [Bm]rap45 - 13.02.2010, 06:53
Re: A timer question :| - by mansonh - 13.02.2010, 07:21
Re: A timer question :| - by [Bm]rap45 - 13.02.2010, 07:24
Re: A timer question :| - by mansonh - 13.02.2010, 07:34
Re: A timer question :| - by [Bm]rap45 - 13.02.2010, 07:41
Re: A timer question :| - by mansonh - 13.02.2010, 07:43
Re: A timer question :| - by [HiC]TheKiller - 13.02.2010, 08:50
Re: A timer question :| - by [Bm]rap45 - 13.02.2010, 09:07

Forum Jump:


Users browsing this thread: 1 Guest(s)