السلام اللوحة ماتفتح عندي ليه
Unlimted = {
CheckBox = {}
}
ArmoredCar = {
CheckBox = {}
}
WVehicle = {
button = {}
}
GUIEditor = {
label = {}
}
WME = {
button = {}
}
local screenW, screenH = guiGetScreenSize()
wnd = guiCreateWindow((screenW - 454) / 2, (screenH - 514) / 2, 454, 514, "", false)
guiWindowSetSizable(wnd, false)
grid = guiCreateGridList(9, 22, 218, 482, false, wnd)
guiGridListAddColumn(grid, "The Car", 0.5)
guiGridListAddColumn(grid, "The Price", 0.5)
buy = guiCreateButton(235, 48, 202, 45, "استئجار الموتر", false, wnd)
guiSetProperty(buy, "NormalTextColour", "FF41FE00")
lock = guiCreateButton(235, 113, 202, 45, "قفل-فتح الموتر", false, wnd)
guiSetProperty(lock, "NormalTextColour", "FFFD00E9")
light = guiCreateButton(235, 178, 202, 45, "اطفاء-تشغيل ضوء الموتر", false, wnd)
guiSetProperty(light, "NormalTextColour", "FF8800FC")
WVehicle.button.Window = guiCreateButton(235, 241, 202, 45, "نقل الموتر الي", false, wnd)
guiSetProperty(WVehicle.button.Window, "NormalTextColour", "FFFB9400")
WME.button.Window = guiCreateButton(235, 300, 202, 45, "آلآنتقال للموتر", false, wnd)
guiSetProperty(WME.button.Window, "NormalTextColour", "FFF00A71")
GUIEditor.label[1] = guiCreateLabel(227, 358, 227, 26, "____________________________________________________", false, wnd)
guiSetFont(GUIEditor.label[1], "default-bold-small")
guiLabelSetColor(GUIEditor.label[1], 0, 240, 255)
Unlimted.CheckBox.Window = guiCreateCheckBox(267, 389, 170, 22, "الوان مختلفة للموتر", false, false, wnd)
guiSetFont(Unlimted.CheckBox.Window, "default-bold-small")
guiSetProperty(Unlimted.CheckBox.Window, "NormalTextColour", "FFF7F900")
Netro = guiCreateCheckBox(267, 416, 170, 22, "نيترو للموتر", false, false, wnd)
guiSetFont(Netro, "default-bold-small")
guiSetProperty(Netro, "NormalTextColour", "FF00E3F7")
ArmoredCar.CheckBox.Window = guiCreateCheckBox(267, 443, 170, 22, "الموتر لا يتحطم", false, false, wnd)
guiSetFont(ArmoredCar.CheckBox.Window, "default-bold-small")
guiSetProperty(ArmoredCar.CheckBox.Window, "NormalTextColour", "FFF50B00")
GUIEditor.label[2] = guiCreateLabel(227, 461, 227, 26, "____________________________________________________", false, wnd)
guiSetFont(GUIEditor.label[2], "default-bold-small")
guiLabelSetColor(GUIEditor.label[2], 0, 240, 255)
close = guiCreateButton(399, 483, 45, 21, "Close", false, wnd)
guiSetProperty(close, "NormalTextColour", "FFF40000")
label = guiCreateLabel(237, 487, 106, 22, "by 7amoody", false, wnd)
guiSetFont(label, "default-bold-small")
guiLabelSetColor(label, 23, 220, 139)
guiSetVisible (wnd, false)
addEventHandler("onClientResourceStart",resourceRoot,
function()
outputChatBox ( "#7F7F7F*#00FFCD2st2gar #7F7F7Fmod #00FFCDcreated #7F7F7Fby #00FFCD:-#7F7F7F 1XxCr#00FFCD[o]#7F7F7FsS#00FFCD*" , 255, 0, 0, true)
end
)
bindKey("F7","down",
function ()
guiSetVisible (wnd ,not guiGetVisible (wnd))
showCursor(guiGetVisible(wnd))
end
)
addEventHandler("onClientGUIClick",root,
function ()
if source == close then
guiSetVisible(wnd,false)
showCursor(false)
end
end
)
-- name . id . price
cars ={
{"Banshee",429,1000000},
{"Bullet",541,1000000},
{"Cheetah",415,1000000},
{"Comet",480,500000},
{"Elegy",562,900000},
{"Flash",565,200000},
{"Hotknife",434,400000},
{"Hotring Racer 1",494,1000000},
{"Hotring Racer 2",502,1000000},
{"Hotring Racer 3",503,1000000},
{"Infernus",411,1000000},
{"Jester",559,1000000},
{"Stratum",561,600000},
{"Sultan",560,1000000},
{"Super GT",506,700000},
{"Turismo",451,1000000},
{"Uranus",558,800000},
{"Windsor",555,600000},
{"ZR-350",477,700000},
}
for k,v in ipairs(cars) do
local row = guiGridListAddRow(grid)
guiGridListSetItemText(grid,row,1,v[1],false,false)
guiGridListSetItemText(grid,row,2,v[3],false,false)
guiGridListSetItemData(grid,row,1,v[2])
end
addEventHandler("onClientGUIChanged",search,function ()
guiGridListClear(grid)
for k,v in ipairs(cars) do
if string.find(v[1],guiGetText(search)) then
local row = guiGridListAddRow(grid)
guiGridListSetItemText(grid,row,1,v[1],false,false)
guiGridListSetItemText(grid,row,2,v[3],false,false)
guiGridListSetItemData(grid,row,1,v[2])
end
end
end,false)
addEventHandler("onClientGUIClick",buy,
function ()
local sel = guiGridListGetSelectedItem(grid)
if sel ~= -1 then
local id = guiGridListGetItemData(grid,sel,1)
local money = guiGridListGetItemText (grid,sel,2)
triggerServerEvent("givecar",localPlayer,id,money)
else
if sel == -1 then
outputChatBox ( "* يجب اختيار سيارة لاستئجارها" , 255, 0, 0, false)
end
end
end
,false)
addEventHandler("onClientGUIClick",root,
function ()
if source == lock then
triggerServerEvent("lockCar",localPlayer)
end
end
)
addEventHandler("onClientGUIClick",root,
function ()
if source == light then
triggerServerEvent("light",localPlayer)
end
end
)
guiSetEnabled(create.button.Window, false)
setTimer(guiSetEnabled, 4000, 1, create.button.Window, true)
elseif (source == destroy.button.Window) then
killTimer(UnlimtedColorsTimer)
guiCheckBoxSetSelected(Unlimted.CheckBox.Window, false)
triggerServerEvent( 'destroyUSERcar', localPlayer )
guiSetEnabled(destroy.button.Window, false)
setTimer(guiSetEnabled, 4000, 1, destroy.button.Window, true)
elseif (source == WVehicle.button.Window) then
triggerServerEvent( 'WVehicleToMe', localPlayer )
guiSetEnabled(WVehicle.button.Window, false)
setTimer(guiSetEnabled, 4000, 1, WVehicle.button.Window, true)
elseif (source == WME.button.Window) then
triggerServerEvent( 'WMEToVehicle', localPlayer )
guiSetEnabled(WME.button.Window, false)
setTimer(guiSetEnabled, 4000, 1, WME.button.Window, true)
elseif (source == Unlimted.CheckBox.Window) then
if (guiCheckBoxGetSelected(Unlimted.CheckBox.Window) == true) then
UnlimtedColorsTimer = setTimer(function()
triggerServerEvent( 'setUSERvehiclecolor', localPlayer )
end, 200, 0)
else if (guiCheckBoxGetSelected(Unlimted.CheckBox.Window) == false) then
killTimer(UnlimtedColorsTimer)
end
)
elseif (source == ArmoredCar.CheckBox.Window) then
if (guiCheckBoxGetSelected(ArmoredCar.CheckBox.Window) == true) then
triggerServerEvent( 'setUSERvehiclearmored', localPlayer )
else if (guiCheckBoxGetSelected(ArmoredCar.CheckBox.Window) == false) then
triggerServerEvent( 'setUSERvehicledearmored', localPlayer )
end
)