PHP Code:
ExecuteHamB(Ham_TakeDamage, i, 0, pev(ent, pev_owner), float(GRENADE_DAMAGE), DMG_BULLET)
it's about the third parameter, which is 0 here. That's the inflictor, or the entity that caused damage. For guns, it's same as the player, but for other entities (like grenades), it's the entity itself.
What you could do is create an entity with your desired classname before you execute TakeDamage, and input its index in that 3rd param, and then remove that entity afterwards.