/* *** * * KillingNotice * (c)copyright by Schorsch der alte Krieger * Special thanks goes to Manpower * http://www.upg.de.tf * http://tux-network.mine.nu * * AMX Mod script. * This file is provided as is (no warranties). *** === | To install this plugin just copy the hit_notice.amx in your | AMX Mod Dir. ($game/addons/amx/plugins) and write this line in | your plugins.ini: hit_notice.amx | Then write killan_mode 1 in your server.cfg or | listenserver.cfg === $$$ $ $ Release Notes: $ Version 0.1: $ - First release :) $ Version 0.2: $ - Headshot kills are announced (you killed x with a headshot) $$$ */ #include #pragma tabsize 0 public death_msg() { new id = read_data(1) new vid = read_data(2) if (!id) return PLUGIN_CONTINUE killed1(id,vid) return PLUGIN_CONTINUE } public killed1(id,vid) { new killer_name[32], victim_name[32] get_user_name(id,killer_name,32) get_user_name(vid,victim_name,32) new iHeadshot = read_data(3) if (get_cvar_num("killan_mode") == 1) { if (id != vid) { set_hudmessage(0,255,0, 0.03, 0.76, 0, 0.02, 2.0, 0.01, 0.1, 4) if (iHeadshot) { show_hudmessage(id,"You killed %s with a headshot",victim_name) } else if (!iHeadshot) { show_hudmessage(id,"You killed %s",victim_name) } set_hudmessage(255,255,100, 0.03, 0.76, 0, 0.02, 6.0, 0.01, 0.1, 4) if (iHeadshot) { show_hudmessage(vid, "You were killed by %s with a headshot",killer_name) } else if (!iHeadshot) { show_hudmessage(vid, "You were killed by %s",killer_name) } } if (id == vid) { set_hudmessage(255,0,0, 0.03, 0.76, 0, 0.02, 6.0, 0.01, 0.1, 4) show_hudmessage(id,"Idiot! You killed yourself") client_cmd(id,"spk misc/kenny1") } if (id == 0) { set_hudmessage(255,0,0, 0.03, 0.76, 0, 0.02, 6.0, 0.01, 0.1, 4) show_hudmessage(id,"Idiot! You killed yourself") client_cmd(id,"spk misc/kenny1") } if (get_user_team(id)==get_user_team(vid)) { set_hudmessage(255,0,0, 0.03, 0.76, 0, 0.02, 6.0, 0.01, 0.1, 4) show_hudmessage(id,"Hey!! Hold your fire, you have killed an Teammate!") client_cmd(id,"spk misc/awwcrap2") set_hudmessage(255,100,255, 0.03, 0.76, 0, 0.02, 6.0, 0.01, 0.1, 4) show_hudmessage(vid,"You have been killed by friendly fire!") } } } public plugin_init() { register_plugin("Kill Announce","0.2","Schorsch der alte Krieger (mirchuel@gmx.net)") register_event("DeathMsg","death_msg","a") register_cvar("killan_mode","1") return PLUGIN_CONTINUE }