[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.
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
I tried both methods and couldn't get the 'cvar changed' notifications to go away...
or does this only work on clients and not admins? |
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Your code + how you change convars please.
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
I just ended up editing basecommands.sp to never show cvar changes with sm_cvar.
That should work just fine for now I suppose. |
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Does anyone got it to work recently ?
Code:
public OnPluginStart() Is there another way ? |
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Quote:
PHP Code:
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Saw this from KyleS (I think) a long time ago. This allows you to remove FCVAR_NOTIFY from Cvars
Might need some tweaking, but this is the gist: PHP Code:
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Quote:
|
Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Why not use the same method in the OT and use SetEventBroadcast?
|
All times are GMT -4. The time now is 03:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.