I added an is_user_connected() check to prevent an error if a player tosses a killing nade and he disconnects before the kill occurs. You will need to include cstrike module.
PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
register_event( "DeathMsg" , "playerDeath" , "a" , "1>0" )
public playerDeath()
{
new iKiller = read_data( 1 );
new iVictim = read_data( 2 );
new szWeapon[ 8 ]; read_data( 4 , szWeapon , charsmax( szWeapon ) );
if ( ( iKiller != iVictim ) && equal( szWeapon , "grenade" ) && is_user_connected( iKiller ) && !cs_get_user_bpammo( iKiller , CSW_HEGRENADE ) )
{
give_item( iKiller , "weapon_hegrenade" );
}
}
__________________