سويت تحقق,
بس فيه مشكله.
attempt to concatenate global 'message'(a nil value)
outputChatBox(getPlayerName(source)..":"..MsgColor..""..message, root, red, green, blue, true )
الاكواد بعد التعديل,
---------Server
addEvent("setData",true)
addEventHandler("setData",root,function(color)
if ( color == localPlayer) then
if not isGuestAccount ( getPlayerAccount(source) ) then
setAccountData( getPlayerAccount(source),"colortag",color)
else
outputChatBox("you must login frist",source)
end
end
end
)
addEventHandler("onPlayerChat", root,function ( )
local MsgColor = getAccountData ( getPlayerAccount(source), "colortag" )
if MsgColor then
cancelEvent()
local red, green, blue = getPlayerNametagColor(source)
outputChatBox(getPlayerName(source)..":"..MsgColor..""..message, root, red, green, blue, true )
else
local red, green, blue = getPlayerNametagColor(source)
outputChatBox(getPlayerName(source).." :#ffffff" ..message, root, red, green, blue, true )
end
end
)
local root = getRootElement()
function chatbox(text, msgtype)
local account = getAccountName(getPlayerAccount(source))
local name = getPlayerName(source)
cancelEvent()
if isObjectInACLGroup("user." .. account, aclGetGroup("NO")) then
outputChatBox("NO" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then
outputChatBox("#ff0000亗#FFFFFF⌠#696969ϟ #00ffffconsole #696969ϟ#FFFFFF⌡#ff0000亗 :" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Console1")) then
outputChatBox("#ff0000亗#FFFFFF⌠#696969ϟ #00ffffconsole1 #696969ϟ#FFFFFF⌡#ff0000亗 :" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Criminal")) then
outputChatBox("#F0E68C亗#ffffff╚#696969✘ #00ffffCrim#d2b48ciƝaL#ffffff™ #696969✘#ffffff╝#F0E68C亗 :#cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("AssistantConsole")) then
outputChatBox("#FFFFFF✱ ⌠» #96D8D4AssistantConsole #FFFFFF«⌡ ✱ :" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("DevRoyale")) then
outputChatBox(" #FFFF00✱⌠» #7FFFD4Dev-Royale #FFFF00«⌡✱ : ".. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Dieputy.Console")) then
outputChatBox("#00ffff✱#cccccc ⌠» #00ffffDieputy #ffffffConsole #cccccc«⌡ #00ffff✱#cccccc :" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Group-FaMiLy")) then
outputChatBox("#FFB6C1✱#ADD8E6⌠ #FFB6C1فـــآمـــلـــي #ADD8E6حــــزب ⌡#FFB6C1✱ :" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Managers")) then
outputChatBox("#FF2D4C✱#cccccc⌠ #FF2D4CManager#C7D1D9s#cccccc ⌡#FF2D4C✱ :#cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Manager")) then
outputChatBox("#ADD8E6✱#cccccc⌠ #FFB6C1Manager#cccccc ⌡#ADD8E6✱ :#cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Manager-Acl")) then
outputChatBox("#c0ffc0✱⌠ #99ff00Manager#c0c0c0Acl#c0ffc0 ⌡✱ :" .. name .. ":"..MsgColor.."" ..text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("SPECIALPRINCE")) then
outputChatBox("#FEA883✱#cccccc【 #FEA883SPECIAL PRINCE #cccccc】#FEA883✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("ADMINSENIOR")) then
outputChatBox("#ff0033✱【 #990033Senior Admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("PRINCEADMIN")) then
outputChatBox("#ff0033✱【 #ffcc00PRINCE ADMIN #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("ADMINM7TRF")) then
outputChatBox("#ff0033✱【 #333399ADMIN M7TRF #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("ADMINWZARH")) then
outputChatBox("#ff0033✱【 #669999ADMIN WZARH #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("ADMINPOWER")) then
outputChatBox("#ff0033✱【 #33ffffADMIN POWER #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("KINGADMIN")) then
outputChatBox("#ff0033✱【 #990000KING ADMIN #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("AdminGeneral")) then
outputChatBox("#ff0033✱【 #66ff66Admin General #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("POLICE-A7sas")) then
outputChatBox("#ff0000♥#ffffff【#ff0000彡 #66ffffРŐĹĨČĔ-Á7ŚÁŚ #ff0000彡#ffffff】#ff0000♥:" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("POLICE-MR.MAN")) then
outputChatBox("#FFFFFF✱【#696969 Police-MR.MAN #FFFFFF】✱: #696969:" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("PrestegeGuard")) then
outputChatBox("#D2691E✱【 #FFDEADPrestegeGuard#D2691E 】✱#FFFFFF: #FFDEAD#-:" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("AdminOfficial")) then
outputChatBox("#ff0033✱【 #996600Admin Official #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("EmperorOfServer")) then
outputChatBox("#ff0033✱【 #996633Emperor Of Server #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("AdminPrime")) then
outputChatBox("#ff0033✱【 #cc6600Admin Prime #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("AdminMonitor")) then
outputChatBox("#ff0033✱【 #ccff33Admin Monitor #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Bigadmin")) then
outputChatBox("#ff0033✱【 #000066Big admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("KingOfServer")) then
outputChatBox("#ff0033✱【 #ffff00King Of Server #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("AdminBoss")) then
outputChatBox("#ff0033✱【 #3366ffAdmin Boss #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("BestAdmin")) then
outputChatBox("#ff0033✱【 #0000ffBest Admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("AdminPlus")) then
outputChatBox("#ff0033✱【 #669999Admin Plus #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("AdminTop")) then
outputChatBox("#ff0033✱【 #33ffffAdmin Top #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Vip-Admin")) then
outputChatBox("#ff0033✱【 #990000V.I.P Admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Professional")) then
outputChatBox("#ff0033✱【 #333399Professional Admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Leader")) then
outputChatBox("#ff0033✱【 #ffcc00Leader Admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Prince")) then
outputChatBox("#ff0033✱【 #336666Prince of Server #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("DE")) then
outputChatBox("#ff0033✱【 #990033Speical Admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Head.Admin")) then
outputChatBox("#ff0033✱【 #00ff00Head Admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("ADMIN")) then
outputChatBox("#ff0033✱【 #660000Admin #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator2")) then
outputChatBox("#ff0033✱【 #ffcc00SuperModerator2 #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then
outputChatBox("#ff0033✱【 #999900SuperModerator #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator2")) then
outputChatBox("#ff0033✱【 #669999Moderator2 #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then
outputChatBox("#ff0033✱【 #ff33ffModerator #】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("VoteModerator")) then
outputChatBox("#ff0033✱【 #660000VoteModerator #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("police")) then
outputChatBox("#ff0033✱【 #663333Police #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("VotePolice")) then
outputChatBox("#ff0033✱【 #339933VotePolice #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("V.I.P")) then
outputChatBox("#ff0033✱【 #666600V.I.P #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Time")) then
outputChatBox("#ff0033✱【 #339933King Of Time #ff0033】✱ #cccccc" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin-F")) then
outputChatBox("#ffffff✱ x[ #000000 ادمن مـخالف #ffffff ]x :" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then
outputChatBox("#ff0033✱【 #ffffffEveryone #ff0033】✱ #ffffff:" .. name .. ":"..MsgColor.."" .. text, root, 255, 255, 255, true)
end
function GRAND()
outputChatBox ( "", source, 0, 0, 0, true )
end
addEventHandler("onPlayerJoin", getRootElement(), GRAND)
end
addEventHandler("onPlayerChat", root, chatbox)
Client
WndColorX = guiCreateWindow(0.00, 0.28, 0.21, 0.29, "لوحة تغيير لون الشات الخاص بك", true)
guiWindowSetSizable(WndColorX, false)
guiSetProperty(WndColorX, "CaptionColour", "FFFFDD00")
guiSetVisible(WndColorX,false)
combox = guiCreateComboBox(0.03, 0.15, 0.94, 0.56, "", true, WndColorX)
guiSetVisible(WndColorX,false)
guiSetFont(combox, "default-bold-small")
guiSetProperty(combox, "NormalEditTextColour", "FF00FEFC")
guiComboBoxAddItem(combox, "-----------------------")
guiComboBoxAddItem(combox, "لوحة تغيير لون الشات")
guiComboBoxAddItem(combox, "-----------------------")
lelelele = guiCreateLabel(0.03, 0.75, 0.93, 0.14, "قم بإختيار اللوحة المراد فتحها لك .", true, WndColorX)
guiSetFont(lelelele, "default-bold-small")
guiLabelSetColor(lelelele, 0, 254, 252)
guiLabelSetHorizontalAlign(lelelele, "center", false)
guiLabelSetVerticalAlign(lelelele, "center")
ClickBTN = guiCreateButton(0.10, 0.58, 0.80, 0.10, "اختيار ", true, WndColorX)
guiSetProperty(ClickBTN, "NormalTextColour", "FF00FBFE")
-----------
local screenW, screenH = guiGetScreenSize()
WndColor = guiCreateWindow((screenW - 188) / 2, (screenH - 171) / 2, 188, 171, "لوحة تغيير لون الشات الخاص بك", false)
guiWindowSetSizable(WndColor, false)
guiSetVisible(WndColor,false)
ColorEdit = guiCreateEdit(0.05, 0.22, 0.87, 0.18, "", true, WndColor)
guiEditSetMaxLength(ColorEdit, 7)
ColorSetBTN = guiCreateButton(0.05, 0.46, 0.86, 0.18, "تغيير اللون #", true, WndColor)
Close_BTn = guiCreateButton(0.05, 0.85, 0.32, 0.09, "X", true, WndColor)
Deff = guiCreateLabel(0.07, 0.64, 0.85, 0.18, "قم بوضع كود اللون هنا #", true, WndColor)
guiSetAlpha(Deff, 0.61)
guiSetFont(Deff, "default-bold-small")
guiLabelSetColor(Deff, 0, 254, 89)
guiLabelSetHorizontalAlign(Deff, "center", false)
guiLabelSetVerticalAlign(Deff, "center")
open = function()
guiSetVisible( WndColorX, not guiGetVisible( WndColorX ) )
showCursor( guiGetVisible( WndColorX ) )
end
bindKey('M','down',open)
addEventHandler("onClientGUIClick", root,
function ()
if source == ClickBTN then
local comboboxxx = guiComboBoxGetSelected(combox)
if comboboxxx == 1 then
guiSetVisible(WndColor,true)
end
end
end
)
addEventHandler("onClientRender",root,function()
if guiGetVisible(WndColorX,false) then showCursor(true)
end end )
addEventHandler("onClientGUIClick",root,function()
if source == Close_BTn then
guiSetVisible(WndColor,false)
showCursor(false)
elseif source == ColorSetBTN then
local color = guiGetText(ColorEdit)
if color ~="" then
triggerServerEvent("setData",localPlayer,color)
end
end
end
)