~fixed~ - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ~fixed~ (
/showthread.php?tid=482725)
~fixed~ -
Blackazur - 22.12.2013
~fixed~
Re: Team Balance -
CutX - 22.12.2013
lets say we have 2 vars representing the teams:
vars:
Team1 and
Team2
now when someone joins, for example, Team 1. we
add 1 to the
Team1 var.
we do the same for
Team2 ofc.
so now we have two vars representing the "size" of each Team.
Now we add something to that part when a player joins one of the Teams.
if variable
Team1 is
greater than variable
Team2 then we force the player to join
Team2
simple.
Also
-1 when someone leaves the Team or disconnects