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.