I tried this (everyone is immune) :
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
new bool:knifeImmune[33] = true;
public plugin_init() {
register_forward(FM_TraceHull,"fw_tracehull");
}
public fw_tracehull(Float:v1[3],Float:v2[3],noMonsters,hull,skipEnt,ptr) {
if(!is_user_connected(skipEnt) || !is_user_alive(skipEnt))
return FMRES_IGNORED;
static hit;
hit = get_tr(TR_pHit); // an immune player was not hit
if (!hit || hit > 32 || !knifeImmune[hit])
return FMRES_IGNORED; // override
set_tr(TR_pHit,0);
return FMRES_IGNORED;
}
This isn't working : everyone can kill with knife.
I make a test :
When script pass the first condition and get hit, the only hit returned is "-1". I think that it's not a value wanted. No ? Do u know why we have only -1 ?
Thank u