Ragnar Posted July 28, 2019 Share Posted July 28, 2019 Olá, Uso ótimo recurso aqui mesmo do fórum que bloqueá binds de texto, mas é possível mandar ainda pelo F8: "say #000000KKK#FFFFFFKKK" Há possibilidade de desabilitar? Link to comment
Other Languages Moderators Lord Henry Posted July 28, 2019 Other Languages Moderators Share Posted July 28, 2019 (edited) Não. Pois se fizer isso não será mais possível falar no chat normal também. Quando vc aperta T e escreve alguma mensagem, vc está internamente usando o comando /say Se você está querendo evitar Spam, só usar um setTimer. Quando o jogador enviar uma mensagem, verifica se existe esse timer, se existir, cancela o envio da mensagem com cancelEvent no evento onPlayerChat. Se não tiver o timer, manda a mensagem normalmente e cria o timer. Edited July 28, 2019 by Lord Henry Link to comment
[M]ister Posted July 28, 2019 Share Posted July 28, 2019 Pode verificar o isConsoleActive Cliente: local consoleActive = false addEventHandler("onClientRender", root, function() if (consoleActive ~= isConsoleActive()) then consoleActive = isConsoleActive() setElementData(localPlayer,"consoleActive",consoleActive) end end ) Server: addEventHandler("onPlayerCommand", root, function(cmd) if (cmd ~= "say") then return end if getElementData(source,"consoleActive") then cancelEvent() outputChatBox("*Uso inválido!", source, 255, 0, 0) end end ) 1 2 Link to comment
Ragnar Posted July 28, 2019 Author Share Posted July 28, 2019 Muito obrigado @MaligNos 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