Quote:
Originally Posted by Natsheh
No you shouldn't blocking player prethink is the wrong way to achieve what he wants, in mature of a fact it wont do nothing.
|
woops, my bad!
I meant if he hooked it with
Code:
register_forward(FM_CmdStart, "fw_CmdStart")
so it would look like this:
PHP Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init()
{
register_plugin("Block duck n forward", "0.1", "Wrath")
register_forward( FM_CmdStart , "fm_CmdStart" );
}
public fm_CmdStart(id,Handle)
{
new Buttons; Buttons = get_uc(Handle,UC_Buttons);
if(is_user_bot(id))
{
if(buttons & IN_FORWARD)
{
Buttons &= ~IN_FORWARD;
}
else if(buttons & IN_DUCK)
{
Buttons &= ~IN_DUCK;
} else return FMRES_IGNORED;
set_uc( Handle , UC_Buttons , Buttons );
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
hope this does the trick
__________________