1. You declare a global variables, example 'g_Cvar'
2. You register in plugin_init() and assign it's id.
PHP Code:
g_Cvar = register_cvar( "cvar_name", "1" ); // '1' means it's value
3. You check in a public if is On/Off using an if() condition with the native get_pcvar_num() wich return the 'value' of the cvar.
PHP Code:
if( get_pcvar_num( g_Cvar ) )
{
// If the cvar have a pozitive value .. ( a pozitive value means bigger than 0, so 1 , 2 , 3 .. etc.
}
else
{
// If the cvar have a negative value ...
}