AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Sound replacements V. 1.2 (https://forums.alliedmods.net/showthread.php?t=93746)

Silencer123 06-01-2009 19:26

Sound replacements V. 1.2
 
2 Attachment(s)
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:
Code:

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.


Thanks to...
joaquimandrade ,
ConnorMcLeod ,
arkshine and
fysiks
...for some and much help on the way.


Enjoy.

joaquimandrade 06-01-2009 19:52

Re: Sound replacements
 
Thanks for remembering me in the thanks list :twisted:

For further improve your plugin, you can switch to dynamic arrays that make you able to do not force constraints on the size of the list of sounds to replace and use tries to speed up the string search on your sound forwards.

Hugs.

ConnorMcLeod 06-02-2009 01:00

Re: Sound replacements
 
I think it does the same thing as this http://forums.alliedmods.net/showthread.php?p=514507
Am i wrong ?

Silencer123 06-02-2009 07:16

Re: Sound replacements
 
Oh, yes for the sound part. It also has some more optimization I see. Did not find it because I searched for sound replacement in the plugins list. They really need tags. Just searching by thread title is a bit insufficient imho.

@ joaquimandrade : I wanted to make it dynamic, but it "must be a constant expression".
Appears dynamic arrays are only possible within a function in small for whatever reason.
That plugin Connor mentioned uses a special module "vdf" which handles this.

joaquimandrade 06-02-2009 08:50

Re: Sound replacements
 
Dynamic arrays are not the pawn normal arrays. Check the file "cellarray.inc" in your amxmodx installation, in the include folder.

Silencer123 06-02-2009 09:56

Re: Sound replacements V. 1.1
 
Oh I see. It says they are slower, though. :p
Well, this plugin works and that shall be sufficient.
For anyone who wants more funcitonality there is the Content replacement plugin.

xbatista 06-02-2009 10:29

Re: Sound replacements V. 1.1
 
Quote:

It won't work for client side sound effects.
So it can't replace weapon shot sounds?

And explode3.wav it is server side ? :D lol

Silencer123 06-02-2009 15:28

Re: Sound replacements V. 1.1
 
weapons/explode3.wav is the new sound. Of course you can use sounds from sound effects which are client side as replacement, but not vice versa. You grab the common sense?

xbatista 06-02-2009 15:34

Re: Sound replacements V. 1.1
 
yes :]

urban_ninja 06-04-2009 02:22

Re: Sound replacements V. 1.1
 
in the sma it said #include <fakemeta_stocks>

is fakemeta_stocks a module? i cant find it any where. if so can someone send me a link?

i get this after typing amx_help in console
Code:

Sound replacement  1.1        Silencer          sr.amxx          error


All times are GMT -4. The time now is 13:03.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.