local blockc = false
function bbc ( source )
local accName = getAccountName ( getPlayerAccount ( source ) )
if isObjectInACLGroup ( "user."..accName, aclGetGroup ( "Admin" ) ) then
if ( blockc == true ) then
outputChatBox ( "#FFFF00* GM ".. getPlayerName ( source ) .."#00FF00 normalizou o chat para demais usuários.", getRootElement(), 255, 255, 255, true )
blockc = false
else
outputChatBox ( "#FFFF00* GM ".. getPlayerName ( source ) .."#00FF00 trancou o chat para demais usuários.", getRootElement(), 255, 255, 255, true )
blockc = true
end
else
outputChatBox ( "#ffff00Access denied.", source, 255, 255, 255, true )
end
end
addCommandHandler ( "chat", bbc )
addEventHandler ( "onPlayerChat", root,
function ( )
if ( blockc ) then
cancelEvent ( )
end
end
)