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_int( iVictim , m_LastHitGroup ) == HIT_HEAD )
{
// make a variable to hold angles
new Float:fAngle[3]
// make some random angles
fAngle[0] = random_float(-90.0, 90.0)
fAngle[1] = random_float(-90.0, 90.0)
fAngle[2] = random_float(-90.0, 90.0)
// punch the victim's angles
set_pev(iVictim, pev_punchangle, fAngle)
}
}
//...
__________________