Checking if a timer is running?
#2

When the timer ends, the variable will still contain the timer's ID, so no, it won't work.

Let's see..

pawn Code:
new timer;

blahblah = SetTimerEx(..)
timer++;

public thetimerfunction(..)
{
    // Blah blah
    timer--;
}

// Check if running
if(timer) // Timer is running
You should bare in mind that you can have two timers running at once, the same function, so you don't want =1 or =0 you want ++ and --.
Reply


Messages In This Thread
Checking if a timer is running? - by 2KY - 17.03.2012, 04:26
Re: Checking if a timer is running? - by MP2 - 17.03.2012, 04:29

Forum Jump:


Users browsing this thread: 1 Guest(s)