Countdown Help
#3

Do what he said ^.

And this is absolutely the WORST method of making a countdown in the world.

This is recommended:

pawn Код:
SetTimer("five", 1000, 0);
SetTimer("four", 2000, 0);
SetTimer("three", 3000, 0);
SetTimer("two", 4000, 0);
SetTimer("one", 5000, 0);
SetTimer("start", 7000, 0);

// Into...

new countdown == 5;

SetTimerEx("countdowntimer", 1000, true, "i", countdown);

forward countdowntimer(count);

public countdowntimer(count)
{
    countdown --;
    if(countdown == 0)
    {
        //If timer is 0, write "start" here
        KillTimer(countdowntimer);
        countdown == 5; //So if we re-do the SetTimerEx, we do not need to reset the variable.
    }
    return 1;
}
This is much faster and easier.
Reply


Messages In This Thread
Countdown Help - by necrobg3 - 17.08.2012, 21:17
Re: Countdown Help - by lamarr007 - 17.08.2012, 21:22
Re: Countdown Help - by Kindred - 17.08.2012, 21:35
Re: Countdown Help - by Kirollos - 17.08.2012, 21:36
Re: Countdown Help - by necrobg3 - 18.08.2012, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)