#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Headshot Sounds"
#define VERSION "1.0"
#define AUTHOR "Keep"
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 cannabis_headshot_sounds/headshot1.wav")
case 1 : client_cmd(0, "spk cannabis_headshot_sounds/headshot2.wav")
case 2 : client_cmd(0, "spk cannabis_headshot_sounds/headshot3.wav")
case 3 : client_cmd(0, "spk cannabis_headshot_sounds/headshot4.wav")
case 4 : client_cmd(0, "spk cannabis_headshot_sounds/headshot5.wav")
}
}else{
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public plugin_precache(){
precache_sound("cannabis_headshot_sounds/headshot1.wav")
precache_sound("cannabis_headshot_sounds/headshot2.wav")
precache_sound("cannabis_headshot_sounds/headshot3.wav")
precache_sound("cannabis_headshot_sounds/headshot4.wav")
precache_sound("cannabis_headshot_sounds/headshot5.wav")
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs16 \n\\ par }
*/