AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can I set max players num in AMXX (https://forums.alliedmods.net/showthread.php?t=174334)

wwzw 12-19-2011 01:32

Can I set max players num in AMXX
 
HLDS startup parameters in which I joined "+ maxplayers 21".
Can I change this value in the AMXX?

fysiks 12-19-2011 03:03

Re: Can I set max players num in AMXX
 
No, it must be changed in the command line. You can, however, change the visble max players by changing the cvar sv_visiblemaxplayers.

wwzw 12-19-2011 04:21

Re: Can I set max players num in AMXX
 
Thank you very much! fysiks . But I can not fully determine the effectiveness of setting.
If I set the "+ maxplayers 21". Set_cvar_num ("sv_visiblemaxplayers", 32);
In fact the maximum allowable number of players online server do?

fysiks 12-19-2011 13:55

Re: Can I set max players num in AMXX
 
Quote:

Originally Posted by wwzw (Post 1615700)
Thank you very much! fysiks . But I can not fully determine the effectiveness of setting.
If I set the "+ maxplayers 21". Set_cvar_num ("sv_visiblemaxplayers", 32);
In fact the maximum allowable number of players online server do?

"Visible max players" doesn't actually change any settings.

bibu 12-19-2011 14:29

Re: Can I set max players num in AMXX
 
I really wonder why this cvar exist and if it bugs with "get_maxplayers". I know that I had some issues with some plugins when I used "sv_visiblemaxplayers 255". :)

Connor & Arkshine... show us HLSDK.. :)

fysiks 12-19-2011 14:34

Re: Can I set max players num in AMXX
 
Quote:

Originally Posted by bibu (Post 1616037)
I really wonder why this cvar exist

I'm guessing it's intention was to hide slots and not to make it look like you have more slots.

I don't see why get_maxplayers() would be affected since "maxplayers" remains unchanged.

bibu 12-19-2011 14:47

Re: Can I set max players num in AMXX
 
Quote:

Originally Posted by fysiks (Post 1616040)
I'm guessing it's intention was to hide slots and not to make it look like you have more slots.

The max amount is 255. Are you sure that it was meant to hide slots? :mrgreen:

fysiks 12-19-2011 14:53

Re: Can I set max players num in AMXX
 
Quote:

Originally Posted by bibu (Post 1616050)
The max amount is 255. Are you sure that it was meant to hide slots? :mrgreen:

255 is the upper limit of an unsigned byte (one of the simplest integers; I'm not saying that's exactly what it is but I'm guessing it is). They really don't need to cap it since there is really no bad side effects from not capping it. Checking if it's over 32 would be just one more conditional in the code.

wwzw 12-21-2011 02:21

Re: Can I set max players num in AMXX
 
If I set the "+maxplayers 21" and set_cvar_num("sv_visiblemaxplayers", 12);

When the number of players reached 12, the other players can enter ?

fysiks 12-21-2011 03:35

Re: Can I set max players num in AMXX
 
Quote:

Originally Posted by wwzw (Post 1616923)
If I set the "+maxplayers 21" and set_cvar_num("sv_visiblemaxplayers", 12);

When the number of players reached 12, the other players can enter ?

Via Steam Server Browser, No. Via the connect console command, Yes.


All times are GMT -4. The time now is 11:51.

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