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?
__________________