When i kill someone with left mouse click thits plugin does not set frags to me.
Can some one help me here
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
public plugin_init()
{
register_plugin("PLUGIN", "VERSION", "AUTHOR")
register_cvar( "amx_knife_dmg", "10.0" )
register_event( "Damage", "Event_Damage", "b", "2!0" )
}
public Event_Damage( id )
{
new weapon, bodypart
new attacker = get_user_attacker( id, weapon, bodypart )
if ( !is_user_alive( id ) || !is_user_alive( attacker ) )
return PLUGIN_CONTINUE
if ( weapon != CSW_KNIFE )
return PLUGIN_CONTINUE
new iHealth = get_user_health( id )
new iDamage = floatround( float( read_data(2) ) * get_cvar_float( "amx_knife_damage" ) )
if ( iHealth > iDamage )
fakedamage( id, "weapon_knife", float( iDamage ), read_data( 3 ) )
else
{
user_silentkill( id )
make_deathmsg( attacker, id, 0, "knife" )
}
return PLUGIN_CONTINUE
}
__________________