Jump to content

Bloquear Chat


Recommended Posts

  • Other Languages Moderators

Seja bem-vindo(a) ao fórum, @Pereiraa16! ?

Remover a tecla T para falar no chat, só fazendo um sistema inteiro de chat novamente. O que você pode fazer com o chat atual, é bloqueá-lo para os jogadores, ou seja, eles não poderão enviar mensagens. Para isso, use o evento onPlayerChat. Um pequeno exemplo abaixo:

addEventHandler("onPlayerChat", root, function(message, messageType)
    if messageType == 0 then -- 0 significa o chat 'say', T
        if not hasObjectPermissionTo(source, "command.mute") then -- Se não tiver permissão de moderador ou superior, então cancelamos o evento.
            cancelEvent() -- A mensagem não seria enviada.
        end
    end
end)

 

Edited by Lord Henry
  • Thanks 1
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...