27.01.2014, 17:15
Код:
public OnPlayerRequestSpawn(playerid)
{
new team1count = GetPlayersCountInTeam(TEAM_TERRORIST);
new team2count = GetPlayersCountInTeam(TEAM_ARMY);
if(GetPlayerTeam(playerid) == TEAM_TERRORIST)
{
if(team1count > team2count)
{
SendClientMessage(playerid, TEAM_TERRORIST_COLOR,"Terrorist team is full");
return 0;
}
}
if(GetPlayerTeam(playerid) == TEAM_ARMY)
{
if(team2count > team1count)
{
SendClientMessage(playerid, TEAM_ARMY_COLOR,"Army team is full");
return 0;
}
}
if(classid == 6)
{
if(PlayerInfo[playerid][pMafia] == 0)
{
SendClientMessage(playerid, TEAM_TERRORIST_COLOR,"You need to be mafia member to use this class");
return 0;
}
}
if(classid == 7)
{
if(PlayerInfo[playerid][pOptic] == 0)
{
SendClientMessage(playerid, TEAM_ARMY_COLOR,"You need to be optic member to use this class");
return 0;
}
}
return 1;
}

