Raised This Month: $12 Target: $400
 3% 

sv_visiblemaxplayers not working in server.cfg


Post New Thread Reply   
 
Thread Tools Display Modes
micazoid
Veteran Member
Join Date: Oct 2010
Location: Munich - Germany
Old 07-10-2015 , 11:43   Re: sv_visiblemaxplayers not working in server.cfg
Reply With Quote #11

Quote:
Originally Posted by Marverlous View Post
The code compile without trouble, but visiblemaxplayers still remains unchanged for some reason. Thank you for sharing nonetheless.

I checked both server.cfg and autoexec.cfg, nothing is overriding the cvar unless there's a stock config I'm unaware of.
You got some options to hunt this down:

Try to rename addons folder and restart server. If something in MMS or SM is changeing the Var you will know for sure, if it is unchanged after renaming. If it still changes without MMS and SM enabled the "changer" is in cfg folder somewhere

Enable Addons back and try to change maxplayers "on the fly" via sm_recon and see what happens (errorlogs consoleoutput etc)

Disable all Plugins and enable each one after changing sv_visiblemaxplayers. If it gets overwritten by a plugin this is the way to find it. You can spare Stockplugins from SM btw

Had something similar with a bots plugin a few years ago, was very frustrating to find that. Good Luck
__________________
micazoid is offline
Dr_Knuckles
AlliedModders Donor
Join Date: Mar 2005
Location: SW Florida
Old 07-10-2015 , 14:08   Re: sv_visiblemaxplayers not working in server.cfg
Reply With Quote #12

It's something with this new update. All my 32 slot servers that I was using the hltv slot for a hidden 33rd slot are now only showing 31 slots. I can use sv_visiblemaxplayers to set it back to 32 but it just changes back a few seconds later.
__________________
Dr_Knuckles is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 07-10-2015 , 14:11   Re: sv_visiblemaxplayers not working in server.cfg
Reply With Quote #13

PHP Code:
public OnGameFrame() // over-fucking-kill but it should work. Sets it once per game frame.
{
    
ServerCommand("sv_visiblemaxplayers 32");

PHP Code:
public OnPluginStart()
{
    
CreateTimer(1.0ChangeValue_TIMER_REPEAT);
}

public 
Action ChangeValue(Handle Timer// Sets it once a second.
{
    
ServerCommand("sv_visiblemaxplayers 32");

You can use either of these to forcefully set the convar every now and then, but they aren't good suggestions. Use at your own risk (worst thing that could happen is lag).

Last edited by Potato Uno; 07-10-2015 at 14:13.
Potato Uno is offline
AllMassive
Senior Member
Join Date: Sep 2004
Location: /dev/urandom
Old 03-10-2021 , 03:07   Re: sv_visiblemaxplayers not working in server.cfg
Reply With Quote #14

Quote:
Originally Posted by Marverlous View Post
The code compile without trouble, but visiblemaxplayers still remains unchanged for some reason
I checked both server.cfg and autoexec.cfg, nothing is overriding the cvar unless there's a stock config I'm unaware of.
Dont touch that
Code:
sv_visiblemaxplayers
and remove it from all configs.
Just set
Code:
+maxplayers
to the Value needed and then set
Code:
amx_hideslots
to the Number you want to substract from that
Code:
+maxplayers
.
Remeber: You only need one additional Slot!

If +maxplayers and sv_visiblemaxplayers differ, you will see the +maxplayer-Value - so you should just remove ANY sv_visiblemaxplayers-Setting in your configs and restart the hlds-process.

Last edited by AllMassive; 03-10-2021 at 03:13. Reason: typo
AllMassive is offline
Reply


Thread Tools
Display Modes

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 11:23.


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