SA-MP Forums Archive
[B]tips max player into 0/10 and 10/10 Max[/B] - 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: [B]tips max player into 0/10 and 10/10 Max[/B] (/showthread.php?tid=571295)



[B]tips max player into 0/10 and 10/10 Max[/B] - Izaki - 17.04.2015

[ASK] please let me have his way the eviction of its limited entry, examples
0/10 1/10 2/10 10/10 blah ++ Max 10 players how?



you can help me,I give + rep


Re: [B]tips max player into 0/10 and 10/10 Max[/B] - Ahmad45123 - 17.04.2015

I dont get you...

if you mean you want to limit access to 10 players for something.

Have a variable on top of the gamemode that will count the amount of players inside:
pawn Код:
new playersInsideEvac;
And then add 1 when some one make it to there:
pawn Код:
playersInsideEvac ++;
And then minus 1 when someone exits...
pawn Код:
playersInsideEvac --;
And then when the player is joining the evac, Do this:
pawn Код:
if(playersInsideEvac == 10) return SendClientMessage(playerid, -1, "There is 10 players inside already.");