Atouk Posted February 7, 2013 Share 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. Link to comment
DNL291 Posted February 8, 2013 Share 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. Link to comment
Atouk Posted February 8, 2013 Author Share Posted February 8, 2013 Many thanks, sorry for the inconvenience. Link to comment
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