PDA

View Full Version : Bjust Taunts-Anti Taunt Spam



-|GA|- Muppet
1st July 2006, 17:48
im trying to find a way of stopping the taunts and other ingame messages and statements (calling all 3 MESSAGES) being spammed. so limiting taunts, quik commands and responses to 2 per minute each or to a total of 4 MESSAGES per minute.

been looking through the Bjust taunts _quickmessages.gsc in maps/mp/gametypes. and found:


wait 2;
self.spamdelay = undefined;

i know the "wait" is the time delay after u exec the MESSAGE before u can do any other MESSAGE of any kind.
but the self.spamdelay is a bit wierd i found. i tried setting it to 30. but when i used it, i found that after i did my first MESSAGE (taunt 1), i could do another MESSAGE aslong as it was a different 1 and and not an incrimental MESSAGE on the same sub MESSAGE menu. ie:
did taunt 1,sound for taunt 1 played
then tried taunt 2, no sound played
tried taunt 3, sound for taunt 3 played
then tried taunt 5, sound for taunt 5 played

but if i tried to play the same MESSAGE and if i tried to play 2 quick commands i couldnt and had teh same thing as the taunts above happen, even thoguh i only setup the "self.spamdelay" for quicktaunts(response)

any idea on how i should be doing this and what "self.spamdelay" actualy does?

Grishna
1st July 2006, 20:56
Is this for that new AM mod? :D, Bj will get back to u

Bjusterbaarlik
1st July 2006, 21:19
You do not need to touch the self.spamdelay variable. If you search for it in the file, you will see that at the beginning of each function: quickcommands(response), quickstatements(response), quickresponses(response), quicktaunts(response) and quicktaunts2(response), there is an if-statement checking if the self.spamdelay is defined:

if(!isdefined(self.pers["team"]) || self.pers["team"] == "spectator" || isdefined(self.spamdelay))
return;
This checks if the player is not on a team, if the player is a spectator and if self.spamdelay is defined. If either one of them is true, the function stops and a player will not be able to perform a voice command.

In the following code:

wait 2;
self.spamdelay = undefined;
The wait command just defines how many seconds a player has to wait before he can perform any other voice command. If you put it to 30, a player has to wait 30 seconds before he is able to make a voice command again.

Grishna
1st July 2006, 22:56
N1 Bj :D

-|GA|- Muppet
1st July 2006, 23:56
yea i got the wait bit, but i was hopeing that the "self.spamdelay = undefined;" could be used for somethign more clever, o well. ill just set it to 1 voice MESSAGE per 20 secs or something. cheers for teh reply :)
n yes grish, it is for our version of Admiral Mod

Bjusterbaarlik
26th August 2006, 12:49
I just made a nice anti-spam system in the taunts mod, but it is not any server yet, only on my PC. Now, I am only trying to find an alternative way to show the taunts in the menu (instead of Taunt 1, Taunt 2, etc.) and I will release that as a final version.

-|GA|- Muppet
26th August 2006, 21:27
ah cool, although found just settign a temp ingore on players taunts/quick commands of like 10 seconcs after they used 1, worked well, most ppl just try to spam a 2nd or third taunt, relaise they cant and just give up :)