View Single Post
Author Message
SleepKiller
Junior Member
Join Date: Jul 2014
Old 08-15-2014 , 22:24   [TF2] Anti-Intelligence Spam (1.0, 8/16/2014)
Reply With Quote #1

Description:
I had the thought the other night after seeing intel spamming "I wonder if anyone has written a plugin to stop that," so I searched for it using Google and the plugin search on the SourceMod site. After nothing came up I decided to write it myself.

This plugin quite simply keeps track of when the event and sound for the intelligence being picked up or dropped and compares it against a timeout value. If the timeout period hasn't elapsed the event or sound is prevented from being broadcast. Players can still pick up the intel in the timeout period, it just won't be announced.

Also each player has their times tracked differently, so innocent players for the most part will be unaffected by this. But with the sounds the times are tracked globally since I am unaware of a way to track those for each player.

I high recommend you go into your cfg/sourcemod folder, open up the auto generated tf2anti-intelspam.cfg and customize the timeout values to your liking.

Cvars:
  • antiintelspam_version - Version Cvar, not much else to say.
  • antiintelspam_timeout (default: 3) - The amount of time in seconds that a player must wait before the fact that they have picked up or dropped the intel will be rebroadcast to the other players.
  • antiintelspam_soundtimeout (default: 3) - The amount of time in seconds that the plugin will delay the announcer from, well announcing that the intel has been picked up or dropped.

Changelog:

Quote:
8/16/2014 - 1.0

* Initial Release.
PS. To all you programmers out there, I'm eager to get some (constructive) feedback on my code and what I could have done better. If you take the time to do so it is appreciated.
Attached Files
File Type: sp Get Plugin or Get Source (tf2anti-intelspam.sp - 1382 views - 4.7 KB)

Last edited by SleepKiller; 08-26-2014 at 01:41.
SleepKiller is offline