Callback problem
#11

That is, I must use three times "for (new i = 0, j = GetPlayerPoolSize (); i <= j; i ++)"?

PHP код:
public DerbyCountdown() 

    if(
DI[STATUS] != DERBY_WAIT) return KillTimer(DI[COUNTDOWN_TIMER]); 
    if(
DI[PLAYERS] <= 0) return CloseDerby(); 
    if(
DI[PLAYERS] == 1
    { 
        
DI[COUNTDOWN_COUNTER] = DERBY_TIME_COUNTDOWN 1
        for(new 
playerid 0GetPlayerPoolSize(); playerid <= jplayerid++) 
        { 
            if(
IsPlayerConnected(playerid)) 
            { 
                if(
Player[playerid][Mode] == GAME_DERBY
                { 
                    
GameTextForPlayer(playerid"~g~Waiting for players"5003); 
                } 
            } 
        } 
        return 
1
    } 
    
DI[COUNTDOWN_COUNTER] --; 
    for(new 
playerid 0GetPlayerPoolSize(); playerid <= jplayerid++) 
    { 
        if(
IsPlayerConnected(playerid)) 
        { 
            if(
Player[playerid][Mode] == GAME_DERBY
            { 
                new 
str[10]; format(str10"~r~%d_minutes_to_start"DI[COUNTDOWN_COUNTER]); 
                
GameTextForPlayer(playeridstr10003);  
            } 
        } 
    } 
     
     
    if(
DI[COUNTDOWN_COUNTER] <= 0
    { 
        
KillTimer(DI[COUNTDOWN_TIMER]); 
        if(
DI[PLAYERS] == 0) return CloseDerby(); 
        else if(
DI[PLAYERS] == 1
        { 
            for(new 
playerid 0GetPlayerPoolSize(); playerid <= jplayerid++) 
            { 
                if(
IsPlayerConnected(playerid)) 
                { 
                    if(
Player[playerid][Mode] == GAME_DERBY
                    { 
                        
GameTextForPlayer(playerid"~g~Waiting for players"5003); 
                    } 
                } 
            } 
            
DI[COUNTDOWN_COUNTER] = DERBY_TIME_COUNTDOWN 1
            
KillTimer(DI[COUNTDOWN_TIMER]); 
            
DI[COUNTDOWN_TIMER] = SetTimer("DerbyCountdown"900true); 
        } 
        else 
StartDerby(); 
    } 
    return 
1

Please, I need a quick help.
Reply


Messages In This Thread
Callback problem - by SapMan - 12.09.2018, 00:06
Re: Callback problem - by SapMan - 12.09.2018, 00:52
Re: Callback problem - by sammp - 12.09.2018, 02:42
Re: Callback problem - by SapMan - 12.09.2018, 02:54
Re: Callback problem - by iHollyZinhO - 12.09.2018, 03:19
Re: Callback problem - by NaS - 12.09.2018, 15:46
Re: Callback problem - by SapMan - 12.09.2018, 20:57
Re: Callback problem - by UFF - 12.09.2018, 21:05
Re: Callback problem - by SapMan - 12.09.2018, 21:20
Re: Callback problem - by Shinja - 12.09.2018, 23:53
Re: Callback problem - by SapMan - 13.09.2018, 01:13
Re: Callback problem - by Shinja - 13.09.2018, 11:10
Re: Callback problem - by SapMan - 13.09.2018, 16:36
Re: Callback problem - by KinderClans - 13.09.2018, 16:45
Re: Callback problem - by SapMan - 13.09.2018, 17:00
Re: Callback problem - by Dayrion - 13.09.2018, 19:06
Re: Callback problem - by KinderClans - 13.09.2018, 19:25
Re: Callback problem - by Undef1ned - 14.09.2018, 15:52
Re: Callback problem - by NaS - 14.09.2018, 16:08

Forum Jump:


Users browsing this thread: 2 Guest(s)