Very minor countdown problem
#1

Hi guys.
Listen I'm having a little problem with my countdown script.
Well this is the code:
pawn Code:
forward CountdownTimer();
public CountdownTimer()
{
    Seconds--;
    if(Seconds == 0)
    {
        GameTextForAll("~R~Go!",1200,5);
        KillTimer(Timer);
        CountdownRunning = 0;
    }
    new Update[24];
    format(Update, 24, "~r~%d", Seconds);
    GameTextForAll(Update,1000,5);
    return 1;
//There's a whole more bunch of code,but I'm sure that that's where the failure is.
}
Well the problem is that when the countdown is up,it still shows 0 while it supposed to show "Go!".
It's not catastrophic,but I'd still like it to be fixed.
Thank you in advance.
Reply
#2

pawn Code:
forward CountdownTimer();
public CountdownTimer()
{
    Seconds--;
    if(Seconds == 0)
    {
        GameTextForAll("~R~Go!",1200,5);
        KillTimer(Timer);
        CountdownRunning = 0;
        return 1; //This.
    }
    new Update[24];
    format(Update, 24, "~r~%d", Seconds);
    GameTextForAll(Update,1000,5);
    return 1;
}
Reply
#3

Oh my god!
Htf didn't I know that xD
Thanks it works now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)