Thread: Chat Sounds

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

    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
    445

    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
    101

    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
    8

    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
    101

    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
    124

    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
    445

    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
    8

    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.

  13. #13
    Server Owner Enrory's Avatar
    Join Date
    Dec 2016
    Location
    Austria
    Posts
    124

    Re: Chat Sounds

    for all other they have error message with .listsound.

    dont set a space in soundfoldername or some special icons. and load the sounds not in svencoop_addons or svencoop_downloads
    save in svencoop folder. that fixed it for me

  14. #14
    Registered User
    Join Date
    Feb 2017
    Posts
    22

    Re: Chat Sounds

    Here is the Fix for .listsound.
    ChatSounds.txt come to scripts/plugins/cfg/ChatSounds.txt

    and it works.

    Greet Painkiller
    Last edited by Painkiller; 06-03-2019 at 10:50 AM.

  15. #15
    Registered User Nova Diablox's Avatar
    Join Date
    Apr 2019
    Posts
    2

    Re: Chat Sounds

    Guys I'm having a really strange problem.First I've done everything perfectly.When I open a map (example hl_01_a1).Door sounds are random.If I broke some glass a random sound effect plays.,The default sound is not playing.Basically It changes map sound file completely.

  16. #16
    Server Owner Enrory's Avatar
    Join Date
    Dec 2016
    Location
    Austria
    Posts
    124

    Re: Chat Sounds

    In serverfolder svencoop/maps/soundcache delet all files. Check fast dl too.
    Mapchange and done

  17. #17
    Registered User Nova Diablox's Avatar
    Join Date
    Apr 2019
    Posts
    2

    Re: Chat Sounds

    My soundcache folder is empty and I'm running this on a server.

  18. #18
    Server Onwer deludank's Avatar
    Join Date
    Jul 2019
    Location
    Brazil
    Posts
    1

    Re: Chat Sounds

    just works with .wav?, or my files can be .ogg, or .mp3?

  19. #19
    200 MB Angelscript log file KernCore's Avatar
    Join Date
    Apr 2016
    Location
    Brazil
    Posts
    269

    Re: Chat Sounds

    Quote Originally Posted by deludank View Post
    just works with .wav?, or my files can be .ogg, or .mp3?
    anything that works with FMOD will work here (.ogg, .wav, .mp3...)

Posting Permissions

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