1. If I have more than 1 say command in my plugin, then I hook "say" and check the command.
Otherwise, I just register the 1 command.
2. Just setting the flag in register_*cmd() doesn't enforce the flag.
You have to enforce it yourself with cmd_access(), access(), or (get_user_flags() & ADMIN_*).
3. I think it would be best if you registered the events anyway, then checked to see if the cvar was enabled or disabled when they were called.
Code:
new cvar_on;
public plugin_init()
{
register_event("HLTV", "EventNewRound", "a", "1=0", "2=0");
cvar_on = register_cvar("plugin_on", "1");
}
public EventNewRound()
{
if( !get_pcvar_num(plugin_on) ) return;
// code if plugin is on
}
__________________