Taunt Spam

Something I’ve noticed in a lot of servers is taunt spam, whether its in prop hunt or other games there’s typically someone just hitting the button constantly. For example in murder people were continuously hitting the ‘help’ button. I’m wondering if I’ve just been unlucky or if you guys have ran into this? Or if you know a solution for servers that have that, like an add on or something that will block or ban people who do it.

Just make the cooldown for taunting longer.

O.O That’s a thing? I’ll definitely need to look into that thank you…

Yeah. Anything can have a cooldown, although, it might not have a convar.

I hate to ask but could you show me some code to do that? I’m trying to find it online and I’m such a noob when it comes to this stuff x.x

I don’t know anything about the gamemodes you’re talking about. Post the files were taunts are done in


Usually the way I do cooldowns is make it something tied to the player. So for example

[lua]local taunts = {
} – The table of taunts, you would not include the sound/ part of the path

local tauntcooldowndelay = 5 – How many seconds must they wait until they can taunt again?

hook.Add(‘KeyPress’, ‘tauntKeyPress’, function(ply, key)
if !IsValid(ply) then return end – If the player is not valid then we obviously don’t want them taunting now, do we?

if key == IN_ZOOM then
	if !ply.tauntCD || ply.tauntCD <= SysTime() then -- The reason we check to see if tauntCD is non-existant is because we don't set the value initially, so this would check to see if they've never taunted before
		ply.tauntCD = SysTime() + tauntcooldowndelay
		ply:ChatPrint('You are unable to taunt right now!')


Not tested in game, but it should work or at least give you an idea.

[editline]14th June 2015[/editline]

All done serverside by the way.

Oh my gosh that explain it perfectly thank you so much, which file would I put this in? my server.cfg?

lua/autorun/server, you don’t run Lua from config files

thank you for helping me evidently other people see me as an idiot…I think I can figure it out from here thank you so much.