السلام عليكم و رحمة الله و بركآتةة
حاب اطرح مود حق عاشق الشرق .. الي يغير لون الاسم بالشات
انا ركبته عندي لكن ماشتغل .. يتغير لون الاسم في السكور بورد فقط .. ولا يتغير بالشات
انا ابيه يتغير بالشات
عشان كذا ابططرح الكود هنآ لانو هالمشكلة غريبة ..
كلنت
local screenWidth, screenHeight = guiGetScreenSize()
local windowWidth, windowHeight = 348, 339
local left = screenWidth/2 - windowWidth/2
local top = screenHeight/2 - windowHeight/2
WindowChange = guiCreateWindow(left,top,windowWidth,windowHeight,"Change Color Name ",false)
guiWindowSetSizable(WindowChange,false)
set = guiCreateButton(26,289,296,34,"Set",false,WindowChange)
guiSetFont(set,"default-bold-small")
red = guiCreateScrollBar(62,59,210,20,true,false,WindowChange)
green = guiCreateScrollBar(62,112,210,20,true,false,WindowChange)
blue = guiCreateScrollBar(62,165,210,20,true,false,WindowChange)
Hex = guiCreateLabel(30,213,61,17,"HexColor :",false,WindowChange)
guiSetFont(Hex,"default-bold-small")
EditLbl = guiCreateLabel(30,240,61,17,"EditColor :",false,WindowChange)
guiSetFont(EditLbl,"default-bold-small")
LablHex = guiCreateLabel(94,212,50,17,"#000000",false,WindowChange)
EditHex = guiCreateEdit(94,239,63,18,"#000000",false,WindowChange)
guiEditSetReadOnly(EditHex,true)
Copy = guiCreateButton(156,239,27,21,"C",false,WindowChange)
Close = guiCreateButton(317,23,21,24,"X",false,WindowChange)
guiSetVisible ( WindowChange, false )
local function HexColor(numbers)
local moh = string.format("%x", tonumber(numbers))
if (string.len(moh) == 1) then
return "0" .. moh
end
return moh
end
function SetText()
HexColor(guiScrollBarGetScrollPosition(red)*2.55+0.5)
HexColor(guiScrollBarGetScrollPosition(green)*2.55+0.5)
HexColor(guiScrollBarGetScrollPosition(blue)*2.55+0.5)
if source == red or source == green or source == blue then
guiLabelSetColor ( LablHex, (guiScrollBarGetScrollPosition(red)*2.55+0.5), (guiScrollBarGetScrollPosition(green)*2.55+0.5), (guiScrollBarGetScrollPosition(blue)*2.55+0.5))
guiSetText ( LablHex, string.upper("#" .. HexColor(guiScrollBarGetScrollPosition(red)*2.55+0.5) .. HexColor(guiScrollBarGetScrollPosition(green)*2.55+0.5) .. HexColor(guiScrollBarGetScrollPosition(blue)*2.55+0.5)) )
guiSetText ( EditHex, string.upper("#" .. HexColor(guiScrollBarGetScrollPosition(red)*2.55+0.5) .. HexColor(guiScrollBarGetScrollPosition(green)*2.55+0.5) .. HexColor(guiScrollBarGetScrollPosition(blue)*2.55+0.5)) )
end
end
addEventHandler("onClientGUIScroll",getRootElement(),SetText)
function Click()
if source == set then
triggerServerEvent("NameTagColorChange",getLocalPlayer(),(guiScrollBarGetScrollPosition(red)*2.55+0.5),(guiScrollBarGetScrollPosition(green)*2.55+0.5),(guiScrollBarGetScrollPosition(blue)*2.55+0.5))
outputChatBox("#FF0000** #00FF00 Successfully Name Color Change #FF0000**",0,255,0,true)
guiSetVisible ( WindowChange, false )
showCursor(false)
elseif source == Close then
guiSetVisible ( WindowChange, false )
showCursor(false)
elseif source == Copy then
setClipboard(tostring(guiGetText(EditHex)))
outputChatBox("#FF0000** #00FF00 Was Copy Successfully #FF0000**",0,255,0,true)
end
end
addEventHandler("onClientGUIClick", root, Click)
function toggle()
if (guiGetVisible(WindowChange)) then
guiSetVisible(WindowChange,false)
else
guiSetVisible(WindowChange,true)
end
end
addCommandHandler ( "namme", toggle )
function toggle()
guiSetVisible(WindowChange,false)
end
addCommandHandler ( "namme1", toggle )
سيرفر
function NameTagColor ( red, green, blue, r, g, b )
setPlayerNametagColor ( source, red, green, blue )
end
addEvent( "NameTagColorChange", true )
addEventHandler ( "NameTagColorChange", getRootElement(), NameTagColor)
الميتا
اتمنى من الخبراء يشوفون حل .. لانو المشكلةة تواججة الجميع ..