Auto Team Balance
#5

pawn Код:
new TeamPlayers[ <Amount of teams here> ];

public OnPlayerRequestSpawn( playerid )
{
    for( new teams; teams < 23; teams++ )
    {
        if( teams == gTeam[ playerid ] ) continue;
        if( TeamPlayers[ gTeam[ playerid ] ] > TeamPlayers[ teams ] + 3)
        {
            SendClientMessage( playerid, COLOR_RED, "You can't join this team as it would unbalance the game!" );
            return 0;
        }
    }
    return 1;
}
Reply


Messages In This Thread
Auto Team Balance - by sanrock - 16.06.2012, 12:28
Re: Auto Team Balance - by leonardo1434 - 16.06.2012, 13:26
Re: Auto Team Balance - by sanrock - 18.06.2012, 22:16
Re: Auto Team Balance - by sanrock - 18.06.2012, 23:16
Re: Auto Team Balance - by tiernantheman - 19.06.2012, 00:02
Re: Auto Team Balance - by sanrock - 19.06.2012, 00:03
Re: Auto Team Balance - by tiernantheman - 19.06.2012, 00:05
Re: Auto Team Balance - by sanrock - 19.06.2012, 06:47
Re: Auto Team Balance - by iggy1 - 19.06.2012, 07:10

Forum Jump:


Users browsing this thread: 1 Guest(s)