Raised This Month: $32 Target: $400
 8% 

Chat Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff        Approver:   twistedeuphoria (82)
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 02-17-2005 , 11:22   Chat Sounds
Reply With Quote #1

I've coded a li'l plugin that will play a sound file upon user chat. See this example:

A server administrator puts a lot of sounds onto the server and gives all users a link where they can download the sound package. Now we need a mechanism to make the clients play these sounds. That's what my plugin is for.
The Plugin basically looks into the specified SERVER directory and tries to find a file whose name fits to the text the user said. If such a file is found, it is played to all players. If not, nothing happens. If a client doesn't have this specific sound file, he will be the only one to not hear anything.

There are two CVars to be set:
amx_csnd_dir: determines the directory where to look for the sounds. Default is "misc".
amx_csnd_hide: hides the said alias if a sound file was found. defaults to 0.

the player only has to give the name of the wav file. For Example, if you want to play "sound/misc/test.wav", you will have to "say /test". The rest is done by the script if amx_csnd_dir was set correctly. If you "say test", nothing will happen. This is to prevent unwanted sound playing during normal chat.


BTW: I do not owe credits to anybody because I had the idea today in school and coding for this one hasn't been too hard actually, so I didn't need to look anywhere.
Attached Files
File Type: sma Get Plugin or Get Source (chatsound.sma - 7105 views - 1.7 KB)
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
beezkneez
Member
Join Date: May 2005
Old 10-23-2005 , 17:41  
Reply With Quote #2

I LOVE IT :-D
__________________
beezkneez is offline
Send a message via AIM to beezkneez
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 10-23-2005 , 19:53  
Reply With Quote #3

so do I but obviously mods who can approve don't... I know there's as many of such plugins out there as sand at the beach, but mine is the simplest of 'em all...

Greetz MGee
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
Da Meat
Junior Member
Join Date: Jun 2005
Old 10-25-2005 , 00:52  
Reply With Quote #4

do people have to download all the sounds that u put in the music file?

nvm lol
Quote:
If such a file is found, it is played to all players. If not, nothing happens. If a client doesn't have this specific sound file, he will be the only one to not hear anything.
but one questions, what if nobody has the sound, then what? sounds kinda booty if nobody can download it

just a thought :/
Da Meat is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 10-25-2005 , 03:33  
Reply With Quote #5

that would be your own fault if there's a plugin like this:
http://forums.alliedmods.net/showthread.php?t=612

Greetz MGee
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
Da Meat
Junior Member
Join Date: Jun 2005
Old 10-26-2005 , 23:32  
Reply With Quote #6

what do u mean
Da Meat is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 10-27-2005 , 07:10  
Reply With Quote #7

use the above plugin to make users download the sounds, and mine to actually play them.

Greetz MGee
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
sirdrinkalot
Junior Member
Join Date: Feb 2006
Location: Fantasy world of CS
Old 03-16-2006 , 09:46   Any chance
Reply With Quote #8

That the sounds can be turned on and off?

Spamming's driving me nuts.
sirdrinkalot is offline
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 03-16-2006 , 10:44  
Reply With Quote #9

the only way to do that is to pause the plugin; there's no cvar or something to do it.

Greetz MGee
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee
Waylay
Member
Join Date: Feb 2006
Old 03-16-2006 , 12:44  
Reply With Quote #10

er..where do you download it?:/
Waylay is offline
Send a message via MSN to Waylay
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 18:36.


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