addCommandHandler("chat",
function (thePlayer, ... )
if isPlayerMuted (thePlayer) then
outputChatBox("You are muted!!!", thePlayer, 255, 0, 0)
return
end
local message = table.concat ({ ... },"")
for i, player in ipairs(getElementsByType("player")) do
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then
outputChatBox("AdminChat: "..string.gsub(getPlayerName(thePlayer), "#%x%x%x%x%x%x", "")..": ".. message, player, 255, 255, 255, true )
end
end
else
outputChatBox("You don't have Admin Rights !!!", thePlayer, 255, 0, 0, true )
end
end)