Raised This Month: $51 Target: $400
 12% 

L4D2 - How to play custom sounds ?


Post New Thread Reply   
 
Thread Tools Display Modes
Yanush
Junior Member
Join Date: Dec 2009
Old 01-04-2010 , 17:05   Re: L4D2 - How to play custom sounds ?
Reply With Quote #11

Quote:
Originally Posted by exvel View Post
It is "sound" in all Valve games.
Ok now I now

So nobody is able to tell me why it is not working?
I dont even ask about "how make it to work" but at least someone can give me a clue what is wrong with that...

There are guys on this forum, who are making plugins so complicated, that this single case is not even a chellange for them to solve.
Yanush is offline
anon666
Member
Join Date: Apr 2009
Location: south east asia
Old 01-05-2010 , 00:20   Re: L4D2 - How to play custom sounds ?
Reply With Quote #12

As a pointer, I am able to use connect/disconnect sounds (for built-in wavs in L4D2 clients sound folder) using Arg!'s Connect Announce plugin, but not the custom ones.
anon666 is offline
Yanush
Junior Member
Join Date: Dec 2009
Old 01-05-2010 , 20:31   Re: L4D2 - How to play custom sounds ?
Reply With Quote #13

Yes, if you have sourcemod 1.1 or higher, you can use sm_play command, to play any sound from the game, but only default sounds from game, its not working with custom sounds.

For example:
sm_play @all ambient\weather\thunderstorm\lightning_strike _4.wav
will play this sound to all players ( you should try this with tank sound, its funny when all the people scream "tank comming" )

But it doesnt work with any other sounds besides default ones.


I tried new method too, installing Karaoke plugin, which is using MOTD method, so no clients downloading sounds - just putting sound on server and external hosting (like own website)...but it doesnt work too

EDIT:

Maybe the format of sound file must be exact this same like the l4d2 wav files?
Yanush is offline
Damizean
SourceMod Donor
Join Date: Mar 2009
Old 01-06-2010 , 06:51   Re: L4D2 - How to play custom sounds ?
Reply With Quote #14

Did you try to play them after doing an snd_rebuildaudiocache?
__________________
Dat annoying guy
Damizean is offline
Send a message via AIM to Damizean Send a message via MSN to Damizean
Yanush
Junior Member
Join Date: Dec 2009
Old 01-06-2010 , 21:49   Re: L4D2 - How to play custom sounds ?
Reply With Quote #15

New idea works partially!

After i put snd_rebuildaudiocache command in my game, now when i try play a sound with sm_play command, it doesnt show "missing file" but "bad sample rate (8000)"

So conclusion after all:
- we need to have sound files on client and server side ( we can do this with sv_pure 1 command on server)
- we need a plugin? or something to make people execute snd_rebuildaudiocache command
- we need to know what exactly format should have the sounds
Yanush is offline
anon666
Member
Join Date: Apr 2009
Location: south east asia
Old 01-10-2010 , 15:56   Re: L4D2 - How to play custom sounds ?
Reply With Quote #16

http://forums.alliedmods.net/showpos...6&postcount=15
anon666 is offline
hjhee
Junior Member
Join Date: May 2017
Location: China
Old 08-19-2017 , 22:51   Re: L4D2 - How to play custom sounds ?
Reply With Quote #17

Quote:
Originally Posted by Yanush View Post
New idea works partially!

After i put snd_rebuildaudiocache command in my game, now when i try play a sound with sm_play command, it doesnt show "missing file" but "bad sample rate (8000)"

So conclusion after all:
- we need to have sound files on client and server side ( we can do this with sv_pure 1 command on server)
- we need a plugin? or something to make people execute snd_rebuildaudiocache command
- we need to know what exactly format should have the sounds
I think the sound file must match the "HL Audio Format", or won't work at all.
So "bad sample rate (8000)" means that you should resample the audio file with 8000Hz, 16-bit sampling rate, mono-channel.
hjhee is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:22.


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