Sounds like a good idea.
However, register the client commands whether the pcvar is on or off. Instead, check if the plugin is off when it attempts to block the command. Otherwise you will have to change the map to change the status of the plugin.
Also, change:
PHP Code:
new tclip, tammo
new weapon = get_user_weapon(id,tclip,tammo)
if (get_pcvar_num(rgb_cvar) == 0)
return PLUGIN_HANDLED
to:
PHP Code:
if (!get_pcvar_num(rgb_cvar))
return PLUGIN_HANDLED
new weapon = get_user_weapon(id)
If the plugin is off, why bother finding the user's weapon? Especially considering how often prethink is called.
Plus, with version 1.8.0 you don't have to add the extra crap in get_user_weapon().
__________________