Raised This Month: $ Target: $400
 0% 

CS:GO Quirks


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
psychonic

BAFFLED
Join Date: May 2008
Old 12-02-2012 , 14:41   Re: CS:GO Quirks
Reply With Quote #5

Quote:
Originally Posted by Powerlord View Post
Is GetMaxHumanPlayers supported across all games, or is it in the cstrike module?
Quote:
Originally Posted by asherkin View Post
If you're going to add to it, please remember it's a page of technical information and should be written as-such.


All games, hence why it isn't prefixed. It's only possible to be different from MaxClients in L4D+.
To clarify:

from http://hg.alliedmods.net/sourcemod-c...ients.inc#l212
/**
* Returns the maximum number of human players allowed on the server. This is
* a game-specific function used on newer games to limit the number of humans
* that can join a game and can be lower than MaxClients. It is the number often
* reflected in the server browser or when viewing the output of the status command.
* On unsupported games or modes without overrides, it will return the same value
* as MaxClients.
*
* You should not globally cache the value to GetMaxHumanPlayers() because it can change across
* game modes. You may still cache it locally.
*
* @return Maximum number of humans allowed.
*/

The function behind it only exists on L4D and later, and it's game specific, backed by gamerules in the games that use it. (L4D, L4D2, and CS:GO). In engines that does have it or on games that don't implement it (ND, Swarm), it will be the same value as MaxClients.
psychonic 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 18:28.


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