[HELP]Team Balancer Help
#1

Will this balancer work will it simple not allow them to spawn and keep sending message when thay try to spawn?

Код:
public OnPlayerRequestSpawn(playerid)
{
new teamcount[2];
for(new i, m = GetMaxPlayers(); i < m; i++)
if(IsPlayerConnected(i))
teamcount[gTeam[playerid]]++;
if(teamcount[gTeam[playerid]] > teamcount[!gTeam[playerid]])
return SendClientMessage(playerid, RED, "Please Balance The Teams And Pick The Weaker Side!(Press TAB)"), 0;
return 0;
}
Reply
#2

Eh why is there two returns? btw indentation please.
Reply
#3

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
Eh why is there two returns? btw indentation please.
Код:
public OnPlayerRequestSpawn(playerid)
{
new teamcount[2];
for(new i, m = GetMaxPlayers(); i < m; i++)
if(IsPlayerConnected(i))
teamcount[gTeam[playerid]]++;
if(teamcount[gTeam[playerid]] > teamcount[!gTeam[playerid]])
SendClientMessage(playerid, RED, "Please Balance The Teams And Pick The Weaker Side!(Press TAB)");

return 0;
}
Better?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)