شوف هذا المود مثلا
function guiCreateButton(x3, y3, width3, height3, titleBarText2, relative2 , Wnd)
local mainBackground3 = guiCreateStaticImage ( x3, y3, width3, height3, "Back.png", relative2 , Wnd)
local mainBackgroundLabel3 = guiCreateLabel ( 0.4, 0, 700, 100, ""..titleBarText2, true, mainBackground3 )
guiSetFont ( mainBackgroundLabel3, guiCreateFont ( "Font.ttt", 10.9 ) )
guiLabelSetColor(mainBackgroundLabel3,0, 0, 0)
guiSetEnabled ( mainBackgroundLabel3, false )
return mainBackground3
end
----------------------
-- Setting
----------------------
local Admin = {
{"King.Drift","15"},
{"King.Of.Time","25"},
{"Wrsha","35"},
{"Police","50"},
{"King.Of.Police","65"},
{"Super.Police","80"},
{"Moderator1","100"},
{"Moderator2","130"},
{"SuperModerator1","160"},
{"SuperModerator2","180"},
{"Admin1","200"},
{"Admin2","240"},
{"Special.Admin","270"},
{"Professional.Admin","300"},
{"Leader.Admin","350"},
{"Admin.Office","400"},
{"Prince.Server","450"},
{"Prince.Admin","470"},
{"Prince.A7","500"},
{"Special.Man","530"},
{"Special.prince","600"},
{"Head.Admin","750"},
{"Prince.Of.Server","800"},
{"Big.Admin","900"},
}
----------------------
-- Setting
----------------------
FontGrid = guiCreateFont( "Fonts/Font2.ttf", 11 )
FontLabel = guiCreateFont( "Fonts/Font2.ttf", 13 )
FontButton = guiCreateFont( "Fonts/Font2.ttf", 13 )
GUIEditor = {
gridlist = {},
staticimage = {},
button = {},
label = {}
}
GUIEditor.staticimage[1] = guiCreateStaticImage(257, 104, 291, 363, "images/Back.png", false)
guiSetVisible(GUIEditor.staticimage[1], false)
guiWindowSetSizable(GUIEditor.staticimage[1], false)
guiWindowSetMovable(GUIEditor.staticimage[1], true)
GUIEditor.label[1] = guiCreateLabel(2, 2, 284, 48, "هنآ أسم السيرفر", false, GUIEditor.staticimage[1])
guiLabelSetColor(GUIEditor.label[1], 255, 251, 0)
GUIEditor.gridlist[1] = guiCreateGridList(10, 51, 271, 251, false, GUIEditor.staticimage[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "Group", 0.7)
guiGridListAddColumn(GUIEditor.gridlist[1], "Hours", 0.3)
GUIEditor.button[1] = guiCreateButton(10, 307, 271, 46, "Buy Admin", false, GUIEditor.staticimage[1])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF00FFFC")
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("F7", "down", function()
if guiGetVisible(GUIEditor.staticimage[1]) == true then
guiSetVisible(GUIEditor.staticimage[1], false)
showCursor(false)
guiSetInputEnabled(false)
else
if guiGetVisible(GUIEditor.staticimage[1]) == false then
guiSetVisible(GUIEditor.staticimage[1], true)
showCursor(false)
guiSetInputEnabled(true)
end
end
end
)