Jump to content

[AJUDA] Anti-Flood não Funciona


Recommended Posts

Eu configuro tudo certinho o anti flood e mesmo assim da erro, eu envio a mensagem, não aparece a mensagem mas aparece a mensagem do anti flood dizendo "Você tem que esperar 5 segundos para digitar novamente!"

Você pode ver nessa imagem: http://prntscr.com/n8k9vw

Meu código é esse:

ComandoDoChatGlobal =                "twitter" 
local timerTempo = {}	
local timerChamar = 5000

function adminchat ( thePlayer, _, ... )
    local message = table.concat ( { ... }, " " )
    if ( isPlayerOnGroup ( thePlayer ) ) then
	for _, player in ipairs ( getElementsByType ( "player" ) ) do
	if ( isPlayerOnGroup ( player ) ) then	
			if timerTempo[thePlayer] and timerTempo[thePlayer] + timerChamar > getTickCount() then
			outputChatBox ( "Aguarde 5 segundos para digitar novamente!", thePlayer, 255, 0, 0)
			return
			else
			timerTempo[thePlayer] = getTickCount()
			end
			
			local ID = getElementData(player, "ID") or "N/A"
			if getElementData (thePlayer, "Staff") then
			outputChatBox("#00BFFF[#00BFFFTwitter#00BFFF] #26539d*Staff -#ffffff "..getPlayerName(thePlayer).."["..ID.."]#ffffff:#ffffff "..message, player, 255, 255, 255, true)
			elseif not getElementData (thePlayer, "Staff") then
			outputChatBox("#00BFFF[#00BFFFTwitter#00BFFF]#ffffff "..getPlayerName(thePlayer).."["..ID.."]#ffffff:#ffffff "..message, player, 255, 255, 255, true)
		end
	end
	end
end
end
addCommandHandler ( ComandoDoChatGlobal, adminchat )

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...