AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Saysounds (Redux) (https://forums.alliedmods.net/showthread.php?t=253775)

friagram 12-28-2014 10:18

[ANY] Saysounds (Redux)
 
3 Attachment(s)
This is a simple rewrite of saysounds/hybrid edition. I wasn't happy with all of the junk in that plugin that I never used/needed, and the poor performance resulting from it. The sound info library was terrible as well, so I removed it. The server doesn't even need the sound files if you use the client play mode. This is a pretty basic plugin, it loads your sounds and creates menus. Should have most of the same functionality of the old plugin.

I think this will work on any mod, let me know if anything's not working.

Requirements:
Code:

Clientprefs
Cvars:
Code:

sm_saysounds_enable (1) - enable/disable the sound hooks

sm_saysounds_sound_limit (10) - limit for normal players
sm_saysounds_donor_limit (15) - limit for your donators (default reservation, "saysounds_donor" is override flag)
sm_saysounds_admin_limit (0) - limit for your admins (default chat, "saysounds_admin" is override flag)

sm_saysounds_sound_delay (3.0) - delay between sounds for normal players
sm_saysounds_donor_delay (1.5) - delay between sounds for donators
sm_saysounds_admin_delay (0.0) - delay between sounds for admins

sm_saysounds_round (0) - if enabled, sound limits will be reset on each new round

sm_saysounds_sound_sentence (1) - if enabled, sounds will be played if they are contained in a sentence, rather than only at the start
sm_saysounds_block_trigger (0) - if enabled, the chat message will be blocked if it contains a saysound that is played

sm_saysounds_exclude (1) - number of sounds to exclude to prevent repetition
sm_saysounds_exclude_client (1) - If set, clients obey exclude count
sm_saysounds_exclude_donor (1) - If set, donors obey exclude count
sm_saysounds_exclude_admin (0) - If set, admins obey exclude count

sm_saysounds_playingame (0) - play sounds via clientcommand rather than on the server. When set to 0, the server will not precache sounds (but volume is going to be limited to 1.0 or 2.0 magnitude). If set to 1, the server will precache all of the sounds, and volumes under 1.0 will work better.
sm_saysounds_volume (1.0) - default volume to use

Commands:
Code:

sm_sound_ban <target> - ban or unban a player from using saysounds
sm_sound_reset <target> - reset a player's saysound count
sm_soundlist/sm_sounds - open the sound list menu
sm_sounds - toggle saysounds on or off


Config file:
Your old saysounds/hybrid edition config file should be compatible, but there are some changes.
Code:

"Sound Combinations"
{
        "gibus"                                                                // Word trigger for the saysound
        {
                "file"        "poni/jahy-buhs.mp3"        // file path
                "admin" "1"
        }

        "really?" 
        {
                "file"        "poni/misc/crowd1.wav"        // default sound (required)
                "file2"        "poni/misc/crowd2.wav"        // sound 2
                "file3"        "poni/misc/crowd3.wav"        // sound 3
                "file4"        "poni/misc/crowd4.wav"        // sound 4 .. keep adding as many as you want, do not have to specify "count"
        }

        "VGS"
        {
                "file" "poni/vgs/shazbot_m.mp3"
                "volume" "2.0"                                        // emit this sound twice so that it is much louder
        }

        "hax"
        {
                "file"        "vo/npc/male01/hacks01.wav"
                "download" "0"                // do not download this file (default will send the file to players)
        }
}

There are no advertisements, greetings, events, karaoke, or any of that stuff. WYSIWYG.

Players can pick to disable hearing sounds by using the !settings menu.

Changelog:
Code:

1.0 - initial release
1.1 - fixed a bug where players could bypass the sound limit by using the menu (oops)
1.2 - fixed a bug where ban/disable setting was getting initialized incorrectly (oops)
1.3 - fixed a bug where sounds were being emitted to players who disabled sounds. added cvars for managing exclusion based on tier.
1.4 - added sound support for newer games, fixed console say errors.


Randommagic 12-28-2014 18:30

Re: Saysounds (Redux)
 
Great. I'm gotta test it as soon as possible. The previous hybrid version didn't work on my server sometimes. Thanks! :D

friagram 12-28-2014 18:38

Re: Saysounds (Redux)
 
good luck, i fixed some bugs some players noticed on my servers. probably are not many more. Because I forgot to zero out the cookies, players were getting saysound bans randomly, should be fixed in the 1.2 version.. I also changed the cookie so that old players will be unbanned/reset (sorry), along with the menu thing to play infinite sounds :3

Randommagic 12-31-2014 18:32

Re: [ANY] Saysounds (Redux)
 
I think it is working fine, bud it would be great if you add few small things.
First, after a person have used the saysound up to the limit, printing something like "sorry, you have used all of your saysounds!"

Second, telling how much seconds left until you can use another saysound, like "Wait # seconds to use saysound again!"

I think these functions were in the original version :P

friagram 01-01-2015 09:21

Re: [ANY] Saysounds (Redux)
 
It's easy to add a wait notification, but I didn't. Might be useful if your delays are really long, but i just set them to prevent spam. Also, once they run out or are on cooldown, I don't bother to process their text because I already know they have no sounds left. Seems a bit wasteful to process text just to find out if they tried to trigger a word, just to tell them no.

micazoid 01-05-2015 06:02

Re: [ANY] Saysounds (Redux)
 
This might be a cool alternative. I am missing only one Feature, that would make me to choose Ghostys Saysounds over yours:

Downloadlimiter. Ghostys Plugin has a cvar to limit how many soundfiles will be downloaded at one time. This is very handy to reduce the waitingtime for clients or to disable downloading at all for large Custommaps. Please think about such a feature =)

ClassicGuzzi 01-08-2015 18:54

Re: [ANY] Saysounds (Redux)
 
Two little things:
1. Could you use [SM] instead of [sm]? It looks weird :P

2. I use the console say sometimes, and if you write a trigger, the plugin will give some errors regarding 0 being invalid.

If you could ignore the console's trigger it would be good, but if you could let the console trigger sounds like an admin it would be awesome.

DezzY 01-16-2015 15:43

Re: [ANY] Saysounds (Redux)
 
[Sound] S_StartSound(): Failed to load sound 'misc\sks\drum.mp3'. Can't create mixer.

friagram 01-19-2015 08:43

Re: [ANY] Saysounds (Redux)
 
Didn't think about processing sounds as console, i'll look into that.
Can't create mixer is due to csgo iirc. I would have to add in support for emitsoundany or prefix a * to playgamesound. I'll add this in when I have some spare time.

As for downloading the files..
There is no way to know what client has what files. You could cycle packs and use playgamesound or something each map, so that it takes players a few maps to get all the sounds, but it would be random. Wince there is no music or karaoke supported, I figured downloading them all would be OK as they will be small files.

TUSK3N1337 01-19-2015 08:59

Re: [ANY] Saysounds (Redux)
 
Recommended Implements;

https://forums.alliedmods.net/showthread.php?t=237045

https://wiki.alliedmods.net/Csgo_quirks#Workarounds


All times are GMT -4. The time now is 10:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.