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

[Question] CSGO server not saving cvar after map change/restart


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Barlap
Senior Member
Join Date: Apr 2016
Location: Romania
Old 02-06-2023 , 18:31   [Question] CSGO server not saving cvar after map change/restart
Reply With Quote #1

Hello,
I recently started transitioning from amxmodx to sourcemod.
I currently have 5 cs 1.6 servers and i want to start working with sourcemod.
Recently i opened my own csgo server, installed a few plugins but i keep facing a problem.
After setting a certain cvar value and changing the map, the cvar will reset to it's initial value.
Let's take for example this plugin: https://forums.alliedmods.net/showthread.php?t=77306
It's using by default the cvar value "sm_ca_connectdisplaytype 1". If i install it on the server then i recompile the plugin with "sm_ca_connectdisplaytype 0" and i even change the cvar via sm_cvar, the cvar will come back to value 1, even if in the plugin and server is set by default to 0.
I was thinking that maybe unlike cs 1.6, the csgo servers stores the cvar values somewhere in a cache location en rewrites the value even if the plugin value is set to another value.
This happened to me with multiple plugins not just this one.
__________________

Last edited by Barlap; 02-06-2023 at 18:44.
Barlap is offline
Send a message via ICQ to Barlap Send a message via Skype™ to Barlap
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-06-2023 , 18:45   Re: [Question] CSGO server not saving cvar after map change/restart
Reply With Quote #2

Plugin use
PHP Code:
    //create config file if not exists
    
AutoExecConfig(true"cannounce"); 
https://sm.alliedmods.net/new-api/so...AutoExecConfig

So plugin created config file into ...cfg/sourcemod/ folder.
And it will be execute that file every map change.

- You can set cvar to else, by editing config file.
- You can also stop plugin reset cvar value by config file, making file empty or comment line
PHP Code:
// my_cvar 1 
Not need edit and compile plugin for this.
__________________
Do not Private Message @me
Bacardi is offline
Barlap
Senior Member
Join Date: Apr 2016
Location: Romania
Old 02-06-2023 , 18:51   Re: [Question] CSGO server not saving cvar after map change/restart
Reply With Quote #3

Coming from amxmodx it's pretty new.
So basically this is like a cache location for .cfg files.
Good to know and thank you.
Topic can be cosed.
Quote:
Originally Posted by Bacardi View Post
Plugin use
PHP Code:
    //create config file if not exists
    
AutoExecConfig(true"cannounce"); 
https://sm.alliedmods.net/new-api/so...AutoExecConfig

So plugin created config file into ...cfg/sourcemod/ folder.
And it will be execute that file every map change.

- You can set cvar to else, by editing config file.
- You can also stop plugin reset cvar value by config file, making file empty or comment line
PHP Code:
// my_cvar 1 
Not need edit and compile plugin for this.
__________________
Barlap is offline
Send a message via ICQ to Barlap Send a message via Skype™ to Barlap
Reply



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 13:56.


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