Attacker not being alive doesn't matter here and you are not checking if the damage is from a bullet. You should return HAM_HANDLED after SetHamParamFloat().
Modified TakeDamage to increase damage from bullets only.
PHP Code:
#define DMG_BULLET (1<<1)
public fw_TakeDamage( victim, inflictor, attacker, Float:damage, damage_type )
{
if ( !( damage_type & DMG_BULLET ) )
return HAM_IGNORED;
SetHamParamFloat( 4 , damage * get_pcvar_float( g_amount ) );
return HAM_HANDLED;
}
Modify damage from any weapon, including grenades
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#define IsPlayer(%1) (1<=%1<=g_maxplayers)
new g_amount , g_maxplayers;
public plugin_init( )
{
RegisterHam( Ham_TakeDamage , "player" , "fw_TakeDamage" );
g_amount = register_cvar( "amx_damage_increase" , "1.5" );
g_maxplayers = get_maxplayers();
}
public fw_TakeDamage( victim , inflictor , attacker , Float:damage , damage_type )
{
if ( !IsPlayer( attacker ) )
return HAM_IGNORED;
SetHamParamFloat( 4 , damage * get_pcvar_float( g_amount ) );
return HAM_HANDLED;
}
__________________