Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[ANY] Sound filter (v0.1)


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Sound filter (v0.1)
This plugin loads a list of strings from a configuration file, then prevents any sounds that contain any of those strings in their filename from playing.

Configuration
The configuration is loaded as a KeyValues file from configs/disabledsounds.cfg. It should contain a list of case-insensitive substrings to test for.
As an example, I use this configuration (also attached to the post) on my TF2 jump server to disable soldier/demoman pain sounds and fall damage sounds.
Code:

"Sounds" //substrings
{
    "1"    "soldier_painsevere"
    "2"    "soldier_painsharp"
    "3"    "demoman_painsharp"
    "4"    "demoman_painsevere"
    "5"    "pl_fallpain"
    "6"    "pl_fleshbreak"
}

Convars/Commands
  • sm_soundfilter_enabled: 1 to enable, 0 to disable. Default 1.
  • sm_soundfilter_reload: Reload list of strings from disk.
I have only tested this on TF2, but theoretically it should work on any source mod that supports Sourcemod 1.7 or 1.8.

Attached Files
File Type: sp Get Plugin or Get Source (soundfilter.sp - 2.1 KB)
File Type: cfg disabledsounds.cfg (175 Bytes)
File Type: smx soundfilter.smx (5.2 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...