[UNSOLVED] Team Balance With 3 Teams
#10

Try this (not tested, i'm at work.. cannot test right now)

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if ( CountA > CountB && CountA > CountC && GetPlayerTeam(playerid) == TEAM_A)
    {
        SendMsg(playerid, 5000, "~b~NOTICE: ~w~This team is full!");
        return 0;
    }
    else if ( CountB > CountA && CountB > CountC && GetPlayerTeam(playerid) == TEAM_B)
    {
        SendMsg(playerid, 5000, "~b~NOTICE: ~w~This team is full!");
        return 0;
    }
    else if ( CountC > CountA && CountC > CountB && GetPlayerTeam(playerid) == TEAM_C)
    {
        SendMsg(playerid, 5000, "~b~NOTICE: ~w~This team is full!");
        return 0;
    }
    else return 1;
}

OnPlayerDeath and OnplayerDisconnect;
if (GetPlayerTeam(playerid) == TEAM_A)
{
    CountA--;
}
else if (GetPlayerTeam(playerid) == TEAM_B)
{
    CountB--;
}
else if (GetPlayerTeam(playerid) == TEAM_C)
{
    CountC--;
}

OnPlayerSpawn;
if (GetPlayerTeam(playerid) == TEAM_A)
{
    CountA++;
}
else if (GetPlayerTeam(playerid) == TEAM_B)
{
    CountB++;
}
else if (GetPlayerTeam(playerid) == TEAM_C)
{
    CountC++;
}
Reply


Messages In This Thread
[UNSOLVED] Team Balance With 3 Teams - by Nameless303 - 17.12.2009, 14:49
Re: [UNSOLVED] Team Balance With 3 Teams - by DeathOnaStick - 17.12.2009, 15:25
Re: [UNSOLVED] Team Balance With 3 Teams - by Nameless303 - 17.12.2009, 23:54
Re: [UNSOLVED] Team Balance With 3 Teams - by Backwardsman97 - 18.12.2009, 00:03
Re: [UNSOLVED] Team Balance With 3 Teams - by Nameless303 - 18.12.2009, 11:25
Re: [UNSOLVED] Team Balance With 3 Teams - by xDENNNIISSSS - 21.12.2009, 18:22
Re: [UNSOLVED] Team Balance With 3 Teams - by Nameless303 - 22.12.2009, 08:18
Re: [UNSOLVED] Team Balance With 3 Teams - by LarzI - 22.12.2009, 08:29
Re: [UNSOLVED] Team Balance With 3 Teams - by Nameless303 - 22.12.2009, 08:35
Re: [UNSOLVED] Team Balance With 3 Teams - by wafffllesss - 22.12.2009, 09:45

Forum Jump:


Users browsing this thread: 1 Guest(s)