07.02.2010, 15:53
Change your team defines
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
new Team1, Team2;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && i != playerid)
{
if(gTeam[i] == TEAM1) Team1++;
else if(gTeam[i] == TEAM2) Team2++;
}
}
if(gTeam[playerid] == TEAM1 && Team1 > Team2)
{
SendClientMessage(playerid, 0xFFFFFFFF, "This team is full!");
return 0;
}
else if(gTeam[playerid] == TEAM2 && Team2 > Team1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "This team is full!");
return 0;
}
return 1;
}