team balancing?
#5

Change your team defines

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    new Team1, Team2;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && i != playerid)
        {
            if(gTeam[i] == TEAM1) Team1++;
            else if(gTeam[i] == TEAM2) Team2++;
        }
    }
    if(gTeam[playerid] == TEAM1 && Team1 > Team2)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "This team is full!");
        return 0;
    }
    else if(gTeam[playerid] == TEAM2 && Team2 > Team1)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "This team is full!");
        return 0;
    }
    return 1;
}
Reply


Messages In This Thread
team balancing? - by Rubennnnn - 07.02.2010, 15:25
Re: team balancing? - by deather - 07.02.2010, 15:34
Re: team balancing? - by Rubennnnn - 07.02.2010, 15:36
Re: team balancing? - by Universal - 07.02.2010, 15:48
Re: team balancing? - by MadeMan - 07.02.2010, 15:53
Re: team balancing? - by Rubennnnn - 07.02.2010, 16:07
Re: team balancing? - by MadeMan - 07.02.2010, 16:31
Re: team balancing? - by Rubennnnn - 07.02.2010, 17:08
Re: team balancing? - by IcyBlight - 07.02.2010, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)