18.11.2012, 00:43
When im lonely on the server and i die,then try to respawn with any of the classes,it wont let me saying that the team is full.
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new team1 = GetPlayersInTeamFromMaxPlayers(TEAM_TERRO);
new team2 = GetPlayersInTeamFromMaxPlayers(TEAM_ARMY);
if(team1 > team2 && gTeam[playerid] == TEAM_TERRO)
{
GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5);
return 0;
}
else if(team2 > team1 && gTeam[playerid] == TEAM_ARMY)
{
GameTextForPlayer(playerid, "~r~Team Full!~n~~w~Choose Another Team!", 3000, 5);
return 0;
}
return 1;
}