Raised This Month: $ Target: $400
 0% 

Damage Angle


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-01-2009 , 09:08   Re: Damage Angle
Reply With Quote #9

I've had problems in the past using get_user_attacker(). Many times iWeapon and iHitZone remain at zero after the function is called.

Use this instead:

PHP Code:
#define m_LastHitGroup        75 
PHP Code:
//...
        
if(is_user_alive(iVictim) && zp_get_user_zombie(iVictim))
        {
            if( 
get_pdata_intiVictim  m_LastHitGroup ) == HIT_HEAD )
            {                
                
// make a variable to hold angles
                
new Float:fAngle[3]
 
                
// make some random angles
                
fAngle[0] = random_float(-90.090.0)
                
fAngle[1] = random_float(-90.090.0)
                
fAngle[2] = random_float(-90.090.0)
 
                
// punch the victim's angles
                
set_pev(iVictimpev_punchanglefAngle)
            }
        }
//... 
__________________

Last edited by Bugsy; 06-01-2009 at 09:11.
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 13:57.


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