Raised This Month: $ Target: $400
 0% 

Grenade damage from Ham_TakeDamage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-23-2012 , 11:37   Grenade damage from Ham_TakeDamage
Reply With Quote #1

Ok....as the title says, i'm trying to get grenade damage from Ham_TakeDamage (using the damage bits) Reading the HLSDK it says that it does DMG_BLAST damage, but my code isn't picking it up. Here it is....

Code:
public takeDamage_pre(victimID, inflictor, attackerID, Float:flDmg, dmgBits)
{
	if(dmgBits & (DMG_BLAST | DMG_BURN) )
		client_print(victimID, print_chat, "Grenade did %f damage.", flDmg)
	else
		client_print(victimID, print_chat, "dmgBits: %d blast: %d", dmgBits, DMG_BLAST)
	return HAM_HANDLED ; 
}
What am i missing? (i added DMG_BURN to try and bug fix, but to no avail)
the else prints this.... "dmgBits: 16777216 blast: 6"
Or is there a better way of determining if it was a grenade hit?
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 05:48.


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