Setting 2 timers in parallel
#1

Hello
I need help with setting 2 timers in parallel.
Here are the timers:
pawn Код:
forward CountDown();
forward Sec();

SetTimer("CountDown",30000,false);
SetTimer("Sec",1000,true);

public Sec() { time = time-1; }
public CountDown() {
    new str[128];
    format(str, sizeof(str), "~w~%d ~g~~h~~h~Seconds", time);
    GameTextForAll(iRace_CDString,1001,6);
    PlayerPlaySoundToAll(1056);
    return 1; }
(Yea I know not the best scripting skills there are,but I'll fix that)

Anyway I want them to work exacly on the same time,if not this is going to create tons of bugs.
How can I make them work in parallel?
Thanks
Nuriel
Reply
#2

This aint possible since Pawn only executes one line at a time.
One of the timers wait till the other is finished
Reply
#3

Quote:
Originally Posted by milanosie
Посмотреть сообщение
This aint possible since Pawn only executes one line at a time.
One of the timers wait till the other is finished
So how can I make a countdown timer that will reduce 1 from the countdown string every 1 second?
Reply
#4

uhmm.. Lemme think for a minute, Since obviously you are now just showing the countdown once.

Make it so that you set the countdown time on 999

and at the 'second' public make it call the countdown again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)