I'm guessing you can't hook +reaload and +drop. I'm generally a server side programmer, I know very little of the engine itself.
Reload:
Quote:
Originally Posted by Bugsy
If you only care about the button press then this will work:
PHP Code:
#include <amxmodx> #include <fakemeta>
public plugin_init() { register_forward( FM_CmdStart , "CmdStart" ); }
public CmdStart( id , uc_handle , seed ) { static Buttons , OldButtons; Buttons = get_uc( uc_handle , UC_Buttons ); OldButtons = pev( id , pev_oldbuttons ); if ( !( OldButtons & IN_RELOAD ) && ( Buttons & IN_RELOAD ) ) { //Reload pressed } else if ( ( OldButtons & IN_RELOAD ) && !( Buttons & IN_RELOAD ) ) { //Reload released } }
|
Not sure about drop.
Look at other plugins you know of that are hooking those buttons and see how they do it.
__________________