I'm not at my house so I can't test, but this should work.
Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init()
{
register_plugin("Right Click Grenade", "0.1", "Exolent");
register_forward(FM_CmdStart, "FwdCmdStart");
}
public FwdCmdStart(plr, uc_handle, seed)
{
if( !is_user_alive(plr) )
{
return FMRES_IGNORED
}
#if AMXX_VERSION_NUM < 180
new clip, ammo, weapon = get_user_weapon(plr, clip, ammo);
#else
new weapon = get_user_weapon(plr);
#endif
if( weapon != CSW_HEGRENADE )
{
return FMRES_IGNORED;
}
new button = get_uc(uc_handle, UC_Buttons);
if( button&IN_ATTACK2 )
{
button &= ~IN_ATTACK2;
button |= IN_ATTACK;
set_uc(uc_handle, UC_Buttons, button);
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
__________________