20.06.2011, 16:50
Nope, just the onplayerspawn teamcount, the requestclass and SetPlayerTeamFromClass
Edit:
I just used OnPlayerRequestSpawn, and it kinda works. Just now i got a problem.
When i try to spawn with the class, it suceeds, and it says "Team is full"
But now i made a different team, with the same codes, but now the MaxPlayers of that team is 10
No one joined that team, and when i try to spawn as that team, it says "Team is full".
Edit:
I just used OnPlayerRequestSpawn, and it kinda works. Just now i got a problem.
When i try to spawn with the class, it suceeds, and it says "Team is full"
But now i made a different team, with the same codes, but now the MaxPlayers of that team is 10
No one joined that team, and when i try to spawn as that team, it says "Team is full".
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(Team1Count > MAXTEAM1)
{
GameTextForPlayer(playerid, "~r~Team is full~y~!", 1000, 3);
return 0;
}
if(Team2Count > MAXTEAM2)
{
GameTextForPlayer(playerid, "~r~Team is full~y~!", 1000, 3);
return 0;
}
if(Team1Count < MAXTEAM1)
{
return 1;
}
if(Team2Count < MAXTEAM2)
{
return 1;
}
return 1;
}