Here is a standart kill message:
Code:
#include <engine>//engine needed
public Damage_event(id) {
new wpn, body, attacker = get_user_attacker(id, wpn, body)
// Its a Grenade
if(wpn == 4 && hasHE[attacker])
{
new Float:hp = float(get_user_health(id))
new Float:dmg = float(read_data(2))
dmg *= 0.5
new Float:damage =hp - dmg
kill_player(id,attacker,Float:damage)
}
}
kill_player(id,attacker,Float:damage){
set_msg_block(get_user_msgid("DeathMsg"),BLOCK_ONCE)
fakedamage(id,"trigger_hurt",damage,0)
if (entity_get_float(id,EV_FL_health) <= 0.0){
if ( attacker ){
message_begin( MSG_ALL, get_user_msgid("DeathMsg"))
write_byte(attacker)
write_byte(id)
write_string("name of weapon")// i dont know the name of he grenade, this change the skull icon to another icon
message_end()
}
}
}