View Single Post
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 05-06-2012 , 12:57   Re: [SNIPPET] How to block the change notification of cvars with NOTIFY flag
Reply With Quote #16

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:

new String:cvars[][] = {"bot_quota""mp_startmoney""mp_flashlight""sv_cheats"};

public 
OnPluginStart()
{
    for(new 
0<sizeof(cvars); i++)
    {
        new 
Handle:CVarHandle FindConVar(cvars[i]);
        if (
CVarHandle != INVALID_HANDLE)
        {
            new 
flags;
            
flags GetConVarFlags(CVarHandle);
            
flags &= ~FCVAR_NOTIFY;
            
SetConVarFlags(CVarHandleflags);
            
CloseHandle(CVarHandle);
            return;
        }
        
ThrowError("Couldn't find %s. What sort of game is this?"cvars[i]);
        return;
    }

Or what about SetEventBroadcast(event, true);
__________________
View my Plugins | Donate

Last edited by TnTSCS; 05-06-2012 at 13:05.
TnTSCS is offline