Description:Use chat triggers to play sounds associated to it.
Players can turn the playback of say sounds on/off and it will be stored for the future
Play Join sounds for all players and/or a specific player identified by his Steam-ID
Play action sounds for actions like uber, kill, flag captured etc.
Karaoke support.
Sourcecode is also on GitHub
Requirements:Sound Info Library Extension
Installation:*.smx -> addons/sourcemod/plugins
saysoundhe.phrases.txt -> addons/sourcemod/translations
saysounds.cfg -> addons/sourcemod/configs
Sounds go in your mods "sound" directory (such as sound/misc/filename.wav)
If you run a "pure" server make sure you add the folder contining your sounds to the whitelist.
http://developer.valvesoftware.com/wiki/Pure_Servers 4.0.0 Notes
This version now requires the Sound Info Library Extension (included in the .zip)
More infos on what is new or changed can be found here.
Karaoke Scripts can be found @ http://smkaraoke.the009.net/
Thanks To:Hell Phoenix for his initial plugin.
Ferret for being an inspiration to Hell Phoenix. He 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.
Naris and FernFerret for adding so many nice features.
LAMDACORE, Uberman, Woody, psychonic and edgecom.
berni for his Sound Info Library Extension Translators:Russian: Xiloid Changelog:
Code:
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
1.6 Dec 28, 2007
* Modified by -=|JFH|=-Naris
* Added soundmenu (Menu of sounds to play)
* Added adminsounds (Menu of admin-only sounds for admins to play)
* Added adminsounds menu to SourceMod's admin menu
* Added sm_specific_join_exit (Join/Exit for specific STEAM IDs)
* Fixed join/exit sounds not playing by adding call to KvRewind()
before KvJumpToKey().
* Fixed non-admins playing admin sounds by checking for generic admin bits.
* Used SourceMod's MANPLAYERS instead of recreating another MAX_PLAYERS constant.
* Added globalLastSound which is set to duration of last sound played
to reduce possibility of overlapping sounds.
* Fix the sounds go away bug
* Moved close of listfile from mapchange to Load_Sounds (if handle is valid)
1.7 Jan 10, 2008
* Modified by -=|JFH|=-Naris
* Added separate admin sound_limit and time_between_sounds convars.
* Changed multiple sound to check the "file" key if "file1" is not found.
1.8 Jan 11, 2008
* Modified by -=|JFH|=-Naris
* Fixed timer errors
1.9 Jan 18, 2008
* Modified by -=|JFH|=-Naris
* Added Sound Duration setting in config file
* Various fixes
1.10 Jan 22, 2008
* Modified by -=|JFH|=-Naris
* Added more comprehensive error checking
* Changed !soundlist to call Sound_Menu() instead of List_Sounds().
1.11 Feb 03, 2008
* Modified by -=|JFH|=-Naris
* Added separate sm_sound_admin_warn convar.
* Added unlimited sounds when limit == 0.
1.12 Feb 03, 2008
* Modified by -=|JFH|=-Naris
* Fixed message that limit was passed when unlimited
* Fixed grammar in warning.
1.13 Feb 06, 2008
* Modified by -=|JFH|=-Naris
* Fix bug in unlimited sounds.
* Added logging.
1.14 Feb 13, 2008
* Modified by -=|JFH|=-Naris
* Added logging of unnamed (join/exit) sounds.
1.15 Feb 14, 2008
* Modified by -=|JFH|=-Naris
* Added LAMDACORE's change to increase memory to allow lots of sounds
* Added LAMDACORE's change to allow keyword to be embedded in a sentence.
* Added sm_sound_sentence to enable the above modification.
1.16 Feb 18, 2008
* Modified by -=|JFH|=-Naris
* Added check for Fake clients (bots) before Emitting Sounds
or sending Chat messages.
1.17 Mar 1, 2008
* Modified by -=|JFH|=-Naris
* Fixed crash in Counter-Strike (Windows) by NOT calling GetSoundDuration()
unless the SDKVersion >= 30 (Version or Orangebox/TF2)
1.18 Mar 2, 2008
* Modified by -=|JFH|=-Naris
* Also added check to not call GetSoundDuration() for mp3 files.
* Added sm_sound_logging to turn logging of sounds played on and off.
* Added sm_sound_allow_bots to allow bots to trigger sounds.
1.19 Mar 2, 2008
* Modified by -=|JFH|=-Naris
* Removed sm_sound_allow_bots to allow bots to trigger sounds.
* Removed several checks for Fake Clients.
* Commented out code that calls GetSoundDuration()
1.19.1 Dec 10, 2008
* Modified by Woody
* Added volume setting cvar sm_saysounds_volume
* Added individual sound volume override with cfg file key "volume"
1.20 Mar 16, 2008
* Modified by -=|JFH|=-Naris
* Added AutoExecConfig()
* Removed code that calls GetSoundDuration().
2.0 March 15, 2008
* Modified by [RiCK] Stokes aka. FernFerret
* Made version 2.0 due to massive functionallity change
* Changed Plugin name from Saysounds, to Saysoundshybrid
* Changed Reference from saysounds.cfg to saysoundshybrid.cfg
* Added ability to create sounds from actions in TF2 :) (Currently only 3 supported(Flag Events, Kill Events,
- Medic Uber Event) more to be added later
* Added ability to hide soundmenu from non admins (sm_sound_showmenu)
* Added menu for admins to show ALL sounds admin and public (sm_all_sounds)
* Added above two items to admin menu under "Server Commands"
* Added a few new types of data that you can add in config file including "actiononly" which will allow
- SSH(SaySoundsHybrid) to play the sound, aka clients will download it, but they can't play it
- Other types are covered in the demo section of this file
* Changed the Sound_Menu function: Added AllSounds parameter
* Updated Credits
2.0.1 March 15, 2008
* Modified by [RiCK] Stokes aka. FernFerret
* Fixed Error about hiding the sound menu
* Updated to Core Version 1.17 - Fixed the crash on windows servers due to the getsoundduration
* Added Spy disguising event(boolean) when a spy goes to disguise, triggers a true, opposite when he goes undisguised
2.0.2 March 15, 2008
* Modified by [RiCK] Stokes aka. FernFerret
* Updated to Core Version 1.19 - The Following fixes were ported in:
1.18 Mar 2, 2008
* Modified by -=|JFH|=-Naris
* Also added check to not call GetSoundDuration() for mp3 files.
* Added sm_sound_logging to turn logging of sounds played on and off.
* Added sm_sound_allow_bots to allow bots to trigger sounds.
1.19 Mar 2, 2008
* Modified by -=|JFH|=-Naris
* Removed sm_sound_allow_bots to allow bots to trigger sounds.
* Removed several checks for Fake Clients.
* Commented out code that calls GetSoundDuration()
* Added event "build" Support
2.0.3 Mar 16, 2008
* Modified by -=|JFH|=-Naris
* Merged the last few saysounds changes with saysounds hybrid.
2.0.4 Jun 13, 2008
* Modified by -=|JFH|=-Naris
* Checks the GameType() before hooking TF2 events.
2.0.5 Aug 20, 2008
* Modified by Uberman
* Adds the chat "!stop" command to stop any currently playing sound
2.0.6 Oct 30, 2008
* Modified by gH0sTy
* Added usage of clientprefs extension (SM 1.1 only)
* If a client turns the playback of sounds on/off it will be stored in the clientprefs sqlite database
* The next time the client connects, the plugin will retrieve the saved value so clients that don't want
to play sounds doesn't have to turn it off after every reconnect or mapchange
* Added sm_play_cl_snd_off to restrict players with sounds turned off from playing sounds
3.0.0 Jun 15, 2008
* Modified by -=|JFH|=-Naris
* Added Karaoke mode.
3.0.5 Sep 30, 2008
* Merged Uberman !stop command into 3.0.0 by Naris
3.0.6 Oct 30, 2008
* Merged gH0sTy clientprefs code (to save user settings) into 3.0.0 by Naris
3.0.7 Jan 04, 2009
* Modified by gH0sTy
* fixed Anti-Soundspam Issue, (epic fail :P)
* Changed Version Cvar from "sm_saysounds_version" to "sm_saysounds_hybrid_version" so this plugin can be approved without the need to unapprove the original one
3.0.8 Jan 05, 2009
* Modified by gH0sTy
* fixed Anti-Soundspam Issue - Added the Function again that reads the duration from the saysounds.cfg; Added a check if the sound is a Karaoke sound (new bool:iskaraoke)
* NOTE: Haven't tested if Karaoke still works but it should
3.0.9 Jan 14, 2009
* Fixed broken duration that broke anti-spam, iskaraoke no longer required.
* Merged/Ported Woody's volume code (1.19.1) into 3.0.6 by Naris
* Added volume setting cvar sm_saysounds_volume
* Added individual sound volume override with cfg file key "volume"
3.1.0 Jan 15, 2009
* Modified by gH0sTy
* Fixed broken anti-spam
3.1.1 Feb 20, 2009
* Modified by W]M[D FernFerret
* Added following actions:
* hit_by_train
* drowned
* backstab
* crit_kill
*
* Use these in your config the same as you would uber
* Special thanks to BigPimpNick(psychonic) and Octo, for parts of this code
3.1.2 Feb 26, 2009
* Modified by -=|JFH|=-Naris
* Don't precache sounds until they are played
* Incorporated gametype.inc into this source
3.1.3 Feb 27, 2009
* Modified by psychonic
* TF2 kill parameter names now use same weapon name as in game log (should clear up some confusion and fix some deflect_ kills not working)
* Added headshot support for css, dods, and tf2 (action "kill", param "headshot")
* Backstab is now (action "kill" param "backstab") to keep consistency
* Fixed some cases where plugin was going through extra logic (was continuing kill logic after finding sound to play (like for headshot, train, etc.)
* Fixed looking through tf2 logic for all games instead of just tf2
* Fixed potential issue with leaving out "param" for some special events
3.1.4 Apr 13, 2009
* Modified by gH0sTy
* Added IsValidClient function and replaced all IsClientInGame & !IsFakeClient with it
* Changed all cvar names to sm_saysoundhe* to have them listed beneath each other for a cvarlist output and make it easier to recognize them as a Say Sounds related cvar
* Added an "adult" param, if it's specified in saysounds.cfg it will, hide this sound from the sound menu, block the chat output for this trigger, announces the played sound as ADULT SOUND
* Added a "delay" param, if it's specified in saysounds.cfg it will delay the sound by x seconds (max delay 60 seconds)
* Added the possibility to reset the clients played sound count at round end (sm_saysoundhe_limit_sound_per_round)
* Support for playing sound for the round_start event (action "roundstart" param "roundstart")
* Added the possibility to restrict clients form playing a sound that was recently played (sm_saysoundhe_excl_last_sound)
* Added the possibility to hide the chat output for a sound trigger word (sm_saysoundhe_block_trigger)
* Colored Chat output
3.1.5 Apr 30, 2009
* Modified by gH0sTy
* Added a listfile == INVALID_HANDLE check for runSoundEvent
* Moved CheckJoin from OnClientAuthorized to OnClientPostAdminCheck as CheckJoin is done to early and listfile == INVALID_HANDLE (at least on my ZPS server)
* Added TF event for waiting_begins/ends (action "setupstart", "setupend" param "setupstart", "setupend")
and suddendeath_begin/end (action "suddendeathstart", "suddendeathend" param "suddendeathstart", "suddendeathend")
3.1.6 Jun 08, 2009
* Modified by edgecom
* Added support for TF2's new unlockable weapons
(huntsman , sniper rifle, back stab and ambassador)
3.1.7 Jun 15, 2009
* Modified by psychonic
* Fixed headshot and backstab actions in TF2
* Added "fall" action for TF2
* Added suicide action for all games
3.1.8 Jun 16, 2009
* Modified by gH0sTy
* Fixed suddendeath event
* Fixed Setup end event, there's no setup start event so "setupstart" is not available anymore
* Added delay support for event sounds
3.1.9 Jun 25, 2009
* Modified by psychoinc
* Fixed translation error "Native "ReplyToCommand" reported: Language phrase "No matching client" not found"
3.2.0 November 14, 2009
* Modified by gH0sTy
* Added round_start event for CS:S so the sound limit for players can be reset each round
* Fixed some join sound bugs:
* A join sound doesn't count to a players sound quota any more
* A join sound doesn't affect the anti sound spam function
3.2.1 April 30, 2010
* Modified by Naris
* Added ResourceManage to limit number of downloads per map
3.2.2 May 02, 2010
* Modified by gH0sTy
* Added Support for translations
3.2.3 May 03, 2010
* Modified by gH0sTy
* Fixed JoinSound where it was only played if the join spawn cvar was set to 1
* New cvar sm_saysoundhe_adult_announce to disable the announcement of played adult sounds
* Join sounds won't trigger the recently played function
* Additional translations + colouring
3.2.4 May 03, 2010
* Modified by gH0sTy
* Karaoke sounds won't trigger the recently played function
3.2.5 August 28, 2010
* Modified by gH0sTy
* Added Cookie Menu Support (!settings); Thx @ Miraculix
* Added round_end event for CSS; Thx @ grepplz
* Added possibility to play event sounds to: attacker, victim, both, ateam, vteam
* Support for random event sounds
* Fixed clients sound settings
*** changes by Miraculix ***
* Added: new CVAR: possibility to interrupt the current sound when a new start
* Added: new CVAR: possibility alive players do not hear sounds triggered by dead players
* Changed: players are banned permanently ('til unban)
* Changed: also dead players can be banned
3.2.6 March 16, 2011
* Modified by gH0sTy
* Added: possibility to display a text message for a sound
* Changed: Joinsounds won't play again after a map change
4.0.0 July 17, 2011
* Modified by gH0sTy
* Added: More settings for the client, Enable/Disable Karaoke, chat messages, action souds, say sounds
* Added: Menu for client settings !sounds will now display a menu to the client
* Added: Sound Info Library Extension by berni (required now), duration of a soundfile will be automatically detected now
Sampling Rate will also be detected and logs to Path_SM/logs/saysounds_error.log if it's above 44100 Hz
* Added: Round End support for TF2 and DoD
* Added: Translation phrases for the client menu
* Changed: Removed case sensitivity for "action", "param" and playto
* Changed: "action" now reflect the corresponding event so some have changed
4.0.1 July 22, 2011
* Modified by gH0sTy
* Added: Clients sound limits will now be restored on reconnect
* Changed: Setting the *_time_between_* cvars to 0 will now allow to play another sound while one is still playing
* Changed: Setting sm_saysoundhe_time_between_admin_sounds to -1 will completely bypass the anti soundspam protection for admins
4.0.2 July 27, 2011
* Modified by gH0sTy
* Fixed: Now using the databases.cfg settings to access the clientprefs DB
4.0.3 August 28, 2011
* Modified by gH0sTy
* Fixed: (TF2) playing round won/lost sounds at the same time to both teams
4.0.4 March 03, 2012
** Modified by Naris
* Updated: the ResourceManager derived functions (SetupSound() & PrepareSound()) to implement a cap to the number of different sounds
played per map and added a convar (sm_saysoundhe_sound_max) to set that limit.
* Added: additional properties for sounds that can be set in the config file:
enable, when set to 0 disables the sound -- defaults to 1
title, if defined, used as the title of the sound in menus -- defaults to "" (uses the name of the sound as the title).
* Changed: Clients sound counts are stored in tries instead of a seperate sqlite DB
** Modified by gH0sTy
* Changed: Using SetAuthIdCookie intreduced in SM 1.4 to store the greeted cookie so we don't need to create a manual connection to the clienprefs DB
* Changed: Using Command Listeners instead of registering a console command for the "say" command and removed the need of a seperate Command_InsurgencySay
4.0.5 March 18, 2012
* Modified by gH0sTy
* Added: Play a sound if a mapvote starts/ends
action "mapvote"
param "start" or "end"
* Added: TF2: Play a sound if Waiting for Players round starts/ends
action "wait4players"
param "start" or "end"
4.0.6 October 07, 2012
* Modified by gH0sTy
* Changed: using tf2stocks for TF2 custom kills
* Changed: moved a few functions into seperate files
* Updated: translations
* Added: Support for CS:GO
* Added: Support for client flags
* param "flags" can be added to a sound so only clients with this flag will have access to this sound
* new cvars
- sm_saysoundhe_sound_flags //User flags that will result in unlimited sounds
- sm_saysoundhe_time_between_flags //User flags to bypass the Time between sounds check
- sm_saysoundhe_flags //Flag(s) that will have a seperate sound limit
- sm_saysoundhe_flags_limit //Maximum sounds per person with the corresponding flag (0 for unlimited)
- sm_saysoundhe_stop_flags //User flags that are allowed to stop a sound
- sm_saysoundhe_confmenu_flags //User flags that are allowed to access the configuration menu
4.0.7 June 01, 2013
* Modified by gH0sTy
* Fix for built in game sounds
4.0.8 June 17, 2013
* Modified by gH0sTy
* Another fix for built in game sounds
CVAR list: (default)If you load the plugin the first time, a config file (sm_saysounds.cfg) will be generated in the cfg/sourcemod folder.- sm_saysoundhe_enable (1) Turns Sounds On/Off
- sm_saysoundhe_sound_warn (3) Number of sounds to warn person at (0 for no warnings)
- sm_saysoundhe_sound_limit (5) Maximum sounds per person (0 for unlimited)
- sm_saysoundhe_join_exit (0) Play sounds when someone joins or exits the game
- sm_saysoundhe_join_spawn (1) Wait until the player spawns before playing the join sound
- sm_saysoundhe_specific_join_exit (1) Play sounds when specific steam ID joins or exits the game
- sm_saysoundhe_time_between_sounds (4.5) Time between each sound trigger, 0.0 to disable checking
- sm_saysoundhe_time_between_admin_sounds (4.5) Time between each admin sound trigger, 0.0 to disable checking
- sm_saysoundhe_sound_admin_warn (0) Number of sounds to warn admin at (0 for no warnings)
- sm_saysoundhe_sound_admin_limit (0) Maximum sounds per admin (0 for unlimited)
- sm_saysoundhe_sound_announce (0) Turns on announcements when a sound is played
- sm_saysoundhe_sound_sentence (0) When set, will trigger sounds if keyword is embedded in a sentence
- sm_saysoundhe_sound_logging (1) When set, will log sounds that are played
- sm_saysoundhe_play_cl_snd_off (0) When set, allows clients that have turned their sounds off to trigger sounds (0=off | 1=on)
- sm_saysoundhe_karaoke_delay (15.0) Delay before playing a Karaoke song
- sm_saysoundhe_showmenu (1) 1 To show menu to users, 0 to hide menu from users (admins excluded)
- sm_saysoundhe_saysounds_volume (1.0) Global/Default Volume setting for Say Sounds (0.0 <= x <= 1.0)
- sm_saysoundhe_block_trigger (0) If set, block the sound trigger to be displayed in the chat window
- sm_saysoundhe_excl_last_sound (0) If set, don't allow to play a sound that was recently played
- sm_saysoundhe_limit_sound_per_round (0) If set, sm_saysoundhe_sound_limit is the limit per round instead of per map
- sm_saysoundhe_download_threshold (-1) Number of sounds to download per map start (-1=unlimited)
- sm_saysoundhe_adult_announce (0) Announce played adult sounds? | 0 = off 1 = on
- sm_saysoundhe_interrupt_sound (0) If set, interrupt the current sound when a new start
- sm_saysoundhe_filter_if_dead (0) If set, alive players do not hear sounds triggered by dead players
- sm_saysoundhe_track_disconnects(1) If set, stores sound counts when clients leave and loads them when they join.
- sm_saysoundhe_sound_flags //User flags that will result in unlimited sounds NEW since 4.0.6
- sm_saysoundhe_time_between_flags //User flags to bypass the Time between sounds checkNEW since 4.0.6
- sm_saysoundhe_flags //Flag(s) that will have a seperate sound limitNEW since 4.0.6
- sm_saysoundhe_flags_limit //Maximum sounds per person with the corresponding flag (0 for unlimited) NEW since 4.0.6
- sm_saysoundhe_stop_flags //User flags that are allowed to stop a sound NEW since 4.0.6
- sm_saysoundhe_confmenu_flags //User flags that are allowed to access the configuration menuNEW since 4.0.6
Admin commands: [ chat trigger]- sm_all_sounds [!allsounds / allsounds] Display a menu of ALL sounds to play
- sm_sound_ban <user> : Bans a player from using sounds
- sm_sound_unban <user> : Unbans a player from using sound
- sm_sound_reset <user | all> : Resets sound quota for user, or everyone if all
- sm_admin_sounds [!adminsounds / adminsounds] Display a menu of Admin sounds to play
- sm_karaoke [!karaoke / karaoke] Display a menu of Karaoke songs to play
User commands:- !sounds / sounds Display a settings manu
- !soundlist / soundlist Display a menu of sounds to play
- !stop Stop the actually played sound
Configuring Sounds:Make sure "saysounds.cfg" is in your addons/sourcemod/configs/ directory.
File Format:
Code:
// ##################################################################################################
// ############################## Saysounds example config ##########################################
// ##################################################################################################
// # Soundfiles have to be placed relative to your game/mod "sound" folder. #
// # Example: cstrike/sound/mysound.mp3 or dod/sound/myfolder/mysound.mp3 #
// # "file" "mysound.mp3" or "file" "myfolder/mysound.mp3" #
// # If you run a pure server (sv_pure = 1) you should create an extra folder for your sounds #
// # so you don't have to whitelist your whole "sound" folder. #
// # Whitelisting is done in the "pure_server_whitelist.txt" file located in the "hl2" folder. #
// # Example: sound\myfolder\... allow_from_disk #
// # Don't forget to change the map after you've added something to your pure_server_whitelist.txt #
// # For more infos on pure servers visit http://developer.valvesoftware.com/wiki/Pure_Servers #
// ##################################################################################################
"Sound Combinations"
{
// #### Join/Exit Sounds ####
"JoinSound" // Sound to play when a player Joins the server
{
"file" "misc/welcome.wav"
"admin" "0"
"text" "blablabla" // Message to display if s client joins the server
"single" "1" // 1 to play sound to single client only, 0 to play to all (default is 1)
"volume" "0.5" // Specify volume for this specific sound
}
"ExitSound"
{
"file" "misc/welcome.wav"
"admin" "0"
"etext" "blablabla" // Message to display if a client leaves the server
"single" "1" // 1 to play sound to single client only, 0 to play to all (default is 0)
"volume" "0.5" // Specify volume for this specific sound
}
"STEAM_0:x:xxxxxx" // trigger for specific STEAM ID
{
"file" "misc/myhouse.mp3" // name of sound to play when joining
"exit" "misc/goodbye.mp3" // name of sound to play when leaving
"text" "blablabla" // Message to display if this client joins the server
"etext" "blablabla" // Message to display if this client leaves the server
"admin" "0"
"volume" "0.5" // Specify volume for this specific sound
}
// #### Say Sounds ####
"doh" // Minimum configuration for sounds
{
"file" "misc/doh.wav" // This will set all other options to default values
}
"wazza" // Word trigger
{
"file" "misc/wazza.wav" //"file" is always there, next is the filepath (always starts with "sound/")
"admin" "1" //1 is admin only, 0 is anyone (defaults is 0)
"delay" "5" // will delay the sound by 5 seconds (max delay 60 seconds)
"adult" "1" //will announce the sound as ADULT SOUND, hide it from the sounds menu, block the chat output (defaults is 0)
"text" "blablabla" // Message to display for this sound
"download" "1" //1 to download the sounds, 0 to not download (default is 1)
"flags" "ao" // only clients with either the "a" or the "o" flag will be able to play that sound
}
"lol" // Word trigger to randomly select 1 of multiple sounds
{
"file" "misc/lol1.wav" // name of the 1st option, can also be "file1"
"file2" "misc/lol2.wav" // name of the 2nd option
"file3" "misc/lol3.wav"
"file4" "misc/lol4.wav"
"count" "4" // number of sounds (default is 1)
"volume" "0.5" // Specify volume for this specific sound
}
// #### KARAOKE ####
"somesong" // Word trigger for Karaoke
{
"file" "misc/somesong.wav"
"karaoke" "somesong.cfg" // name of config file for karaoke lyrics
}
// ####FernFerret####
// ####Action Sounds####
// New Section showing how to use Action Sounds Extention
// New Parameters:
// - actiononly If this variable is set to 1, the sound cannot be
// played by a menu or a client typing
// - action If the action filled in here is performed, the sound will play
// - param The best way to think of param is "Play Sound if [ACTION] with [PARAM]"
// * Some examples are Flag events**, or weapons***
// - prob The probability of a sound playing, if you want a sound to play 20% of the time
// * the fill in prob as ".2" or the percentage divided by 100
// - playto Play kill events to clients/teams
// * attacker - plays the sound to the attacker
// * victim - plays the sound to the victim
// * both - plays the sound to the attacker and the victim
// * ateam - plays the sound to the attacker team
// * vteam - plays the sound to the victim team
// - Some examples:
//
"rocket" //This example plays a random sound to the victim if he gets killed with a TF2 rocket launcher.
{
"file" "misc/saysound/rocket1.mp3"
"file2" "misc/saysound/rocket2.mp3"
"file3" "misc/saysound/rocket3.mp3"
"count" "3"
"admin" "1"
"actiononly" "1"
"action" "kill"
"param" "tf_projectile_rocket"
"playto" "victim"
}
"invincible"
{
"file" "admin_plugin/invincible.wav"
"admin" "1"
"actiononly" "1"
"action" "uber"
// Note: If the action is uber, you do not need param
// Prob is assumed 1 or 100% if nothing is provied
}
"lightmyfire"
{
"file" "admin_plugin/lmf.wav"
"admin" "1"
"actiononly" "1"
"action" "kill"
"param" "flamethrower"
"prob" ".05"
}
}
Play kill events to clients/teams with a new "playto" key (see the "rocket" example above)
Values for the "playto" key are: - attacker - plays the sound to the attacker
- victim - plays the sound to the victim
- both - plays the sound to the attacker and the victim
- ateam - plays the sound to the attacker team
- vteam - plays the sound to the victim team
Supported Events
- TF2 Build Event
"action" "build"
"param" see list
Code:
obj_dispenser
obj_tele_in
obj_tele_out
obj_sentry
obj_dispenser
- TF2 Flag Event
"action" "flag"
"param" see list
Code:
flag_picked_up
flag_captured (default)
flag_defended
flag_dropped
- TF2 Uber Charge Event
"action" "uber"
"param" "uber"
- TF2 Kill Events
"action" "kill"
"param" "hit_by_train"
"action" "kill"
"param" "drowned"
"action" "kill"
"param" "backstab"
"action" "kill"
"param" "crit_kill"
"action" "kill"
"param" "fall"
"action" "kill"
"param" "headshot"
- TF2 Round Events
"action" "round"
"param" "stalemate"
"param" "suddendeath"
"param" "won"
"param" "lost"
- TF2 Waiting for Players
"action" "wait4players"
"param" "start"
"param" "end"
- Special CS:S Events
"action" "kill"
"param" "headshot"
- DOD:S Kill Events
"action" "kill"
"param" "headshot"
- DOD:S Round Events
"action" "round"
"param" "USWon"
"param" "GERWon"
- Kill event:
"action" "kill"
"param" see weapons list
Code:
tf: ambassador
tf: amputator
tf: atomizer
tf: axtinguisher
tf: backburner
tf: back_scratcher
tf: ball
tf: bat
tf: battleaxe
tf: battleneedle
tf: bazaar_bargain
tf: big_earner
tf: blackbox
tf: bleed_kill
tf: blutsauger
tf: bonesaw
tf: boston_basher
tf: bottle
tf: brass_beast
tf: bushwacka
tf: candy_cane
tf: claidheamohmor
tf: club
tf: cow_mangler
tf: crusaders_crossbow
tf: deflect_arrow
tf: deflect_flare
tf: deflect_promode
tf: deflect_rocket
tf: deflect_sticky
tf: degreaser
tf: demokatana
tf: demoshield
tf: detonator
tf: disciplinary_action
tf: enforcer
tf: eternal_reward
tf: eviction_notice
tf: family_business
tf: fireaxe
tf: fists
tf: flamethrower
tf: flaregun
tf: force_a_nature
tf: frontier_justice
tf: fryingpan
tf: gloves
tf: gloves_running_urgently
tf: headtaker
tf: holy_mackerel
tf: iron_curtain
tf: knife
tf: kunai
tf: letranger
tf: liberty_launcher
tf: loch_n_load
tf: mailbox
tf: mantreads
tf: market_gardener
tf: maxgun
tf: minigun
tf: natascha
tf: nessieclub
tf: obj_minisentry
tf: obj_sentrygun
tf: obj_sentrygun2
tf: obj_sentrygun3
tf: paintrain
tf: persian_persuader
tf: pistol
tf: pistol_scout
tf: powerjack
tf: proto_syringe
tf: reserve_shooter
tf: revolver
tf: righteous_bison
tf: robot_arm
tf: robot_arm_blender_kill
tf: robot_arm_combo_kill
tf: rocketlauncher_directhit
tf: samrevolver
tf: sandman
tf: saxxy
tf: scattergun
tf: scout_sword
tf: shahanshah
tf: short_stop
tf: shotgun_hwg
tf: shotgun_primary
tf: shotgun_pyro
tf: shotgun_soldier
tf: shovel
tf: sledgehammer
tf: smg
tf: sniperrifle
tf: soda_popper
tf: solemn_vow
tf: southern_hospitality
tf: splendid_screen
tf: steel_fists
tf: sticky_resistance
tf: sword
tf: sydney_sleeper
tf: syringegun_medic
tf: taunt_demoman
tf: taunt_guitar_kill
tf: taunt_heavy
tf: taunt_medic
tf: taunt_pyro
tf: taunt_scout
tf: taunt_sniper
tf: taunt_soldier
tf: taunt_soldier_lumbricus
tf: taunt_spy
tf: telefrag
tf: tf_projectile_arrow
tf: tf_projectile_arrow_fire
tf: tf_projectile_energy_ball
tf: tf_projectile_pipe
tf: tf_projectile_pipe_remote
tf: tf_projectile_rocket
tf: tf_pumpkin_bomb
tf: the_maul
tf: the_winger
tf: tomislav
tf: tribalkukri
tf: ubersaw
tf: ullapool_caber
tf: ullapool_caber_explosion
tf: unique_pickaxe
tf: warfan
tf: warrior_spirit
tf: world
tf: wrangler_kill
tf: wrench
tf: wrench_golden
tf: wrench_jag
csp: knife
csp: usp
csp: glock
csp: deagle
csp: mp5navy
csp: m4a1
csp: ak47
csp: awp
csp: hegrenade
csp: famas
csp: galil
css: knife
css: usp
css: glock
css: deagle
css: p228
css: m3
css: xm1014
css: mp5navy
css: tmp
css: p90
css: m4a1
css: ak47
css: sg552
css: scout
css: awp
css: g3sg1
css: m249
css: hegrenade
css: flashbang
css: elite
css: aug
css: mac10
css: fiveseven
css: ump45
css: sg550
css: famas
css: galil
css: smokegrenade_projectile
css: PROP_PHYSICS
hl2mp: env_explosion
hl2mp: player
hl2mp: physbox
hl2mp: physics
hl2mp: crowbar
hl2mp: stunstick
hl2mp: pistol
hl2mp: 357
hl2mp: smg1
hl2mp: smg1_grenade
hl2mp: ar2
hl2mp: combine_ball
hl2mp: shotgun
hl2mp: crossbow_bolt
hl2mp: rpg_missile
hl2mp: grenade_frag
hl2mp: slam
hl2mp: physcannon
hl2ctf: stunstick
hl2ctf: Crowbar
hl2ctf: crossbow_bolt
hl2ctf: Slam
hl2ctf: Pistol
hl2ctf: grenade_frag
hl2ctf: combine_ball
hl2ctf: physcannon
hl2ctf: Shotgun
hl2ctf: 357
hl2ctf: rpg_missile
hl2ctf: ar2
hl2ctf: smg1
hl2ctf: env_explosion
hl2ctf: ctf_combine_turret
hl2ctf: ctf_rebel_turret
hl2ctf: ctf_oicw
hl2ctf: ctf_sniper
hl2ctf: grenade_ctf_oicw_airburst
hl2ctf: ctf_alyxgun
hl2ctf: smg1_grenade
dods: k98
dods: mp40
dods: k98_scoped
dods: mp44
dods: colt
dods: riflegren_us
dods: thompson
dods: spring
dods: bar
dods: frag_us
dods: m1carbine
dods: 30cal
dods: frag_ger
dods: spade
dods: amerknife
dods: bazooka
dods: pschreck
dods: riflegren_ger
dods: garand
dods: p38
dods: c96
dods: punch
dods: mg42
dods: smoke_ger
dods: smoke_us
dods: dod_bomb_target
insmod: weapon_makarov
insmod: weapon_m9
insmod: world
insmod: weapon_sks
insmod: weapon_m1014
insmod: weapon_toz
insmod: weapon_svd
insmod: weapon_rpk
insmod: weapon_m249
insmod: weapon_m16m203
insmod: weapon_l42a1
insmod: weapon_m4med
insmod: weapon_m4
insmod: weapon_m16a4
insmod: weapon_m14
insmod: weapon_fnfal
insmod: weapon_aks74u
insmod: weapon_ak47
ff: weapon_railgun
ff: weapon_tranq
ff: weapon_medkit
ff: weapon_spanner
ff: weapon_crowbar
ff: weapon_shotgun
ff: grenade_napalm
ff: weapon_ic
ff: grenade_nail
ff: weapon_supershotgun
ff: weapon_supernailgun
ff: weapon_sniperrifle
ff: weapon_rpg
ff: weapon_pipelauncher
ff: weapon_knife
ff: weapon_grenadelauncher
ff: weapon_flamethrower
ff: Dispenser
ff: weapon_autorifle
ff: weapon_assaultcannon
ff: SentryGun
ff: grenade_normal
ff: grenade_mirv
ff: grenade_emp
ff: DETPACK
ff: weapon_umbrella
ff: grenade_gas
ff: weapon_tommygun
ff: weapon_nailgun
ff: backstab
zps: arms
zps: carrierarms
zps: ak47
zps: mp5
zps: revolver
zps: glock
zps: glock18c
zps: ppk
zps: usp
zps: 870
zps: supershorty
zps: grenade_frag
zps: sledgehammer
zps: crowbar
zps: chair
zps: keyboard
zps: plank
zps: shovel
zps: golf
zps: machete
zps: fryingpan
zps: spanner
zps: axe
zps: tireiron
zps: hammer
zps: pot
zps: world
zps: physics
zps: torque
zps: winchester
zps: bat_aluminum
zps: bat_wood
zps: m4
zps: pipe
zps: slam
aoc: Flamberge
aoc: Longsword
aoc: Glaive
aoc: Dual Daggers
aoc: Flamberge & Kite Shield
aoc: world
aoc: chivalry
aoc: Shortsword
aoc: Warhammer
aoc: Mace
aoc: Mace & Buckler
aoc: Broadsword & Evil Shield
aoc: Crossbow
aoc: Longbow
aoc: Longsword & Kite Shield
aoc: Broadsword & Good Shield
aoc: Hatchet
aoc: Double Axe
aoc: Flail & Evil Shield
aoc: Flail & Good Shield
aoc: Javelin
aoc: Spear & Buckler
aoc: Dagger
aoc: Broadsword
aoc: Throwing Knife
aoc: Spiked Mace
aoc: Spiked Mace & Buckler
aoc: Halberd
aoc: Oil Pot
aoc: Fists
aoc: Throwing Axe
cstrike: knife
cstrike: usp
cstrike: glock18
cstrike: deagle
cstrike: p228
cstrike: m3
cstrike: xm1014
cstrike: mp5navy
cstrike: tmp
cstrike: p90
cstrike: m4a1
cstrike: ak47
cstrike: sg552
cstrike: scout
cstrike: awp
cstrike: g3sg1
cstrike: m249
cstrike: grenade
cstrike: elite
cstrike: aug
cstrike: mac10
cstrike: fiveseven
cstrike: ump45
cstrike: sg550
cstrike: famas
cstrike: galil
dod: k43
dod: luger
dod: kar
dod: mp40
dod: scopedkar
dod: mp44
dod: colt
dod: garand
dod: thompson
dod: spring
dod: bar
dod: grenade
dod: enf_bayonet
dod: bren
dod: m1carbine
dod: greasegun
dod: 30cal
dod: mg42
dod: grenade2
dod: spade
dod: gerknife
dod: fg42
dod: world
dod: amerknife
dod: bayonet
dod: mg34
dod: brit_knife
dod: mortar
dod: fcarbine
dod: scoped_fg42
dod: bazooka
dod: enfield
dod: garandbutt
dod: mills_bomb
dod: piat
dod: pschreck
dod: scoped_enfield
dod: sten
dod: webley
ns: welder
ns: item_mine
ns: handgrenade
ns: grenade
ns: knife
ns: pistol
ns: machinegun
ns: shotgun
ns: heavymachinegun
ns: turret
ns: siegeturret
ns: resourcetower
ns: team_turretfactor
ns: team_advturretfactor
ns: acidrocket
ns: bitegun
ns: charge
ns: claws
ns: divinewind
ns: leap
ns: bite2gun
ns: spitgunspit
ns: sporegunprojectile
ns: swipe
ns: healingspray
ns: parasite
ns: devour
ns: offensechamber
fof: deringer
fof: carbine
fof: coltnavy
fof: bow
fof: arrow
fof: sharps
fof: coachgun
fof: peacemaker
fof: knife
fof: physics
fof: thrown_axe
fof: arrow_fiery
fof: thrown_knife
fof: dualnavy
fof: dynamite
fof: explosive_arrow
fof: fists
fof: axe
fof: dualpeacemaker
fof: henryrifle
fof: shotgun
bg2: brownbess
bg2: brownbess_bayonet
bg2: charleville
bg2: charleville_bayonet
bg2: hirschf
bg2: jaeger
bg2: knife
bg2: pennsylvania
bg2: pistol_a
bg2: pistol_b
bg2: sabre_a
bg2: sabre_b
sgtls: p90-90 Red Dot / FN-H P-90RD', 1),
sgtls: pistol-s', 1),
sgtls: knife
sgtls: staff_blast
sgtls: p90D
sgtls: hdevice
sgtls: tac_pulse
sgtls: tac_projectile
sgtls: c4_charge
sgtls: grenade_projectile
sgtls: g36
sgtls: kull_blast
sgtls: suicide_bomb
sgtls: kullblaster
sgtls: staff
sgtls: zat_blast
sgtls: awp
sgtls: grenade
sgtls: zat
sgtls: tac
dystopia: Light Katana
dystopia: Medium Katana
dystopia: Fatman Fist
dystopia: Machine Pistol
dystopia: Shotgun
dystopia: Laser Rifle
dystopia: BoltGun
dystopia: SmartLock Pistols
dystopia: Assault Rifle
dystopia: Grenade Launcher
dystopia: MK-808 Rifle
dystopia: Tesla Rifle
dystopia: Rocket Launcher
dystopia: Minigun
dystopia: Ion Cannon
dystopia: Basilisk
dystopia: Frag Grenade
dystopia: EMP Grenade
dystopia: Spider Grenade
dystopia: Cortex Bomb
dystopia: Leg Boosters
dystopia: Trap
dystopia: Turret
nts: aa13
nts: grenade_projectile
nts: jitte
nts: jittescoped
nts: knife
nts: kyla
nts: m41
nts: m41s
nts: milso
nts: mpn
nts: mx
nts: mx_silenced
nts: pz
nts: grenade_detapack
nts: srm
nts: srm_s
nts: srs
nts: supa7
nts: tachi
nts: zr68c
nts: zr68l
nts: zr68s
pvkii: zerking
pvkii: slidingdoor
pvkii: seaxshield
pvkii: longbow
pvkii: chest
pvkii: parrot
pvkii: rocks
pvkii: bigaxe
pvkii: gatecrush
pvkii: cutlass
pvkii: twoaxe
pvkii: spear
pvkii: freeze
pvkii: plfall
pvkii: steam
pvkii: vulture
pvkii: shuriken
pvkii: huscshieldbash
pvkii: spike
pvkii: blunderbuss
pvkii: punch_cpt
pvkii: crossbow
pvkii: env_explosion
pvkii: flintlock
pvkii: throwaxe
pvkii: powderkeg
pvkii: physics
pvkii: boulder
pvkii: drowned
pvkii: barrel
pvkii: axesword
pvkii: cutlass2
pvkii: flames
pvkii: vikingshield
pvkii: thrownkeg
pvkii: archersword
pvkii: player
pvkii: worldspawn
pvkii: twosword
pvkii: hook
pvkii: hkshieldbash
pvkii: javelin
pvkii: swordshield
pvkii: crusher
- General Events
"action" "kill"
"param" "suicide"
- Round Start Event
"action" "round"
"param" "roundstart"
- Mapvote
"action" "mapvote"
"param" "start"
"param" "end"
Karaoke
You can add additional .cfg files that contain the text of the lyrics to be displayed while the song is playing (you can even have different lines for different teams).
You then add a "karaoke" entry to list the name of the .cfg file for the lyrics:
Code:
"Sound Combinations"
{
"somesong" // Word trigger for Karaoke
{
"file" "misc/somesong.wav"
"karaoke" "somesong.cfg" // name of config file for karaoke lyrics
}
}
The Karaoke config files have to be placed under addons/sourcemod/configs
They are formatted like this:
Code:
"Some Song Karaoke" // Whatever
{
"1"
{
"time" "0:0" // time offset for 1st line
"text" "1st line"
}
"2"
{
"time" "0:5" // time offset for 2nd line
"text" "2nd line for spectators"
"text1" "2nd line for first (Red/T/Allies) team"
"text2" "2nd line for second (Blue/CT/Axis) team"
}
"3"
{
"time" "0:10/ time offset for 3rd line
"text" "3rd line"
}
}
Get Plugin will not work as it requires an additional file to compile!
If you prefer the old 3.2.6 version you can get it here
The Zip file contains all required files.
Last edited by gH0sTy; 06-17-2013 at 23:54.
Reason: 4.0.8 - Another fix for built in game sounds
|