[REQUEST] read
#4

Create Some global variables like this:

pawn Код:
new HumansPlayers;
new ZombiesPlayers;
new ScientistPlayers;
new DoctorPlayers;
new HumansPlayers;
new StarsPlayers;
new UCPlayers;
Everytime someone joins a team add that + 1, everytime someone leaves minus by 1

So if someone joins the UC team do

pawn Код:
UCPlayers++;
When they leave UC team do

pawn Код:
UCPlayers--;

Then when joining the team do comparisons to all the other teams.

For example say UCPlayers has 3 players online and humans have 2

if player trys to join UCPlayers do:
if(UCPlayers > HumansPlayers)
{
Send a message saying you cannot join this team because it's too big.
}

And to do a balance eg. many people on one team leave. Have a check that runs every once in a while like every 30 seconds or 60 seconds.
Reply


Messages In This Thread
[REQUEST] read - by marinov - 09.11.2010, 23:50
Re: [REQUEST] read - by lavamike - 10.11.2010, 00:04
Re: [REQUEST] read - by marinov - 10.11.2010, 00:06
Re: [REQUEST] read - by lavamike - 10.11.2010, 00:15
Re: [REQUEST] read - by marinov - 10.11.2010, 00:19

Forum Jump:


Users browsing this thread: 2 Guest(s)