Thread
:
Chat Sounds
View Single Post
Plugin Info:
Modification:
Category:
Approver:
twistedeuphoria (82)
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
02-17-2005 , 11:22 Chat Sounds
#
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
Get Plugin
or
Get Source
(chatsound.sma - 7104 views - 1.7 KB)
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee
View Public Profile
Send a private message to MistaGee
Visit MistaGee's homepage!
Find More Posts by MistaGee