I have been trying to figure out for a while how to balance teams in a way I need it but haven't succedded. I need a setup so that there are 17 TEAM_PRISONER and 7 TEAM_GUARD so that its balanced. I'm using Fretta (Because its freaking awesome) if that matters. Don't question the reason, I really don't need to say. Thanks for the help in advance
bump
No help? Really need it!!!!
BUMPPPAAAA
I suggest using * in a team balance code. Should if right letters could balance amount of players
That doesn't explain anything to more. Sorry
serverside
[code]
local teamid1players =
local teamid2players =
for _, v in pairs(team.GetPlayers(teamid1)) do
teamid1players = teamid1players + 1
end
for _, v in pairs(team.GetPlayers(teamid2)) do
teamid2players = teamid2players + 1
end
if (teamid1players/2) > teamid2players then
-- code here what to do when team balance is fine
else
-- code here what to do when the team balance is off
end
[/code]
replace team.GetPlayers(teamid[1/2]) with respective team ids (ex team.GetPlayers(1))
I don't quite understand how it will make there be more Prisoners than Guards.
bumb
Sorry, you need to Log In to post a reply to this thread.