Code:
register_event("DeathMsg", "event_death", "a", "1>0")
new killer = read_data(1)
new ammo, clip, wpnindex = get_user_weapon(killer, clip, ammo)
new name[32]
get_user_name(killer, name, 31)
if(wpnindex == CSW_HEGRENADE)
{
client_print(victim, print_chat, "%s killed you with %s", name, global_weapon_array)
}
I normally use client_death but in this case I decided to use the register_event for deathmsg.
Whenever a player kills another with a grenade...the weaponid returned is knife?
I'm not sure if this is normal.
All other weapon id's stored in the global array is returned correctly except for the nade index.