Atouk Posted February 7, 2013 Posted February 7, 2013 I want to increase you the number of times you can talk in some time (SPAM), Nose if I understand, but I hope you understand me. Below the script. antiSpam = {} function antiChatSpam() if isTimer(antiSpam[source]) then cancelEvent() outputChatBox("#ffffff"..getPlayerName(source).." #ff6600ha sido muteado -->[Razon #3] ! ( 60 segundos )", getRootElement(), 255, 255, 0,true) setPlayerMuted(source, true) setTimer ( autoUnmute, 60000, 1, source) else antiSpam[source] = setTimer(function(source) antiSpam[source] = nil end, 1000, 1, source) end end addEventHandler("onPlayerChat", root, antiChatSpam) function autoUnmute ( player ) if ( isElement ( player ) and isPlayerMuted ( player ) ) then setPlayerMuted ( player, false ) outputChatBox ("#FFFFFF"..getPlayerName ( player ).." #ff6600ha sido desmuteado !",getRootElement(), 255, 255, 0,true ) end end I hope answers, thanks.
DNL291 Posted February 8, 2013 Posted February 8, 2013 antiSpam[source] = setTimer(function(source) antiSpam[source] = nil end, 1000, 1, source) To increase the antiSpam timer, change the '1000' argument for a time more longer. e.g: antiSpam[source] = setTimer(function(source) antiSpam[source] = nil end, 2000, 1, source) '2000' Is 2 seconds. Please do not PM me with scripting related question nor support, use the forums instead.
Atouk Posted February 8, 2013 Author Posted February 8, 2013 Many thanks, sorry for the inconvenience.
DNL291 Posted February 9, 2013 Posted February 9, 2013 You're welcome. Please do not PM me with scripting related question nor support, use the forums instead.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now