المشكله عندك انك تلغي الحدث يدوي فبالتالي راح يعالج الحدث مرتين مره من الاسكربت تبعك و مره من واسطه الاليه المعالجه
علشان تحل المشكله لازم معالجه الحدث مره واحده بس
وذا الكود بعد التصحيح
local root = getRootElement()
addEventHandler(
"onPlayerChat",
root,
function(text)
name = getPlayerName(source)
account = getAccountName(getPlayerAccount(source))
if (getPlayerTeam(source)) then
local r, g, b = getTeamColor(getPlayerTeam(source))
cancelEvent()
outputChatBox("" .. name .. ": #FFFFFF" .. text .. "", root, r, g, b, true)
else
cancelEvent()
if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then
outputChatBox("#FF8C00[Console]#FFFFFF " .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("console")) then
outputChatBox("#FF0000[Admin] " .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true)
end
end
end
)
By:O7X