تفضل لم يتم التجربة :
local root = getRootElement()
function chatbox(text, msgtype)
local account = getAccountName(getPlayerAccount(source))
local name = getPlayerName(source)
local playercolor = getPlayerNametagColor (getLocalPlayer())
cancelEvent()
if isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then
outputChatBox("#00FFFF ~| > Mode <|~ " .. playercolor .. " " .. name .. ":#bbbbbb " .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then
outputChatBox("#00FFFF ~| > SuperMode <|~ " .. playercolor .. " " .. name ..":#0000FF " .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
outputChatBox("#00FFFF ~| > Admin <|~ " .. playercolor .. " " .. name .. ":#00CCFF " .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then
outputChatBox("#00FFFF ~| > Console <|~ #FFFFFF#ff0000*" .. playercolor .. " " .. name .. ":#FFFF00 " .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("BestPlayer")) then
outputChatBox("#00FFFF ~| > Best-Player <|~ #FFFFFF#ff0000*" .. playercolor .." " .. name .. ":#00FF00 " .. text, root, 255, 255, 255, true)
end
end
addEventHandler("onPlayerChat", root, chatbox)