Closed mostten closed 3 years ago
Replace playerData[MAXPLAYERS_NMRIH +1] with playerData[MAXPLAYERS+1]
The reasoning behind using MAXPLAYERS_NMRIH is that the client and server binaries are compiled with a MAXPLAYERS definition of 9. You can never surpass this limit, so using Sourcemod's MAXPLAYERS (which evaluates to 65) would be a waste of memory.
I do plan to rework GetOtherClients
at some point, though :)
Replace playerData[MAXPLAYERS_NMRIH +1] with playerData[MAXPLAYERS+1]
The reasoning behind using MAXPLAYERS_NMRIH is that the client and server binaries are compiled with a MAXPLAYERS definition of 9. You can never surpass this limit, so using Sourcemod's MAXPLAYERS (which evaluates to 65) would be a waste of memory.
I do plan to rework
GetOtherClients
at some point, though :)
Its have 64 players in some servers
Its have 64 players in some servers
You can hack the server's max, but clients will simply crash when a 10th player connects. A lot of the server-side logic falls apart too, stuff like respawning ceases to work completely.
Its have 64 players in some servers
You can hack the server's max, but clients will simply crash when a 10th player connects
at an early stage in player num was 8,at a later stage game turnon TV solt,it increase to 9,at least I don't worry about it for game update.
Yeah no worries, if the game ever updates to support more clients, I'll make sure to update the code accordingly. Closing this for now
Remove Line 126 #define MAXPLAYERS_NMRIH 9, Replace playerData[MAXPLAYERS_NMRIH +1] with playerData[MAXPLAYERS+1],
Use dynamic array for example:
int[] others = new int[MaxClients]; int count = GetOtherClients(client, others);
int GetOtherClients(int client, int[] others){...}