18.07.2010, 18:51
i use TDM team deathmatch
and need max players in team 15
how
??
?
and need max players in team 15
how

??
?

??
?
OnPlayerSpawn(playerid)
{
TeamBalance(playerid, TEAM_NAME, TEAM_NAME, 1, Team); // Sets the balance of the teams equal
}
TeamBalance(playerid, team_1, team_2, ratio, teamvar[]) {
new result_var = (Players() / ratio);
for(new x = 0; x < MAX_PLAYERS; x++) {
if(teamvar[x] == team_1) {
count++;
}
}
if(count < result_var) {
teamvar[playerid] = team_1;
} else {
teamvar[playerid] = team_2;
}
}