Timer Won't Stop! [+VIDEO]
#4

Quote:
Originally Posted by (_AcE_)
Посмотреть сообщение
I don't understand when you say the timer is running in a loop, I see no timer running in a loop..
He mostly meant that you start the timer inside a loop
Quote:
Originally Posted by (_AcE_)
Посмотреть сообщение
pawn Код:
//startcw
    for(new i=0; i<MAX_PLAYERS; i++) // Loop
    {
            //
            countdowntimer = SetTimer("Countdown", 1000, true); // Timer
            //
    }
Lets think what will happen
You loop through all players, for every player who is either in TEAM_HOME or in TEAM_AWAY will start a timer
So you start now X timers and override the variable countdowntimer x times

Problem
We got now x timers but only one variable which stores the last timer
Therefore the other timers are still running and cant be stopped anymore

Just put the timer outside the loop, the same if you kill the timer
Reply


Messages In This Thread
Timer Won't Stop! [+VIDEO] - by (_AcE_) - 21.07.2012, 17:56
Re: Timer Won't Stop! [+VIDEO] - by Youice - 21.07.2012, 20:33
Re: Timer Won't Stop! [+VIDEO] - by (_AcE_) - 22.07.2012, 00:51
AW: Re: Timer Won't Stop! [+VIDEO] - by Nero_3D - 22.07.2012, 01:54
Re: Timer Won't Stop! [+VIDEO] - by leonardo1434 - 22.07.2012, 02:12
Re: Timer Won't Stop! [+VIDEO] - by (_AcE_) - 22.07.2012, 02:39
Re: Timer Won't Stop! [+VIDEO] - by leonardo1434 - 22.07.2012, 03:13
Re: Timer Won't Stop! [+VIDEO] - by [KHK]Khalid - 22.07.2012, 03:28
AW: Re: Timer Won't Stop! [+VIDEO] - by Nero_3D - 22.07.2012, 11:57

Forum Jump:


Users browsing this thread: 2 Guest(s)