Done:
PHP Code:
public event_DeathMsg(id)
{
new iKiller = read_data(1)
new iVictim = read_data(2)
if(iKiller == iVictim)
{
return PLUGIN_HANDLED;
}
else
{
new name[32];
get_user_name(iKiller, name, 31)
new szWeapon[ 32 ], iWeapon = get_user_weapon( iKiller );
get_weaponname( iWeapon, szWeapon, charsmax( szWeapon ) );
new health = get_user_health(iKiller);
chat_color(iVictim, "!nKilled by !t%s !nwith !g%s !nand remained with !g%d !nhp", name, szWeapon, health)
}
return PLUGIN_HANDLED;
}
Good now but how can i eliminate
weapon_ (only m4a1) etc
[IMG]http://s23.************/cu1yqamd7/imgkill.png[/IMG]
Also on this line:
PHP Code:
new szWeapon[ 32 ], iWeapon = get_user_weapon( iKiller );
PHP Code:
[AMXX] Displaying debug trace (plugin "statsx.amxx")
L 01/06/2014 - 18:40:45: [AMXX] Run time error 10: native error (native "get_user_weapon")