Timer Bug?
#1

Hey!

I'm having weird timer bug.. I'm displaying countdown of 3 2 1 GO! with gametext etc..

Lets say all of them get displayed normally but for some reason there is 1 second gap between each number is shown.. so lets say it goes

3 (waits one second) 2 (waits one second) 1 (waits one second) GO!

And I dont want that.. I want it to go 3 2 1 GO without that one second gap.. but I cant seem to find issue in my code.. I'll post it here
PHP код:
Start_Map[DM] = SetTimerEx("StartMap"10001"d"DM); 
PHP код:
forward StartMap(mode);
public 
StartMap(mode)
{
    new 
string[128];
    switch(
mode)
    {
        case 
DM:
        {
            
Countdown[DM]--;
            for(new 
GetPlayerPoolSize(), 0<= j;  i++) if(IsPlayerConnected(i))
            {
                if(
pMode[i] == DM)
                {
                    if(
Countdown[DM] > )
                    {
                        
format(stringsizeof(string), "%d"Countdown[DM]);
                        
GameTextForPlayer(istring10004);
                    }
                    else
                    {
                        
GameTextForPlayer(i"Go!"10004);
                    
                        
KillTimer(Vehicle_Freeze[DM]);
                        
KillTimer(Start_Map[DM]);
                        
Countdown[DM] = 4;
                        
                        
TogglePlayerControllable(itrue);
                    }
                    
                }
            }
        }
    }
    return 
1;

EDIT: Here's GIF of how it goes.. As you can see there's 1 second gap between

https://gyazo.com/77b789188c91a1813c2c19cd9951a639
Reply


Messages In This Thread
Timer Bug? - by NoteND - 07.03.2019, 18:58
Re: Timer Bug? - by RIDE2DAY - 08.03.2019, 00:46
Re: Timer Bug? - by Jefff - 08.03.2019, 01:17
Re: Timer Bug? - by NoteND - 08.03.2019, 06:53

Forum Jump:


Users browsing this thread: 1 Guest(s)