Raised This Month: $ Target: $400
 0% 

Doesn't take damage from the front


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-22-2009 , 09:47   Re: Doesn't take damage from the front
Reply With Quote #10

I would not use inflictor at all in this case.

PHP Code:
RegisterHamHam_TakeDamage "player" "fw_HamTakeDamage" 

public 
fw_HamTakeDamageiVictim iInflictor iAttacker Float:fDamage iBitDamage )
{
    if ( ( 
iVictim == iAttacker ) || !iAttacker 
        return 
HAM_IGNORED;
        
    static 
FloatfAttackerOrigin[3]
    
entity_get_vectoriAttacker EV_VEC_origin fAttackerOrigin )
    
    return 
is_in_viewconeiVictim fAttackerOrigin ) ? HAM_SUPERCEDE HAM_IGNORED;

__________________

Last edited by Bugsy; 05-22-2009 at 10:15.
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode