فيه غلطه هنا ومو راضيه تخلي اللوحه تفتح شو هيا الغلطه وحلها ؟
وجزاكم الله خيرا
----------------------
-- Setting
----------------------
local Admin = {
{"King Time","15"},
{"Police","25"},
{"Moderator","35"},
{"SuperModrator","50"},
{"Admin 1","65"},
{"Admin.General","80"},
{"Admin.Lord","100"},
{"Specicl.Admin","130"},
{"Admin.senior","160"},
{"Big.Boss","180"},
{"Admin Crown","200"},
{"King Of The Server","240"},
{"Special.Admin","270"},
{"Head.Admin","300"},
{"Assistant.Console","350"},
{"Guided.server","400"},
{"Mentor.console","450"},
{"Micro.server","470"},
{"agent.server","500"},
{"general.manger","530"},
{"Director.Admin","600"},
{"Director.Controllir","750"},
{"Watcher.Officials","800"},
{"Microcontroller.official","900"},
{"general.Microcontroller","980"},
{"Best.Officials","1100"},
{"Lord.Officials","1250"},
{"King.Officials","1450"},
{"Team.M6.1","1650"},
{"Team.M6.2","1670"},
{"Veteran.director","1800"},
{"Splendid.admin","1950"},
{"Heroic.admin","2000"},
}
----------------------
-- Setting
----------------------
FontGrid = guiCreateFont( "Fonts/Font2.ttf", 11 )
FontLabel = guiCreateFont( "Fonts/Font2.ttf", 13 )
FontButton = guiCreateFont( "Fonts/Font2.ttf", 13 )
GUIEditor = {
gridlist = {},
window = {},
button = {},
label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(547, 92, 418, 648, "[M.6]Rank-System[M.6]", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF08F640")
guiSetVisible(GUIEditor.window[1], false)
GUIEditor.button[1] = guiCreateButton(106, 549, 214, 59, "Buy Rank", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[1], "default-bold-small")
GUIEditor.label[1] = guiCreateLabel(42, 29, 331, 28, "≈[M.6]≈[ مطانيخ العرب ]≈[Ksa]≈[ سعودي هجولة ]≈[M.6]≈", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[2] = guiCreateLabel(130, 618, 185, 30, "Programmed-By-Mo5darat", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[2], "default-bold-small")
GUIEditor.gridlist[1] = guiCreateGridList(9, 51, 399, 488, false, GUIEditor.window[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "Group", 0.5)
guiGridListAddColumn(GUIEditor.gridlist[1], "Hours", 0.5)
guiSetFont(GUIEditor.gridlist[1], FontGrid )
guiSetFont(GUIEditor.label[1], FontLabel )
guiSetFont(GUIEditor.button[1], FontButton )
for k,v in ipairs ( Admin ) do
row = guiGridListAddRow(GUIEditor.gridlist[1]);
guiGridListSetItemText(GUIEditor.gridlist[1],row,1,v[1],false,false);
guiGridListSetItemText(GUIEditor.gridlist[1],row,2,v[2],false,false);
guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,math.random(0,255),math.random(0,255),math.random(0,255))
guiGridListSetItemColor(GUIEditor.gridlist[1],row,2,math.random(0,255),math.random(0,255),math.random(0,255))
end
xMainFunctions_ = function ( )
local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] )
local Group = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,1 ));
local Price = tostring ( guiGridListGetItemText(GUIEditor.gridlist[1],row,2 ));
if ( row and col and row ~= -1 and col ~= -1 ) then
triggerServerEvent("Accept:the:request",localPlayer,Group,Price);
else
outputChatBox("Please Click On The Rank",math.random(0,255),math.random(0,255),math.random(0,255),true);
end
end
addEventHandler("onClientGUIClick",GUIEditor.button[1],xMainFunctions_,false)
local againStartMove = 10
local endMove = 300
addEventHandler("onClientRender",root,function()
if ( guiGetVisible(GUIEditor.label[1]) == true ) then
local x,y = guiGetPosition(GUIEditor.label[1],false)
guiSetPosition(GUIEditor.label[1],x + 1,y,false)
if ( x >= endMove ) then
guiSetPosition(GUIEditor.label[1],againStartMove,y,false)
end
end
end)
addEventHandler ( "onClientResourceStart", root, function ( )
if ( isTimer ( timerColor ) ) then killTimer ( timerColor ) end
timerColor = setTimer ( function ( )
guiLabelSetColor ( GUIEditor.label[1], math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) )
end, 100, 0 )
end )
addEventHandler("onClientResourceStart", resourceRoot,
function()
setTimer(function()
for _, random in ipairs(getElementsByType('gui-button',getResourceRootElement(getThisResource())) ) do
guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255)))
end
end, 100, 0)
end)
bindKey("F10", "down", function()
if guiGetVisible(GUIEditor.window[1]) == true then
guiSetVisible(GUIEditor.window[1], false)
showCursor(false)
guiSetInputEnabled(false)
else
if guiGetVisible(GUIEditor.window[1]) == false then
guiSetVisible(GUIEditor.window[1], true)
showCursor(false)
guiSetInputEnabled(true)
end
end
end