View Single Post
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 04-28-2008 , 22:20   Re: Real Grenades Behavior
Reply With Quote #2

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 tcliptammo
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().
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."

Last edited by soccdoodcss; 04-28-2008 at 22:33.
soccdoodcss is offline
Send a message via AIM to soccdoodcss