Raised This Month: $ Target: $400
 0% 

[Help]Replaceing Sounds Temporarily


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blunted1
Senior Member
Join Date: Jun 2004
Old 07-15-2004 , 19:46   [Help]Replaceing Sounds Temporarily
Reply With Quote #1

Basically what I need done is temporarily replaceing all the knife sounds with different sounds for a certain player only (not everyone) and for a temporary time only (so that knife sounds can be reset to normal without restarting).
This could very well be 'unpossible', but it better not be

In essence I basically need a function full of these statements except they do not work:
Code:
   if (emit_sound(id,CHAN_WEAPON, "weapons/knife_hit1.wav", 0.5, ATTN_NORM, 0, PITCH_NORM)){     emit_sound(id,CHAN_WEAPON, "NewSound/New_Sound.wav", 0.5, ATTN_NORM, 0, PITCH_NORM)    }

So I guess I am probably after a function that doesnt exist like:
Code:
   if (sound_playing(id,CHAN_WEAPON, "weapons/knife_hit1.wav", 0.5, ATTN_NORM, 0, PITCH_NORM)){     emit_sound(id,CHAN_WEAPON, "NewSound/New_Sound.wav", 0.5, ATTN_NORM, 0, PITCH_NORM)    }

But if anyone does know some way to catch all of the knife sounds as they happen and replace them with different sounds for a certain ID for a given amount of time or any other way of doing this, then please let me know
Blunted1 is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 07-16-2004 , 05:08  
Reply With Quote #2

AMXX 0.20 and its new wonderful DLL API is probably the way to go. :-)
Johnny got his gun is offline
Blunted1
Senior Member
Join Date: Jun 2004
Old 07-16-2004 , 15:50  
Reply With Quote #3

Quote:
Originally Posted by Johnny got his gun
AMXX 0.20 and its new wonderful DLL API is probably the way to go. :-)
Hello, hello..... long time no see..... somehow I knew it would be you that answered my question.
It had to be someone with alot of experience, but somehow out of those who weild that knowledge I just knew it would be you


I have two more questions for you JGHG (if you ever return to read this that is )
1. Why does everyone keep suggesting AMXx 0.20 as the answer to a problem.... when it doesnt exist!
Then again, if you feel like err.... giveing it to me somehow
2. Can you somehow help me find an alternate solution to what I want to do? Simply emiting a sound when a knife hits something and a different sound when it doesnt would be a decent step towards what I am trying to accomplish.... little help?
Blunted1 is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 07-16-2004 , 15:53  
Reply With Quote #4

The best thing to do, like JGHG indirectly said, would be making a metamod plugin (amxx module).
There are two engineapi functions you can catch: EmitSound and EmitAmbientSound.
__________________
hello, i am pm
PM is offline
Blunted1
Senior Member
Join Date: Jun 2004
Old 07-16-2004 , 16:03  
Reply With Quote #5

Quote:
Originally Posted by PM
The best thing to do, like JGHG indirectly said, would be making a metamod plugin (amxx module).
There are two engineapi functions you can catch: EmitSound and EmitAmbientSound.
Yeah I got that
but I dont want to have to wait until AMXx 0.20, and I dont have a clue how to make my own module..... again, little help?

I am sure there must be a way to check if a player is attacking with a knife and again if he actually hits something and play one of two sounds accordingly..... or am I wrong again?
Blunted1 is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 07-16-2004 , 16:07  
Reply With Quote #6

Well 0.20 is in the CVS. But the feature you're asking for isn't. I just played around with stuff as usual today and yes it is possible to catch the sound emited when a player swings his knife (actually there seems to be two different standard sounds for this), also when it hits a wall so I guess, no, I KNOW that what you are asking for is possible. It's possible with 0.16 too but takes more work, this stuff is just easier with 0.20... if you ask me. Though it will also require a new module. Expect to see a lot of new modules coming out for AMXX 0.20.
However not all sounds are played using emit_sound, for instance I couldn't find any ammofiring weapon that used it, dunno really what causes those sounds. The only reload sound that uses emit_sound was the XM shotgun. Don't ask me why, you can hear people reload most weapons. Dunno if I ever need to alter all those sounds anyway...

Speaking of sounds, for 0.20 I already made a plugin that lets you replace sounds in maps with whatever waves you have. I put the super mario tune instead of opera in cs_italy. It's already a hit :-)
Johnny got his gun 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 14:40.


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