SA-MP Forums Archive
MAX_PLAYERS Question ? - 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: MAX_PLAYERS Question ? (/showthread.php?tid=128349)



MAX_PLAYERS Question ? - Zeromanster - 17.02.2010

Is MAX_PLAYERS always equal to 500, or it depends on the maxplayers in server.cfg ?

Thanks.


Re: MAX_PLAYERS Question ? - iron_war_lord - 17.02.2010

It is never the absolute maximum (500) unless you set your config to 500. Just think of the calculations of it were always maximum :\

So, MAX_PLAYERS is from the config...


Re: MAX_PLAYERS Question ? - Correlli - 17.02.2010

Quote:
Originally Posted by zєяσмαиѕтєя
Is MAX_PLAYERS always equal to 500, or it depends on the maxplayers in server.cfg ?

Thanks.
MAX_PLAYERS is defined in a_samp.inc file, you can change it in the include file or just do like this in your gamemode:
pawn Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS (200) // your own amount.
or you could use GetMaxPlayers which reads from server.cfg file.


Re: MAX_PLAYERS Question ? - iron_war_lord - 17.02.2010

Meh, I looked everywhere for the MAX_PLAYER declaration (Maybe because I thought it was a Declaration for some reason)

So I thought it was from the config (I must be thinking of GetMaxPlayers)


Re: MAX_PLAYERS Question ? - Zeromanster - 17.02.2010

Thanks.