[L4D1/2] Vocalize Fatigue 2
2 Attachment(s)
This plugin is now deprecated. Check out Scene Processor for an updated plugin.
Vocalize Fatigue 2 About: Wow, long time ago I did Vocalize Fatigue huh? Anyway, here is the updated version I have been working on this past week. Description: Adds fatigue to the vocalize command. Commands: sm_vocgag - Vocalize gag a player. Admin flag B (General) required. Cvars: A configuration file will be automatically created upon first run, in /cfg/sourcemod/ called vocalizefatigue.cfg Changelog: Previous downloads: Version 2.0.0: Release: 22 - Source: 31 This plugin is now deprecated. Check out Scene Processor for an updated plugin. |
[L4D1/2] Vocalize Fatigue 2: Plugins & FAQ
Plugins that uses Vocalize Fatigue:
FAQ: Q: Whats the difference on the old Vocalize Fatigue and this new one? A: First of all, the old Vocalize Fatigue was my first plugin I wrote in SourcePawn. Since then I have learned a bunch of new stuff and got some better code comment manners (Looking at the old script, oh dear...). Secondly, besides this being a complete overhaul of the old script, this one will be support and I plan to add more stuff to it as I see fit. It also now supports fatigue time depending on the vocalization! Q: I noticed there is not any blacklist cvar anymore. How do I blacklist vocalize commands now? A: This have been moved to a filter file. The location of this file is "/addons/sourcemod/configs/vocalizefatigue/blacklist.cfg". In this file you simple write in the vocalize command you want to block and set filter mode to blacklist. Q: Filter mode? Whats that? A: Its simply the filter mode cvar. If 0 the blacklist filter file will be used, if 1 then the whitelist filter file will be used. Q: Where is the repeat and spam limits? No limit anymore? A: There is still a limit. However its now different for each vocalize command. This can be changed in the fatigue config file. Default locaiton: "/addons/sourcemod/configs/vocalizefatigue/fatigue.cfg". For example a player vocalize PlayerLaugth. In the fatigue config file, this adds a fatigue of 10 seconds. That means for 10 seconds the player is unable to vocalize again. Q: Whitelisting, is this possible? A: Yes. Like blacklist, you will have to set the filter mode cvar to whitelist and then you can change the whitelist config file in: "/addons/sourcemod/configs/vocalizefatigue/whitelist.cfg". Q: Do you offer any API, natives or forwards for other plugins to use? A: Yes, see post 3. Q: Where can I find vocalize commands? / Is there a list of vocalize strings? A: A good list can be found on the Steam forums. I'm pretty sure there are many lists out there. Google! |
[L4D1/2] Vocalize Fatigue 2
How to use filter config files:
Vocalize Fatigue supports two filter modes; blacklist or whitelist. With blacklist, all vocalizations that are defined in the blacklist filter file, will be blocked from usage while all other vocalizations are allowed. Whitelist of course works the other way around, all vocalizations defined in whitelist will be allowed while anything else will be blocked. Using those files you can control exactly what vocalizations are allowed on your server. How to use the filter files is quite simple. Each line in the file represents a vocalize string. So for example in the blacklist you would have this: Code:
// Comments starts with two forward slashes Then you just change the filter mode cvar to choose which one you want active. I personally recommend the whitelist mode. How to use fatigue config file: Instead of the old Vocalize Fatigue where it would simply capture the vocalize command and block if the player called it too often, in this version we add fatigue to the player after using a vocalization. In other words after a player have vocalized, he will suffer from fatigue from that vocalization. For example, lets say the vocalization PlayerLaugh have a fatigue of 10 seconds. After a player have vocalize PlayerLaugh they would be unable to vocalize for another 10 seconds. Each vocalization have it's own fatigue (if not default fatigue will be applied). To add vocalize fatigue to a vocalization you simply type the vocalize string, add a semicolon and then how many seconds. As from the example above, here is how it would look in the fatigue config file: Code:
PlayerLaugh:10.0 You can use 1.0, 0.67 or 3842.399 seconds. It's really up to you how much fatigue you want to apply. I have already included the fatigue config file and added fatigue for vocalizations as I deemed fitting, but don't be afraid of poke around and change them. Natives and Forwards (as of version 2.1.0) So with version 2.1.0 Vocalize Fatigue offers natives and forwards for other plugins to use. The include file is both in the release and source package. However just for good manner here is the list. Include file: PHP Code:
In this post I will show off 3 example scripts. Remember these are example, so don't use them for your server. They are for playing with, not for a real server environment. Anyway. Example Plugin 1: I feel funny... This plugin makes the Survivor laugh for a bit after having eating pills. Seems those pills come with a side effect. You can't stop laughing for some reason. PHP Code:
Next time make sure to read the description before eat ALL of the pills in the bottle! Example plugin 2: Death to deathscreamers! I'm sure you hate death screaming as much as I do. So why not make the death scream a truly scream of death? PHP Code:
Enjoy your flight. Example plugin 3: Vocalize chat triggers This simply hooks chat and make the Survivors vocalize what the client typed in chat. PHP Code:
Feel free to suggest changes or other natives if you happen to need it ;3 |
Re: [L4D2] Vocalize Fatigue 2
Good job, getting a few errors however.
L 02/20/2011 - 00:21:29: SourceMod error session started L 02/20/2011 - 00:21:29: Info (map "c1m1_hotel") (file "errors_20110220.log") L 02/20/2011 - 00:21:29: [SM] Plugin encountered error 11: Invalid memory access L 02/20/2011 - 00:21:29: [SM] Displaying call stack trace for plugin "vocalizefatigue.smx": L 02/20/2011 - 00:21:29: [SM] [0] Line 395, helpers.sp::StringToLower() L 02/20/2011 - 00:21:29: [SM] [1] Line 206, whitelist.sp::ReadVocalizeWhitelistToTrie() L 02/20/2011 - 00:21:29: [SM] [2] Line 68, whitelist.sp::_Whitelist_OnPluginStart() L 02/20/2011 - 00:21:29: [SM] [3] Line 130, main.sp::OnPluginStart() L 02/20/2011 - 00:21:29: [SM] Plugin encountered error 25: Call was aborted L 02/20/2011 - 00:21:29: [SM] Native "ThrowError" reported: Your Left4Downtown Extension (0.5.2.2) is out of date, please upgrade to 0.5.2.3 or later L 02/20/2011 - 00:21:29: [SM] Displaying call stack trace for plugin "l4d2scores.smx": L 02/20/2011 - 00:21:29: [SM] [0] Line 2101, l4d2scores.sp::CheckDependencyVersions() L 02/20/2011 - 00:21:29: [SM] [1] Line 208, l4d2scores.sp::OnAllPluginsLoaded() L 02/20/2011 - 00:21:41: Error log file session closed. |
Re: [L4D2] Vocalize Fatigue 2
Wow, this is ... incredibly elaborate for what it actually does. Have fun bug hunting, lol.
I spotted some odd things in the code.. like: PHP Code:
|
Re: [L4D2] Vocalize Fatigue 2
Quote:
No the server doesn't vocalize, I don't block the command through. Even if there is a fool to do "rcon vocalize", I rather be safe than sorry. |
Re: [L4D2] Vocalize Fatigue 2
What would happen anyway? Nothing.
|
Re: [L4D2] Vocalize Fatigue 2
this is really a good plugin, against the annoying spam of vocalize thanks :)
i have installed the plugin on my server and i become a startup error Code:
L 02/24/2011 - 16:41:31: Info (map "c5m1_waterfront") (file "errors_20110224.log") |
Re: [L4D2] Vocalize Fatigue 2
Quote:
Wait they can vocalize? I thought you cant Or its a plugin that Enables it. |
Re: [L4D2] Vocalize Fatigue 2
Good news everyone!
The good ol' vocalize command as you know it is back! That means in L4D2 you can now bind and use the vocalize command as in L4D1. E.g. bind key "vocalize PlayerThanks" will now work. Thanks to Atomic to lead me the right way :3 I also fixed the invalid memory access error and added vocalize scenes from Atomics tech demo. And for even more awesomeness natives and forwards for other plugins to use. I will provide a few examples in the next post of mine. |
All times are GMT -4. The time now is 11:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.