- Team limit - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: - Team limit (
/showthread.php?tid=95213)
- Team limit -
Hot - 02.09.2009
How do i make a litmit for a team? Like: 2 teams, every team can only have 15 players, and if 16th player try to enter the team, receive a message saying that the team is full.
Help?
Re: - Team limit -
JaTochNietDan - 02.09.2009
Make a variable and store the amount of people that are in the team in the variable. Then simply do a check when someone wants to enter a team and send the message if its full.
pawn Код:
new TeamCount = 0;
//When person enters team
TeamCount++;
//When persons leaves team
TeamCount--;
//Then to see if its full
if(TeamCount >= 15)
{
SendClientMessage(playerid,red,"Team is full!");
}