Raised This Month: $ Target: $400
 0% 

HELP MAX_PLAYERS, MAX_CLIENTS, MaxClients


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-29-2018 , 10:32   Re: HELP MAX_PLAYERS, MAX_CLIENTS, MaxClients
Reply With Quote #9

This is not that complicated. If you set your server to 15 slots, then get_maxplayers() returns 15.

As mentioned, MAX_PLAYERS is set to 32 which is the max number of players that a HL1 server supports. This constant can be used for sizing arrays since you cannot use a non-constant, such as get_maxplayers(), for this purpose. The value returned by get_maxplayers() can be used for run-time conditions, such as max iterations for a loop or something.
__________________
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode