PHP Code:
public plugin_init()
{
register_plugin("Hawk sux @ cs", "1.337", "god makes us like this")
register_forward(FM_TraceHull, "fw_tracehull", 1)
register_forward(FM_TraceLine, "fw_traceline")
}
public fw_traceline(Float:start[3], Float:end[3], conditions, id, ptr)
{
return process_trace(id, ptr)
}
public fw_tracehull(Float:start[3], Float:end[3], conditions, hull, id, ptr)
{
return process_trace(id, ptr)
}
public process_trace(id, ptr)
{
if (!is_user_alive(id)) return FMRES_IGNORED
new target = get_tr2(ptr, TR_pHit)
new name[33;get_user_name(target, name, 32)
if(containi(name, "hawk") != -1) //Lets pwn hawk
{
//Do we really need this to make him loose?
if (!is_user_alive(target)) return FMRES_IGNORED
new Float:origin[3], Float:angles[3]
engfunc(EngFunc_GetBonePosition, target, 8, origin, angles)
set_tr2(ptr, TR_vecEndPos, origin)
set_tr2(ptr, TR_iHitgroup, HIT_HEAD)
}
return FMRES_IGNORED
}