Random Teaming! - 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: Random Teaming! (
/showthread.php?tid=511389)
Random Teaming! -
Gamer_007 - 05.05.2014
So guys, i want to make random team select for players.When they type /cmd, they get in a dm as a team.I tried it like we create random spawn.but that didnt worked though. Any help?
Re: Random Teaming! -
XK - 05.05.2014
how many teams do you have?you want like randomly set his team to random one?
Re: Random Teaming! -
arjanforgames - 05.05.2014
For example you could have:
pawn Код:
new redTeam;
new blueTeam;
Then just use:
pawn Код:
if(redTeam > blueTeam)
{
// Put your player in the blue team
}
else if(blueTeam > redTeam)
{
// Put your player in the red team
}
else
{
// Just put the player in red or blue, team will be unbalanced until the next player joins.
}