28.12.2009, 19:48
Now i got that balancer but ill go to play alone:
I cannot spawn when I press shift or spawn.
This is my balancer:
So if you found the problem and you can help me then im happy
I cannot spawn when I press shift or spawn.
This is my balancer:
Код:
public OnPlayerRequestSpawn(playerid)
{
new Count1, Count2;
for(new p = 0; p < GetMaxPlayers(); p++)
{
if (GetPlayerTeam(p) == TEAM_GREEN)
{
Count1++;
}
else if (GetPlayerTeam(p) == TEAM_BLUE)
{
Count2++;
}
}
if ((Count1 > Count2) && GetPlayerTeam(playerid) == TEAM_GREEN)
return !SendClientMessage(playerid,red, "[BALANCER] Balancing teams. Choose Another Team");
else if ((Count2 > Count1) && GetPlayerTeam(playerid) == TEAM_BLUE)
return !SendClientMessage(playerid,red, "[BALANCER] Balancing teams. Choose Another Team");
return 0;
}

