Quote:
Originally Posted by dusk
pawn Code:
timer1 ++; if(timer1 == 1) // 2nd number should be your timer's time / 1000, e.g. if i am running a timer at 2000 milliseconds, i will use if(timer1 == 2) { // timer 1 code }
Will this actually work? I mean if "timer1" is a global variable, and you increment it every time the "Global" is called, wouldn't it make the code to excecute only once? As it'll never be equal to 1 again?
|
Apologies for the late reply,
You can set the timer1 back to 0, e.g.
pawn Code:
timer1 ++;
if(timer1 == 1) // 2nd number should be your timer's time / 1000, e.g. if i am running a timer at 2000 milliseconds, i will use if(timer1 == 2)
{
timer1 = 0; // so it can be repeated again.
// timer 1 code
}
Thanks for telling me anyway, I edited the post to mention this.