Home » Say Sounds (including Hybrid Edition) (4.0.8)

Say Sounds (including Hybrid Edition) (4.0.8)

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

Quote:
The latest Windows version of the Sound Library extension requires the Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) to be installed on the server.
So if the extension won’t load either install the Visual C++ Redistributable Package or use the previous version of the extension which doesn’t have that dependency.

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/

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”

    • 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.

Files

Leave a Reply

Your email address will not be published. Required fields are marked *