AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   sv_visiblemaxplayers not working in server.cfg (https://forums.alliedmods.net/showthread.php?t=265889)

micazoid 07-10-2015 11:43

Re: sv_visiblemaxplayers not working in server.cfg
 
Quote:

Originally Posted by Marverlous (Post 2317365)
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

Dr_Knuckles 07-10-2015 14:08

Re: sv_visiblemaxplayers not working in server.cfg
 
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.

Potato Uno 07-10-2015 14:11

Re: sv_visiblemaxplayers not working in server.cfg
 
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).

AllMassive 03-10-2021 03:07

Re: sv_visiblemaxplayers not working in server.cfg
 
Quote:

Originally Posted by Marverlous (Post 2317365)
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.


All times are GMT -4. The time now is 10:30.

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