Look my code,and tell me what is wrong,plugin dont works
PHP Code:
#include <amxmodx>
#include <fakemeta_util>
#define PLUGIN "ATTACK BLOCKER"
#define VERSION "1.0"
#define AUTHOR "#8 SickneSS"
/* Boolean */
new bool:b_attack[33]
public plugin_init() {
/* Plugin Registration */
register_plugin(PLUGIN, VERSION, AUTHOR)
/* Forwards */
register_forward(FM_CmdStart,"FwdCmdStart",0)
/* Command */
register_clcmd("say /godmode","cmdGodmode")
}
public FwdCmdStart(id,uc_Handle,seed)
{
if(!is_user_alive(id) || !b_attack[id]) return FMRES_IGNORED
static button
button = get_uc(uc_Handle,UC_Buttons);
if(button & IN_ATTACK) {
button &= ~IN_ATTACK
}
if(button & IN_ATTACK2) {
button &= ~IN_ATTACK2
}
return FMRES_IGNORED
}
public cleint_disconnect(id) {
b_attack[id] = false
}
public cmdGodmode(id) {
b_attack[id] = true
fm_set_user_godmode(id, 1)
set_task(20.0,"cmdRemove",id)
}
public cmdRemove(id) {
b_attack[id] = false
fm_set_user_godmode(id, 0)
}