team balancer didnt working.
#1

Код:
public OnPlayerRequestSpawn(playerid) 
{ 
    for(new p = 0; p < GetMaxPlayers(); p++)
    {
        if (gTeam[p] == Yakuza) Count1++; 
        else if (gTeam[p] == Nostra) Count2++;
        else if (gTeam[p] == Policija) Count3++; 
		else if (gTeam[p] == Triads) Count4++; 
    }
    if ((Count1 > Count2) && gTeam[playerid] == Yakuza) 
    { 
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Atsipraрome, taиiau\nРi komanda yra pilna, pasirinkite kitа.", "Gerai", "Uюdaryti");
        return 0;.
    }
    else if ((Count2 > Count1) && gTeam[playerid] == Nostra && GetPlayerScore( playerid ) < 1500 )
    { 
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Atsipraрome, taиiau\nJыs neturite 1.500 patirties taрkш,\nArba рi komanda yra pilna, pasirinkite kitа.", "Gerai", "Uюdaryti");
        return 0;
    }
    else if ((Count3 > Count2) && gTeam[playerid] == Policija && GetPlayerScore( playerid ) < 3000 )
    { 
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Atsipraрome, taиiau\nJыs neturite 3.000 patirties taрkш,\nArba рi komanda yra pilna, pasirinkite kitа.", "Gerai", "Uюdaryti"); 
        return 0;
    }
    if ((Count4 < Count3) && gTeam[playerid] == Yakuza) 
    { 
        ShowPlayerDialog(playerid, 5, DIALOG_STYLE_MSGBOX,"GangWars", "Atsipraрome,\nРi komanda yra pilna, pasirinkite kitа.", "Gerai", "Uюdaryti");
        return 0;
    }
	return 1;
}
Sometimes it works, and sometimes no.. When i turn server on( OnGameModeInit ) and try to join Triads team, it say, that team is full ( on OGMI count1 2 3 4 = 0; ) when i try to join police team, its good, but my score <3000..
Reply


Messages In This Thread
team balancer didnt working. - by Gh0sT_ - 25.09.2010, 10:51
AW: team balancer didnt working. - by Nero_3D - 25.09.2010, 12:31

Forum Jump:


Users browsing this thread: 2 Guest(s)