Bugzilla – Bug 4591
register_event (Damage)
Last modified: 2013-05-26 10:53:20 PDT
register_event("Damage", "damage_msg", "b", "2!0") read_data(0) byte EventEntity read_data(1) byte DamageSave read_data(2) byte DamageTake read_data(3) long DamageType read_data(4) coord CoordX read_data(5) coord CoordY read_data(6) coord CoordZ damage_type = read_data(3) is only 0 const DMG_HEGRENADE = (1<<24) public damage_msg(id) { new aid = get_user_attacker(id) new damage_type = read_data(3) if (damage_type & DMG_HEGRENADE) client_print(0, print_chat, "[HE] id: %i - aid: %i - rd2: %i - rd3: %i", id, aid, read_data(2), read_data(3)) else client_print(0, print_chat, "[Bullet] id: %i - aid: %i - rd2: %i - rd3: %i", id, aid, read_data(2), read_data(3)) return PLUGIN_CONTINUE }
hmm, what?
I think he says the param (3) damageType returns always 0, which is actually true.
read_data(3) long DamageType yes param 3 is only 0 const DMG_HEGRENADE = (1<<24) // cs, cz so u must use hamsandwich, to check if DMG_BULLET/DMG_BLAST/DMG_HEGRENADE, can us fix it?
I've not tried to check yet. But, yes, use instead Ham_TakeDamage which works fine.
There is no bug. DamageType passed through this message is only visual damage type, meaning that have hud art. You can check DMG_SHOWNHUD define in HLDSK.