Restrict the amount of players on a team - 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: Restrict the amount of players on a team (
/showthread.php?tid=574970)
Restrict the amount of players on a team -
dimashr12345 - 22.05.2015
Hey guys!
Right now, I am scripting my own team deathmatch gamemode. I have already made commands using which a player can choose which team to play on (the player gets assigned to a team and his skin changes). I want to restrict the amount of players on a team to 5. I've looked on SA-MP wiki, but I can't find an appropriate command. Can someone help me do this?
Re: Restrict the amount of players on a team -
AlonzoTorres - 22.05.2015
pawn Код:
new team1_amount;
new team2_amount;
When the player does the team command you do teamx_amount++ and check if its greater than 5.
Re: Restrict the amount of players on a team -
dimashr12345 - 22.05.2015
Thanks a lot. It really helped.