Page 1 of 1

Sound replacements V. 1.2

Posted: Mon Nov 22, 2021 5:17 pm
by greenie
Sound replacements

This is a simple plugin for replacing networked sounds.
It won't work for client side sound effects.

By default, have an sr.cfg in addons/amxmodx/configs,
in which every line covers the path to the sound file to
replace, then a space, and then the path to the sound
file to use as replacement.

Example:
weapons/cbar_hit1.wav weapons/explode3.wav
Supported modifications are all, except Sven Co-op 3.0
and 4.0, because they have too massive changes to HL's
sound engine.

This also automatically prevents the replaced sounds from precaching.
The support feature for modifications with an altered HL sound engine
or a completely different sound engine has been designed for Sven
Co-op, but ultimately fails its purpose in that mod. Maybe it works for
other modifications I don't know of yet.


Version history:
V. 1.2:
More optimizations.
More security checks.
More flexibility with the replacement file.
V. 1.1:
Some optimization for faster code.
V. 1.0:
Initial release.

plugin
source