Raised This Month: $12 Target: $400
 3% 

[ANY] Saysounds (Redux)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Plugin ID:
4467
Plugin Version:
1.0.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    310 
    Plugin Description:
    Provides sounds on chat trigger
    Old 12-28-2014 , 10:18   [ANY] Saysounds (Redux)
    Reply With Quote #1

    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.
    Attached Files
    File Type: cfg saysounds.cfg (701 Bytes, 2742 views)
    File Type: sp Get Plugin or Get Source (saysounds.sp - 2834 views - 22.5 KB)
    File Type: sp Get Plugin or Get Source (saysounds_1.4.sp - 3669 views - 22.9 KB)
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 01-19-2015 at 09:17.
    friagram is offline
    Randommagic
    Senior Member
    Join Date: Jun 2014
    Location: -
    Old 12-28-2014 , 18:30   Re: Saysounds (Redux)
    Reply With Quote #2

    Great. I'm gotta test it as soon as possible. The previous hybrid version didn't work on my server sometimes. Thanks!
    __________________
    Randommagic is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 12-28-2014 , 18:38   Re: Saysounds (Redux)
    Reply With Quote #3

    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
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 12-28-2014 at 18:39.
    friagram is offline
    Randommagic
    Senior Member
    Join Date: Jun 2014
    Location: -
    Old 12-31-2014 , 18:32   Re: [ANY] Saysounds (Redux)
    Reply With Quote #4

    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
    __________________
    Randommagic is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 01-01-2015 , 09:21   Re: [ANY] Saysounds (Redux)
    Reply With Quote #5

    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.
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 01-01-2015 at 09:22.
    friagram is offline
    micazoid
    Veteran Member
    Join Date: Oct 2010
    Location: Munich - Germany
    Old 01-05-2015 , 06:02   Re: [ANY] Saysounds (Redux)
    Reply With Quote #6

    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 =)
    __________________
    micazoid is offline
    ClassicGuzzi
    Veteran Member
    Join Date: Oct 2013
    Location: Argentina
    Old 01-08-2015 , 18:54   Re: [ANY] Saysounds (Redux)
    Reply With Quote #7

    Two little things:
    1. Could you use [SM] instead of [sm]? It looks weird

    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.
    ClassicGuzzi is offline
    DezzY
    SourceMod Donor
    Join Date: Apr 2012
    Location: Portugal
    Old 01-16-2015 , 15:43   Re: [ANY] Saysounds (Redux)
    Reply With Quote #8

    [Sound] S_StartSound(): Failed to load sound 'misc\sks\drum.mp3'. Can't create mixer.
    __________________
    DezzY is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 01-19-2015 , 08:43   Re: [ANY] Saysounds (Redux)
    Reply With Quote #9

    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.
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 01-19-2015 at 08:46.
    friagram is offline
    TUSK3N1337
    SourceMod Donor
    Join Date: Dec 2013
    Location: Sweden
    Old 01-19-2015 , 08:59   Re: [ANY] Saysounds (Redux)
    Reply With Quote #10

    Recommended Implements;

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

    https://wiki.alliedmods.net/Csgo_quirks#Workarounds
    __________________
    TUSK3N1337 is offline
    Send a message via Skype™ to TUSK3N1337
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 05:08.


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