Many players do not like distractions Misc. Stats sounds (like Headshot, Multi-Kill, One and only, etc.).
Let's be adding feature for disable this sounds personally for each Player.
miscstats.sma
86 string, after "new g_he_sync" add:
Code: Select all
new no_sounds[33]Code: Select all
register_clcmd("say /no_sounds", "noSounds", 0, "- disable/enable Misc. Stats sounds (Headshot, Multi-Kill, etc.)") Code: Select all
public noSounds(id)
{
if(no_sounds[id] == 1) {
no_sounds[id] = 0
client_cmd(id, "setinfo ^"no_sounds^" ^"^"")
client_print(id, print_chat, "* Misc. Stats Sounds have been enabled (default)")
} else {
no_sounds[id] = 1
client_cmd(id, "setinfo ^"no_sounds^" ^"1^"")
client_print(id, print_chat, "* Misc. Stats Sounds have been disabled")
}
} 243 string, after "g_streakKills[id] = {0, 0}" add:
Code: Select all
new ns[2]
get_user_info(id, "no_sounds", ns, 1)
if (equali(ns, "1")) {
no_sounds[id] = 1
} else {
no_sounds[id] = 0
} 428 string, from:
Code: Select all
client_cmd(g_LastAnnounce, "spk misc/oneandonly")Code: Select all
if (no_sounds[g_LastAnnounce] == 0) {
client_cmd(g_LastAnnounce, "spk misc/oneandonly")
} Code: Select all
client_cmd(killer, "spk misc/headshot")
client_cmd(victim, "spk misc/headshot") Code: Select all
if (no_sounds[killer] == 0) {
client_cmd(killer, "spk misc/headshot")
}
if (no_sounds[victim] == 0) {
client_cmd(victim, "spk misc/headshot")
} Code: Select all
client_cmd(players[i], "spk %s", sound)Code: Select all
if (no_sounds[players[i]] == 0) {
client_cmd(players[i], "spk %s", sound)
} In attachment you can download edited "miscstats.sma" file (AMXX 1.8.2).
