25.06.2013, 13:55
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new team1 = GetPlayersInTeamFromMaxPlayers(TEAM_TERRO);
new team2 = GetPlayersInTeamFromMaxPlayers(TEAM_ARMY);
if((team1 > team2 && gTeam[playerid] == TEAM_TERRO) || (team2 > team1 && gTeam[playerid] == TEAM_ARMY))
{
GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5);
return 0;
}
else if((gTeam[playerid] == TEAM_ARMY && (team1 == 0 || team1 == team2)) || (gTeam[playerid] == TEAM_TERRO && (team2 == 0 || team1 == team2)))
{
return 1;
}
return 1;
}