Play Sound
Hello, I need urgent help!
I want to create a code that when a user says like omg it plays the sound omg. Yes I know I must have the sounds in my folder, can someone create a FULL EXAMPLE? |
Re: Play Sound
Code:
|
Re: Play Sound
So just copy that code with every sound emited?
|
Re: Play Sound
Uhh, what? That code of course wont work, you just need to add your sounds and due ether the emitting way or sending the 'spk' command to all the players.
|
Re: Play Sound
So Would this work:
PHP Code:
|
Re: Play Sound
Uhh, nope. You might wanna read up some more on functions and stuff. Plus you didn't change anything..But add "misc/omg2"
Code:
Then it should work, I also think that if the user already has the sound there isn't no need to precache it, only to make it downloadable to the clients. |
Re: Play Sound
This is poorly optimized, here's a slightly better way:
Code:
Also, if you're planning on posting this, don't. It'll get unapproved (given one of the rules being not to post something that plays a sound when someone says something). |
Re: Play Sound
Oh no, I wasn't plan on doing that I was going to use this on a private server. Thank you both of you.
|
Re: Play Sound
as i know this:
emit_sound(id,CHAN_VOICE,"my_sound.wav",1.0,ATTN_NORM,0,PITCH_NORM) will make the sound played to all clients too, and its usefull to play a sound to all clients at once then spk client command |
| All times are GMT -4. The time now is 07:56. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.