Just making sure you know, first you must make sure attacker is a player (1 <= attacker <= g_iMaxPlayers)
In the ham called function you get the "inflictor" input, you can check that against "attacker", if they're equal, the attacker used a weapon, if it's not, the attacker used a nade or something else to attack.