Need help! +rep+++
#1

i searched and found some team balance but i could not understand them!so i need some-one to help me! i have

2 teams Grove and Balla can some-one make me team balancer with these 2 teams? ill +rep HIM!
Reply
#2

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    new team1count, team2count;
    for(new i, m = GetMaxPlayers(); i < m; i++)
    {
        if (IsPlayerConnected(i))
        {
            if (gTeam[i] == TEAM_GROVE) team1count++;
            else if (gTeam[i] == TEAM_BALA) team2count++;
        }
    }
    if (gTeam[playerid] == TEAM_GROVE)
    {
        if (team1count > (team2count+1)){
                SendClientMessage(playerid, COLOR_YELLOW, "This team is full, please choose the other one.");
            return 0;
        }

    }
    else if (gTeam[playerid] == TEAM_BALA)
    {
        if ((team1count+1) < team2count){
            SendClientMessage(playerid, COLOR_YELLOW, "This team is full, please choose the other one.");
            return 0;
        }
    }
    return 1;
}
it works perfect for me.. +rep it will work.
Reply
#3

Thanks jarnu and i really miss u bro add me back in fb request sent +REP! ill rep u when i can it says i need to

spread more but thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)