Jump to content

save mute after reconnect


Recommended Posts

Hello.

I would like to know how to save the mute of a player who reconnects

 

Words = {
    ["test"] = true,
    ["mother"] = true,
    ["mom"] = true,
    } 
    
    addEventHandler("onPlayerChat", getRootElement(),
    function(msg, msgType)
        local theMsg = msg
            if Words[theMsg] then
                cancelEvent()
            pName = getPlayerName(source)
            outputChatBox("#FF0000".. pName .." #FF0000 have been muted by Console.",getRootElement(),255,0,0,true)
    setPlayerMuted(source, true)
    setTimer (function ( player  )
    setPlayerMuted (player, false )
         outputChatBox("#FF0000".. pName .." #ff0000 have been unmuted by Console.",getRootElement(),255,0,0,true)
    end,
    300000,1, source )
         end
end
)
 
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...