So, something like
PHP Code:
if (GetConVarBool(g_Cvar_Handle))
{
}
Of course, to get the cvar handle you have to either call
CreateConVar (to create a new one, should be done in OnPluginStart) or
FindConVar (to get a handle to an existing one, will return INVALID_HANDLE if not found, should be called in OnAllPluginsLoaded).
FindConVar is a somewhat expensive operation, so you should cache the results.
__________________