View Single Post
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-16-2017 , 18:37   Re: [Weapon] Newcomen
Reply With Quote #4

PHP Code:
public fw_TraceAttack_World(VictimAttackerFloat:DamageFloat:Direction[3], PtrDamageBits)
{
    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(PtrTR_vecEndPosflEnd)
    
get_tr2(PtrTR_vecPlaneNormalvecPlane)      //this is not used so its useless.    
            
    
Make_BulletHole(AttackerflEndDamage)
    
    
SetHamParamFloat(3float(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
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 06-17-2017 at 07:35.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh