GUIEditor = {
button = {},
edit = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.button[1] = guiCreateButton(159, 114, 155, 88, "", false)
guiSetAlpha(GUIEditor.button[1], 0.00)
GUIEditor.button[2] = guiCreateButton(318, 116, 155, 86, "", false)
guiSetAlpha(GUIEditor.button[2], 0.00)
GUIEditor.button[3] = guiCreateButton(478, 114, 155, 86, "", false)
guiSetAlpha(GUIEditor.button[3], 0.00)
GUIEditor.button[4] = guiCreateButton(161, 254, 155, 88, "", false)
guiSetAlpha(GUIEditor.button[4], 0.00)
GUIEditor.button[5] = guiCreateButton(318, 256, 155, 88, "", false)
guiSetAlpha(GUIEditor.button[5], 0.00)
GUIEditor.button[6] = guiCreateButton(477, 258, 155, 88, "", false)
guiSetAlpha(GUIEditor.button[6], 0.00)
GUIEditor.edit[1] = guiCreateEdit(158, 345, 477, 82, "ملاحظة : ان تفجرت الطائره او اي سياره لن تستطيع ارجاعها سوف تشتري واحده ثانية", false)
guiEditSetReadOnly(GUIEditor.edit[1], true)
guiSetVisible(GUIEditor.edit[1],false)
end
)
local sx,sy = guiGetScreenSize()
function Dx()
dxDrawRectangle(sx*0.3413,sy*0.3550,sx*0.3137,sy*0.2667)
dxDrawLine(159 - 1, 91 - 1, 159 - 1, 431, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(636, 91 - 1, 159 - 1, 91 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(159 - 1, 431, 636, 431, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(636, 431, 636, 91 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(159, 91, 477, 340, tocolor(62, 240, 14, 255), false)
dxDrawLine(161, 110, 639, 110, tocolor(255, 255, 255, 255), 1, false)
dxDrawText("مود شراء الطائرات والسيارات خاص بسيرفر جراند العراق", 273, 90, 490, 111, tocolor(162, 14, 239, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawLine(161 - 1, 116 - 1, 161 - 1, 200, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(314, 116 - 1, 161 - 1, 116 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(161 - 1, 200, 314, 200, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(314, 200, 314, 116 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(161, 116, 153, 84, tocolor(162, 14, 239, 255), false)
dxDrawLine(162 - 1, 257 - 1, 162 - 1, 341, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(315, 257 - 1, 162 - 1, 257 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(162 - 1, 341, 315, 341, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(315, 341, 315, 257 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(162, 257, 153, 84, tocolor(242, 5, 111, 255), false)
dxDrawLine(320 - 1, 117 - 1, 320 - 1, 201, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(473, 117 - 1, 320 - 1, 117 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(320 - 1, 201, 473, 201, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(473, 201, 473, 117 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(320, 117, 153, 84, tocolor(229, 23, 23, 255), false)
dxDrawLine(480 - 1, 117 - 1, 480 - 1, 201, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(633, 117 - 1, 480 - 1, 117 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(480 - 1, 201, 633, 201, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(633, 201, 633, 117 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(480, 117, 153, 84, tocolor(108, 134, 143, 255), false)
dxDrawLine(320 - 1, 257 - 1, 320 - 1, 341, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(473, 257 - 1, 320 - 1, 257 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(320 - 1, 341, 473, 341, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(473, 341, 473, 257 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(320, 257, 153, 84, tocolor(78, 242, 6, 255), false)
dxDrawLine(480 - 1, 257 - 1, 480 - 1, 341, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(633, 257 - 1, 480 - 1, 257 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(480 - 1, 341, 633, 341, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(633, 341, 633, 257 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(480, 257, 153, 84, tocolor(179, 72, 67, 255), false)
dxDrawText("F16", 160, 115, 313, 200, tocolor(234, 16, 16, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Hunter", 320, 116, 473, 201, tocolor(24, 225, 190, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Raino", 478, 115, 631, 200, tocolor(24, 225, 190, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("infernus", 318, 256, 471, 341, tocolor(234, 16, 16, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Bullet", 160, 257, 313, 342, tocolor(234, 16, 16, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("NRG-500", 479, 257, 632, 342, tocolor(234, 16, 16, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false)
end
-------------------------------------------------------------------------------------------
bindKey ( "F4", "down", function ( )
if ( removeEventHandler("onClientRender",root,Dx) ) then
removeEventHandler("onClientRender",root,Dx)
showCursor(false)
guiSetVisible(GUIEditor.edit[1],false)
else
addEventHandler("onClientRender",root,Dx)
showCursor(true)
guiSetVisible(GUIEditor.edit[1],true)
end
end)
addEventHandler('onClientGUIClickt',root, function ( )
if ( source == GUIEditor.button[1] ) then
triggerServerEvent("f16",getLocalPlayer())
elseif ( source == GUIEditor.button[2] ) then
triggerServerEvent("hunter",getLocalPlayer())
elseif ( source == GUIEditor.button[3] ) ) then
triggerServerEvent("raino",getLocalPlayer())
elseif ( source == GUIEditor.button[4] ) then
triggerServerEvent("bullet",getLocalPlayer())
elseif ( source == GUIEditor.button[5] ) then
triggerServerEvent("infernus",getLocalPlayer())
elseif ( source == GUIEditor.button[6] ) then
triggerServerEvent("nrg500",getLocalPlayer())
end
end
)
ملاحظة عندك أخطأء فـ الدي آكس
لو ومو فاتح اللوحة وظغط مكان الزر رآح يسوي الحدث
فـ احسن تستخدم
guiSetVisible -- false
وعند فتح اللوحة
guiSetVisible -- true