PHP Code:
public fw_TraceAttack_World(Victim, Attacker, Float:Damage, Float:Direction[3], Ptr, DamageBits)
{
if(!is_user_connected(Attacker)) // this check is unnecessary.
return HAM_IGNORED
if(get_user_weapon(Attacker) != CSW_MP5NAVY || !g_has_newcomen[Attacker])
return HAM_IGNORED
static Float:flEnd[3], Float:vecPlane[3]
get_tr2(Ptr, TR_vecEndPos, flEnd)
get_tr2(Ptr, TR_vecPlaneNormal, vecPlane) //this is not used so its useless.
Make_BulletHole(Attacker, flEnd, Damage)
SetHamParamFloat(3, float(DAMAGE))
return HAM_HANDLED
}
I checked the code it does need some optimization. Like use either is user alive or is user connected dont use both of them in the same check.
Use ham item deploy forward instead of hooking curweapon event its better.
And the video is not available.
Heres the correct
link
__________________