#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Headshot Sounds"
#define VERSION "1.0"
#define AUTHOR "KeXxX"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg", "DeathMsg", "a")
}
public DeathMsg()
{
new hs = read_data(3)
if (hs > 0){
new los = random_num(0, 4)
switch(los){
case 0 : client_cmd(0, "spk new_headshots/head1.wav")
case 1 : client_cmd(0, "spk new_headshots/head2.wav")
case 2 : client_cmd(0, "spk new_headshots/head3.wav")
case 3 : client_cmd(0, "spk new_headshots/head4.wav")
case 4 : client_cmd(0, "spk new_headshots/head5.wav")
}
}else{
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public plugin_precache(){
precache_sound("new_headshots/head1.wav")
precache_sound("new_headshots/head2.wav")
precache_sound("new_headshots/head3.wav")
precache_sound("new_headshots/head4.wav")
precache_sound("new_headshots/head5.wav")
}