Not tested.
PHP Code:
#include <engine>
#include <cstrike>
public plugin_init()
register_event("DeathMsg", "OnDeathMsg", "a");
public OnDeathMsg()
{
new killer = read_data(1);
if (!is_user_alive(killer))
return;
new weap[32] = "weapon_";
read_data(4, weap[7], charsmax(weap[7]));
if (equal(weap, "weapon_hegrenade"))
return;
new ent = find_ent_by_owner(killer + 1, weap, killer);
if (ent > killer)
cs_set_weapon_ammo(ent, cs_get_weapon_ammo(ent) + 1);
}
__________________