SA-MP Forums Archive
Help - Max player in 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help - Max player in team (/showthread.php?tid=276289)



Help - Max player in team - huyhung65ht - 13.08.2011

Hello , I have 1 teams police

I want something like 5 players max in this team.

Please help me.


Re: Help - Max player in team - Meinstad - 13.08.2011

How you save it ? Like you account saving.


Re: Help - Max player in team - Admigo - 13.08.2011

Make a counter like this
//above your script
new teamcount=0;
//if player enter team
teamcount++;
//if player leaves team
teamcount--;
And
Код:
//onplayerrequestspawn
if(teamcount>=5)
{
return 0;
}
Make for every team this count.