Team balance (+rep)
#1

I was wondering how to make a team balance with four teams.

Two teams are on same Team (FBI, Police) and other two teams are on another same Team, (Psychos, Criminals)

If someone could please help me out, +rep.

Thanks.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=224853 - read this.
Next time use search engine.
Reply
#3

There's more than those four teams in the game, the script you post wouldn't specificly choose those teams.
Reply
#4

http://forum.sa-mp.com/showpost.php?...09&postcount=4

http://forum.sa-mp.com/showpost.php?...68&postcount=2

Thats all I can find for you, its time for you to do it as well.
Reply
#5

Is this what you are looking for?

pawn Код:
new Player_Team[MAX_PLAYERS];

stock ChooseTeam(playerid)
{
    new T1, T2, T3, T4;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(Player_Team[i]> 0)
            {
                if(Player_Team[i] == 1) T1++;
                if(Player_Team[i] == 2) T2++;
                if(Player_Team[i] == 3) T3++;
                if(Player_Team[i] == 4) T4++;
            }
        }
    }
    if(T1+T2 > T3+T4)
    {
        if(T1 > T2)
        {
            Player_Team[playerid] = 2;
        }
        else
        {
            Player_Team[playerid] = 1;
        }
    }
    else
    {
        if(T3 > T4)
        {
            Player_Team[playerid] = 4;
        }
        else
        {
            Player_Team[playerid] = 3;
        }
    }
}
Reply
#6

Nevermind I found one +rep to both of you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)