so my problem is when i kill someone with a he grenade it says the man that got killed, killed himself, how can i fix that, that i killed him?
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>
#define PLUGINNAME "He damage Multiplier"
#define VERSION "1.0"
#define AUTHOR "Nightscream"
#define MAX_CZ_LENGHT 32
public plugin_init() {
register_plugin( PLUGINNAME, VERSION, AUTHOR )
register_cvar( "amx_hemulti", "1")
register_event( "Damage", "hedmg", "be" )
}
public hedmg( id ) {
new victim = id;
new dmg_take = read_data( 2 );
new dmgtype = read_data( 3 );
new multiplier = get_cvar_num( "amx_hemulti" );
new damage = dmg_take * multiplier;
new iWeapID, attacker = get_user_attacker( victim, iWeapID );
new name[33];
get_user_name( victim, name, 32);
if( !is_user_alive( attacker ) || !is_user_alive( victim ) ) {
return PLUGIN_HANDLED
}
if( iWeapID == CSW_HEGRENADE ) {
fakedamage( victim, "weapon_grenade", float(damage), dmgtype )
client_print( attacker, print_chat, "[AMXX] the he did %i damage to %s", damage, name )
}
return PLUGIN_CONTINUE
}
__________________