i don't know what is the wrong code please help me
the script is when anyone say bad word he'll get mute. but this isn't work
Words = {
["sever"] = true,
}
----- Muting Function
addEventHandler("onPlayerChat", getRootElement(),
function(msg, msgType)
local theMsg = msg
if Words[theMsg] then
cancelEvent()
pName = getPlayerName(source)
outputChatBox(" (( #FFFFFF".. pName .." #ff0000 )) #808080 Have Been Muted By Consle Rason = Bad Mouth",getRootElement(),255,0,0,true)
setTimer (function ( player , ... )
setPlayerMuted(source, true)
setTimer(unmute(player),tonumber(muteTime)*300000,1)
outputChatBox(" (( #FFFFFF".. pName .." #0000ff )) #ff0000 You Have Been UnMuted By Consle Don't Try That Agine",getRootElement(),255,0,0,true)
end,
300000
,1, true )
end
end
)