12-31-2010, 13:07
Hey Guys im new to modding(Just started around 3 weeks after BO)
I'm trying to limit the attacking team to 3 players while the rest on the defending team.
and i'm just wondering is this Correct way
I'm trying to limit the attacking team to 3 players while the rest on the defending team.
and i'm just wondering is this Correct way
Code:
doPlayerCount()
{
attack = 0;
defend = 0;
for(i = 0; i < level.players.size; i++) {
if(level.players[i].pers["team"] == game["defenders"])
defend++;
if(level.players[i].pers["team"] == game["attackers"])
attack++;
if (attack <= 3)
{
defend++ || attack++;
}
else
{
defend++;
}
}