PHP Code:
public plugin_init(){
//register_forward( FM_CmdStart, "CmdStart" )
register_forward(FM_PlayerPreThink, "PlayerPreThink")
}
public PlayerPreThink(id){
new button = pev(id,pev_button)
if((button & IN_ATTACK2)){
client_print(0, print_chat, "in attack2..");
//set_pev(id,pev_button,(button & ~IN_ATTACK) & ~IN_ATTACK2)
set_pev(id,pev_button,(button & ~IN_ATTACK2))
}
}
/*public CmdStart(const id, const uc_handle, seed)
{
static buttons
static oldbuttons
buttons = get_uc(uc_handle, UC_Buttons)
oldbuttons = pev(id, pev_oldbuttons);
if((buttons & IN_ATTACK2))
{
client_print(0, print_chat, "in attack2..");
//set_uc(uc_handle,UC_Buttons,(buttons & ~IN_ATTACK2))
set_uc(uc_handle,UC_Buttons,(buttons & ~IN_ATTACK) & ~IN_ATTACK2)
}
if(!(buttons & IN_ATTACK2) && (oldbuttons & IN_ATTACK2)){
//client_print(0, print_chat, "released attack2..");
}
return FMRES_SUPERCEDE; //This does block +attack right?
} */
I used both functions with no success.. I am successfully getting the print outs for "in attack2" so im getting that far. I was able to block +attack when I had it in there, just cant quite get attack2
stuff you see commenting out are things ive tried. This is for TFC
edit: solution was using _special for attack2