View Single Post
Author Message
teddyruxpin
Overseer of lost packets
Join Date: Feb 2008
Old 01-09-2009 , 14:52   [L4D] Vocalize Spam Guard
Reply With Quote #1

This is a hack of a plugin that CrimsonGT wrote to block the 'callvote' commands. This is 99.9% the same code as the other plugin but has been changed up to give it unique cvars and HUD text strings. All credit should goto CrimsonGT for this. I simply just modified his work.

I hacked this up as I was sick and tired of people joining my L4D games only to non stop spam vocalize commands making it hard to hear any of the game play environment and constantly looking for the "Tank" or 'Witch" or other crap they are spamming about.

Comands / CVARS for sourcemod.cfg or CLI:

"sm_vocalize_guard_enabled", "1", "Enable/Disable L4D Vocalize Guardian [0 = FALSE, 1 = TRUE]"

"sm_vocalize_guard_adminimmune", "1", "Enable/Disable Admin Immunity to Penalties [0 = FALSE, 1 = TRUE]"
Allows you to let your admins still spam if they wish to. I personally would shoot my admins that did this so YYMV.

"sm_vocalize_guard_vlimit", "10", "Max Vocalize Spam Calls Allowed [0 = NO LIMIT]"
The amount of times the 'vocalize' command can be run in the 'vdelay' time period. Default is '10' meaning they can run 'vocalize' 10 times in a 3 second time period before they are kicked.

"sm_vocalize_guard_vdelay", "3", "Delay before a player can call another Vocalize command [0 = DISABLED]"
The amount of time delay between using the 'vocalize' command. Keep in mind the players all use scripted volcalize commands when you pickup items so you will NOT want to put this to a high number or you will kick players when they pickup guns at the start of each round.

"sm_vocalize_guard_bantime", "5", "Duration of Ban [0 = KICKS PLAYER]"
Duration in time the kicked player is banned for. Default of 5 mins.


NOTE: if you adjust the 'vdelay' time to low it WILL block and kick players on the start of campaigns or when spawning in the safe room. This is due to the scripted vocalize commands that are played when you pick up items. I would suggest keeping the upper limit high around 10 per vdelay. Meaning they can run 10 vocalize commands in the 3 second period before they are blocked and kicked.

I am also not 100% sure the "sm_vocalize_guard_adminimmune" is fully working. I was not able to test this much last night. Any input would be appreciate.

-Teddy
Attached Files
File Type: sp Get Plugin or Get Source (vocal_block.sp - 4152 views - 6.6 KB)
File Type: smx vocalblock.smx (4.9 KB, 1133 views)
__________________
Black Tusk Labs Home of Turbo TF2 and Turbo L4D:
http://blacktusklabs.com/ - Mah blog and stuff

My Crappy Plugins: SuperBuilds, Parent Buildables,
L4D Player Info

Last edited by teddyruxpin; 01-12-2009 at 16:45.
teddyruxpin is offline