[SNIPPET] How to block the change notification of cvars with NOTIFY flag
Since the notify=false parameter of the SetConVar Functions doesn't work anymore for orangebox/L4D games, and because it's often necessary to set the NOFITY flag for certain cvars that need to be public, here is how to block the notifcations that normally automatically goes th the clients when such a ConVar gets changed.
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
does this block sourcemod cvar change, or just server cvars?
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
It does not block cvar changes at all.
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
well not block them, just stop the notification been sent to the players.
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
cvars are cvars, there is no difference between sourcemod cvars and server cvars.
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Doing this will cause the rules list to get out-of-sync.
EDIT: Treat this as a reply to the post below, I was rather tired and misread the OP originally :P. |
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
If your plugin is the one changing the convar, it can just remove the FCVAR_NOTIFY flag, change the value, and re-add the flag. HLSW Info does this.
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Quote:
To properly update a public CVAR (FCVAR_NOTIFY) without displaying it ingame, you can use the SteamTools extension and use Steam_SetRule() to manually set it, here are my stocks: PHP Code:
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Quote:
I think my method is preferable, because no extension is required, not everyone has Steamtools installed on their server, my method also doesn't break if new updates come out. |
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Update: Added missing code line.
|
All times are GMT -4. The time now is 09:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.