Raised This Month: $ Target: $400
 0% 

Best way to Detect Hit/Miss with Awp.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 04-24-2011 , 11:49   Re: Best way to Detect Hit/Miss with Awp.
Reply With Quote #2

Paulster1022
Quote:
using get_user_aiming
This will not detect a hit through the wall or grenade hit.
You can use Ham_Takedamage to detect hit and Ham_Weapon_PrimaryAttack to detect shots count. Ham_Weapon_PrimaryAttack count - Ham_Takedamage count = miss count.

RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_awp" "ham_Weapon_PrimaryAttack")
RegisterHam(Ham_TakeDamage, "player", "ham_TakeDamage")

public ham_Weapon_PrimaryAttack(weapon_entity)
{
}

public ham_TakeDamage(victim, inflictor, attacker, Float:damage) // inflictor will probably be weapon_entity from function above
{
}
__________________


Last edited by SonicSonedit; 04-24-2011 at 11:56.
SonicSonedit 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 20:09.


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