[EDITED] Misc. Stats — disable/enable sounds for each Player
Posted: Mon Sep 28, 2026 12:12 pm
Hello. It's very simple, but userful mini tutorial.
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:
180 string, after "register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")" add:
In empty place (like 204 string) add this function:
^ Here you can use Misc. Stats Language file for adding this two "print_chat" messages (better).
243 string, after "g_streakKills[id] = {0, 0}" add:
Almost done. Add if/else checks for client_cmd() with "spk" commands.
428 string, from:
To:
495 string, from:
To:
776 string, from:
To:
Done! Players can use "/no_sounds" switch say-command for disable/enable Misc. Stats sounds.
In attachment you can download edited "miscstats.sma" file (AMXX 1.8.2).
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).