Thread: Chat Sounds

Results 1 to 12 of 12
  1. #1
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    440

    Chat Sounds

    Description: If the first word typed to the in-game chat matches a key of a g_SoundList entry, the sound will be played with a medium radius around the players origin (just like the medic call). I think this is more cool and less annoying than alike amxx plugins who play the sound for everyone everywhere. In g_SpriteName you can set a sprite which appears for 2sec over the players head when he is playing a sound. To prevent spamming g_Delay is the time in ms a player has to wait becore he can play a new sound. Custom sounds do work and are downloaded+precached by the client on connect. Don't overdo it lol.

    Console commands: .listsounds (dumps all available triggers to console)

    Add to: svencoop/default_plugins.txt
    Code:
            "plugin"
            {
                    "name" "ChatSounds"
                    "script" "ChatSounds"
            }
    Add to: svencoop_addon/scripts/plugins/ChatSounds.txt (example file. syntax: trigger path/in/sound/folder/file.mp3)
    Code:
    hello scientist/hello.wav
    move hgrunt/move!.wav
    yay cards/yay.ogg
    yees scientist/yees.wav
    Download & Save as: svencoop_addon/scripts/plugins/ChatSounds.as
    Last edited by nico; 13-11-2016 at 09:04 AM. Reason: added default_plugins.txt

  2. #2
    Been playing since 2000, Joined the threads late, Still killin and having fun even. Better late than never. Darkassassin198's Avatar
    Join Date
    Nov 2010
    Location
    In a HEV suit
    Posts
    311

    Re: Chat Sounds

    So this plays the sound around the player but not to everyone, is the code all we need or....no?
    Did you know...if you touch a wall you run faster?

    now try it with crates.


  3. #3
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    440

    Re: Chat Sounds

    Quote Originally Posted by Darkassassin198 View Post
    So this plays the sound around the player but not to everyone, is the code all we need or....no?
    It plays to everyone in a specific range of the player triggering the sound. If you want everyone regardless of where they are on the map to hear it, change ATTN_NORM to, I think, ATTN_NONE.

  4. #4
    Been playing since 2000, Joined the threads late, Still killin and having fun even. Better late than never. Darkassassin198's Avatar
    Join Date
    Nov 2010
    Location
    In a HEV suit
    Posts
    311

    Re: Chat Sounds

    Quote Originally Posted by nico View Post
    It plays to everyone in a specific range of the player triggering the sound. If you want everyone regardless of where they are on the map to hear it, change ATTN_NORM to, I think, ATTN_NONE.
    Uh I was just asking if the code was all we needed, that was kinda it.
    Did you know...if you touch a wall you run faster?

    now try it with crates.


  5. #5
    Registered User Joce's Avatar
    Join Date
    Feb 2016
    Location
    Paris
    Posts
    96

    Re: Chat Sounds

    Hi.

    Is there a way to hide the message in chat ? I want to play the sound, but without displaying to other players the key command in chat.
    I believe that something must be deleted/edited in the script.


    EDIT: Thanks to KernCore for his help. Just put:

    pParams.ShouldHide = true;
    between:

    CBasePlayer@ pPlayer = pParams.GetPlayer();
    string sid = g_EngineFuncs.GetPlayerAuthId(pPlayer.edict());
    Last edited by Joce; 29-09-2016 at 02:17 PM. Reason: Found the way to do it

  6. #6
    Registered User Szettral's Avatar
    Join Date
    Apr 2018
    Posts
    7

    Re: Chat Sounds

    I cannot get this plugin to work. The sounds go into this directory right?

    Server\svencoop_addon\sound\
    I used the example file but not even those sounds work.

    .listsounds brings up this for me

    Code:
    AVAILABLE SOUND TRIGGERS
    ------------------------
    Unknown command: .listsounds

  7. #7
    Registered User Joce's Avatar
    Join Date
    Feb 2016
    Location
    Paris
    Posts
    96

    Re: Chat Sounds

    Quote Originally Posted by Szettral View Post
    I cannot get this plugin to work. The sounds go into this directory right?



    I used the example file but not even those sounds work.

    .listsounds brings up this for me

    Code:
    AVAILABLE SOUND TRIGGERS
    ------------------------
    Unknown command: .listsounds
    It depends where are listed your sounds from ChatSounds.txt. Here is an example of my ChatSounds.txt:


    Code:
    monsterkill sandwich/monsterkill.ogg
    
    movebody sandwich/movebody.ogg
    
    doh sandwich/dohh.ogg
    Meaning they are in the "sound/sandwich" folder.

  8. #8
    Server Owner Enrory's Avatar
    Join Date
    Dec 2016
    Location
    Austria
    Posts
    110

    Re: Chat Sounds

    Have someone a good software to convert mp3 to ogg file for this plugin? I test it but is always too high or too low sound volume.

  9. #9
    incognico nico's Avatar
    Join Date
    Aug 2015
    Posts
    440

    Re: Chat Sounds

    Quote Originally Posted by Enrory View Post
    Have someone a good software to convert mp3 to ogg file for this plugin? I test it but is always too high or too low sound volume.
    ffmpeg, it can also change the volume

  10. #10
    Registered User
    Join Date
    Sep 2018
    Posts
    5

    Re: Chat Sounds

    RE: Could you solve the error and listen to the sounds?

  11. #11
    Registered User Szettral's Avatar
    Join Date
    Apr 2018
    Posts
    7

    Re: Chat Sounds

    Quote Originally Posted by Lisandro View Post
    RE: Could you solve the error and listen to the sounds?

    No I gave up. Got tired of trying to get it to work on fresh installs.

    There has to be some kind of discrepancy to where the plugins files go.
    This plugin simply won't work for me.

  12. #12
    Registered User
    Join Date
    Sep 2018
    Posts
    5

    Re: Chat Sounds

    Ok Szettral
    The same happens to me,It does not work for me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •