[HELP] Team Balance
#1

guys i searched a lot for team balance but i dont found which type i want.

like i have some teams,

team_1
team_2

and i want each team balance like team_1 only get 1 player and team_2 also get 1 player only
Reply
#2

Why not write code that yourself - it's basic.
Reply
#3

PHP код:
new
    
Team1Count 0,
    
Team2Count 0;

stock TeamBalance(playerid)
{
    if(
Team1Count Team2Count
    
{
        
SetPlayerTeam(playeridTeam_1);
        
Team1Count++;
    }
    else if(
Team1Count Team2Count)
    {
        
SetPlayerTeam(playeridTeam_2);
        
Team2Count++;
    }
}
public 
OnPlayerDisconnect(playeridreason)
{
    if(
GetPlayerTeam(playerid) == Team_1)
    {
        if(
Team1Count 0)
            
Team1Count--;
    }
    if(
GetPlayerTeam(playerid) == Team_2)
    {
        if(
Team2Count 0)
            
Team2Count--;
    }

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)