Thread: Say Sounds
View Single Post
Author Message
Hell Phoenix
Senior Member
Join Date: Jan 2005
Old 06-29-2007 , 13:36   Say Sounds
Reply With Quote #1

Say Sounds
Hell Phoenix
http://www.charliemaurice.com/plugins

This plugin is somewhat a port of the classic SankSounds. Basically, it uses a chat trigger then plays a
sound associated with it. People get a certain "quota" of sounds per map (default is 5). They are warned
at a certain amount (default 3) that they only have so many left. This plugin also allows you to ban
people from the sounds, reset sound quotas for everyone or just one person, and allow only admins to use
certain sounds.

Thanks To:
Ferret for his initial sourcemod plugins. I used a few functions from his plugins as a learning tool.
Teame06 for his help with the string replace function
Bailopan for the pack stream info

Versions:
1.0
* First Public Release!
1.1
* Removed "downloadtable extension" dependency
* Added Insurgency Mod Support
1.2
* Fixed some errors
* Added admin only triggers
* Join/Exit sound added
1.3
* Made join/exit sounds for admins only
* Fixed errors on linux
1.4
* Fixed sound reset bug (thanks to lambdacore for pointing it out)
* Added join/exit and wazza sound files to the download
1.5 September 26, 2007
* Uses EmitSountToClient instead of play (should allow multiple sounds to play at once)
- Note that the path for the file changed because of this...remove the sound/ from your
cfg file...IE. change sound/misc/wazza.wav to misc/wazza.wav
* Clients using "!soundlist" in chat will get a list of triggers in their console
* Added a cvar to control how long between each sound to wait and a message to the user
1.5.5 Oct 9, 2007
* Fixed small memory leak from not closing handle at the end of each map

Todo:
* Multiple sound files for trigger word
* Optimise keyvalues usage
* Save user settings

Cvarlist (default value):
sm_sound_enable 1 Turns Sounds On/Off
sm_sound_warn 3 Number of sounds to warn person at
sm_sound_limit 5 Maximum sounds per person
sm_join_exit 0 Play sounds when someone joins or exits the game
sm_time_between_sounds 4.5 Time between each sound trigger, 0.0 to disable checking

Admin Commands:
sm_sound_ban <user>
sm_sound_unban <user>
sm_sound_reset <all|user>

User Commands:
!sounds - when used in chat turns sounds on/off for that client
!soundlist - when used in chat will print all the trigger words to the console


Make sure "saysounds.cfg" is in your addons/sourcemod/configs/ directory.
Sounds go in your mods "sound" directory (such as sound/misc/filename.wav).

MAKE SURE YOU DOWNLOAD THE NEW CFG FILE! IT HAS THE JOIN AND EXIT SOUND INFO AND THE ADMIN ONLY INFO IN IT!
YOU NEED TO MAKE SOME CHANGES TO YOUR CFG FILE FOR THE NEW VERSION! YOU NEED TO REMOVE THE "SOUND/" PART. IE CHANGE sound/misc/wazza.wav TO misc/wazza.wav (BUT THE FILE GOES IN THE SAME PLACE). DOWNLOAD THE ZIP AND LOOK AT THE EXAMPLE IF YOU ARE CONFUSED!
Attached Files
File Type: sp Get Plugin or Get Source (saysounds.sp - 10949 views - 15.6 KB)
File Type: rar saysounds.rar (45.7 KB, 14113 views)
__________________

Last edited by Hell Phoenix; 10-09-2007 at 10:05.
Hell Phoenix is offline