Team Balance Problem
#1

Hello everybody.I created my own Team balance and its not working i dont see any problem maybe you will see.

pawn Код:
new swatcount;//Global Variable
new terrorcount;//Global Variable


public OnPlayerDisconnect(playerid, reason)
{
    if(GetPlayerTeam(playerid) == 1)
    {
        terrorcount--;
    }
    else if(GetPlayerTeam(playerid) == 2)
    {
        swatcount--;
    }
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    SetPlayerInterior(playerid, 0);
    if(GetPlayerSkin(playerid) == 121)
    {
        SetPlayerTeam(playerid, 1);
        SetPlayerColor(playerid,0xFF4600FF);
        terrorcount++;
    }
    if(GetPlayerSkin(playerid) == 285)
    {
        SetPlayerTeam(playerid, 2);
        SetPlayerColor(playerid,0x0091FFFF);
        swatcount++;
    }
    if((terrorcount > swatcount) && (GetPlayerTeam(playerid) == 1))
    {
        GameTextForPlayer(playerid,"~r~Team Full choose other",2000,3);
        return 0;
    }
    if((terrorcount < swatcount) && (GetPlayerTeam(playerid) == 2))
    {
        GameTextForPlayer(playerid,"~r~Team Full choose other",2000,3);
        return 0;
    }
    return 1;
}
Reply


Messages In This Thread
Team Balance Problem - by SpiderWalk - 21.02.2012, 19:59
Re: Team Balance Problem - by WoodPecker - 21.02.2012, 20:08
Re: Team Balance Problem - by Luka P. - 22.02.2012, 01:29
Re: Team Balance Problem - by SpiderWalk - 24.02.2012, 17:04
Re: Team Balance Problem - by T0pAz - 24.02.2012, 17:47

Forum Jump:


Users browsing this thread: 1 Guest(s)