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:
public OnPluginStart() {
HookEvent("server_cvar", Event_ServerCvar, EventHookMode_Pre);
}
public Action:Event_ServerCvar(Handle:event, const String:name[], bool:dontBroadcast) {
Block all cvar notifications:
PHP Code:
return Plugin_Handled;
or block all cvar notifications of my plugin only starting with "mycvarprefix_":
PHP Code:
decl String:cvarName[64];
GetEventString(event, "cvarname", cvarName, sizeof(cvarName));
if (StrContains(cvarName, "mycvarprefix_") == 0) {
return Plugin_Handled;
}
return Plugin_Continue;
__________________