View Single Post
pan0s
Senior Member
Join Date: Nov 2017
Old 05-01-2021 , 16:45   Re: [L4D2] Shop v2.4 (1 May 2021)
Reply With Quote #16

Quote:
Originally Posted by Marttt View Post
You shouldn't be using a #define to set MaxClients to 18.
As a good practice, use MAXPLAYERS+1 instead. (it will create an array with 64 size)
L4D2 can have up to 32 clients, a lot of modded servers has 20+ players slots.
For the listen server, client index over 18 will have the exception "Client index 19 is invalid", so I define it to 18.
Of course, for the server who have 20+ players, they can change it back to 20+ because the dedicated server has no this problem.
pan0s is offline