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



getmaxplayers() - nico005 - 13.08.2010

Hello,

i use it in my gamemode, i need to replace MAX_PLAYERS ( so 500) by new maxp = getmaxplayers() ( so 50 in my server)?


new TransportDuty[MAX_PLAYERS];
new TransportValue[MAX_PLAYERS];

or:

new TransportDuty[maxp];
new TransportValue[maxp];


or both, finally it's similar?


Re: getmaxplayers() - Sascha - 13.08.2010

use:
#undef MAX_PLAYERS
#define MAX_PLAYERS 50


Re: getmaxplayers() - nico005 - 13.08.2010

ok, so I need to change. I ask it because it my server crash when my server have 50/50 but if I have 30-40 -45 players, the server dont crash during more week. So I search the reason...


Re: getmaxplayers() - nico005 - 13.08.2010

no because I use MAX_PLAYERS (500) it's just no that. But it's strange if my server is full or was full, some times after it crash. So i search the reason, objects? models? destroyvehicle?