Sign in to follow this  
JehadGh

مساعدة في اللوحات

Recommended Posts

dx الحين انا عندي لوحتين وحده عادية ووحده
كيف ابفتح الثنتين لما لاعب يخش ماركر معين ؟
: الاكواد
 

-- اللوحه العادية
function ()
        GUIEditor.window[1] = guiCreateWindow(509, 379, 810, 353, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetProperty(GUIEditor.window[1], "Visible", "False")


        hamrger = guiCreateButton(568, 589, 209, 106, "", false)


        shwrma = guiCreateButton(824, 589, 208, 105, "", false)


        potato = guiCreateButton(1078, 590, 208, 104, "", false)


        exit = guiCreateButton(1287, 385, 32, 30, "", false)
        guiSetProperty(exit, "Visible", "False")


        GUIEditor.staticimage[1] = guiCreateStaticImage(568, 413, 210, 154, "hamburger.png", false)


        GUIEditor.staticimage[2] = guiCreateStaticImage(824, 413, 208, 154, "shawarma.png", false)


        GUIEditor.staticimage[3] = guiCreateStaticImage(1077, 415, 209, 152, "potato.png", false)
    end
-- dx اللوحة الـ
function dx()
        dxDrawImage(1280, 376, 43, 44, "close.png", 0, 0, 0, tocolor(131, 126, 123, 255), false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(776, 695, 566, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(778, 695, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(823, 588, 1032, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1077, 588, 1286, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1032, 694, 822, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1032, 589, 1032, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(823, 588, 823, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1077, 589, 1077, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1286, 588, 1286, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1287, 694, 1077, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawText("Hamburger 300$", 586, 602, 756, 672, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Shawrma 200$", 840, 604, 1010, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Potato 100$", 1097, 604, 1267, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
    end

ومشكورين مسبقاً يجماعة 😁

Share this post


Link to post
10 hours ago, JehadGh said:

dx الحين انا عندي لوحتين وحده عادية ووحده
كيف ابفتح الثنتين لما لاعب يخش ماركر معين ؟
: الاكواد
 


-- اللوحه العادية
function ()
        GUIEditor.window[1] = guiCreateWindow(509, 379, 810, 353, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetProperty(GUIEditor.window[1], "Visible", "False")


        hamrger = guiCreateButton(568, 589, 209, 106, "", false)


        shwrma = guiCreateButton(824, 589, 208, 105, "", false)


        potato = guiCreateButton(1078, 590, 208, 104, "", false)


        exit = guiCreateButton(1287, 385, 32, 30, "", false)
        guiSetProperty(exit, "Visible", "False")


        GUIEditor.staticimage[1] = guiCreateStaticImage(568, 413, 210, 154, "hamburger.png", false)


        GUIEditor.staticimage[2] = guiCreateStaticImage(824, 413, 208, 154, "shawarma.png", false)


        GUIEditor.staticimage[3] = guiCreateStaticImage(1077, 415, 209, 152, "potato.png", false)
    end
-- dx اللوحة الـ
function dx()
        dxDrawImage(1280, 376, 43, 44, "close.png", 0, 0, 0, tocolor(131, 126, 123, 255), false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(776, 695, 566, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(778, 695, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(823, 588, 1032, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1077, 588, 1286, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1032, 694, 822, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1032, 589, 1032, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(823, 588, 823, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1077, 589, 1077, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1286, 588, 1286, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1287, 694, 1077, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawText("Hamburger 300$", 586, 602, 756, 672, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Shawrma 200$", 840, 604, 1010, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Potato 100$", 1097, 604, 1267, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
    end

ومشكورين مسبقاً يجماعة 😁

 

-- Gui Code 

GUIEditor = { staticimage = {} }

hamrger = guiCreateButton(568, 589, 209, 106, "", false)
shwrma = guiCreateButton(824, 589, 208, 105, "", false)
potato = guiCreateButton(1078, 590, 208, 104, "", false)
exit = guiCreateButton(1287, 385, 32, 30, "", false)
GUIEditor.staticimage[1] = guiCreateStaticImage(568, 413, 210, 154, "hamburger.png", false)
GUIEditor.staticimage[2] = guiCreateStaticImage(824, 413, 208, 154, "shawarma.png", false)
GUIEditor.staticimage[3] = guiCreateStaticImage(1077, 415, 209, 152, "potato.png", false)
guiSetVisible(GUIEditor.staticimage[1], false)
guiSetVisible(GUIEditor.staticimage[2], false)
guiSetVisible(GUIEditor.staticimage[3], false)
guiSetVisible(hamrger, false)
guiSetVisible(shwrma, false)
guiSetVisible(potato, false)
guiSetVisible(exit, false)
guiSetAlpha(hamrger, 0)
guiSetAlpha(shwrma, 0)
guiSetAlpha(potato, 0)
guiSetAlpha(exit, 0)


-- Dx Code

function dx()
        dxDrawImage(1280, 376, 43, 44, "close.png", 0, 0, 0, tocolor(131, 126, 123, 255), false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(776, 695, 566, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(778, 695, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(823, 588, 1032, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1077, 588, 1286, 588, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1032, 694, 822, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1032, 589, 1032, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(823, 588, 823, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1077, 589, 1077, 695, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1286, 588, 1286, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawLine(1287, 694, 1077, 694, tocolor(255, 255, 255, 255), 1, false)
        dxDrawText("Hamburger 300$", 586, 602, 756, 672, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Shawrma 200$", 840, 604, 1010, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
        dxDrawText("Potato 100$", 1097, 604, 1267, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)
    end
	


-- فتح النافذة + الماركر

local Marker = createMarker(x, y, z, "cylinder", 1, 255, 255, 0, 255)

addEventHandler ( "onClientMarkerHit", Marker,function ( player )
		if ( player == localPlayer and getElementType ( player ) == "player" ) then
		showCursor ( true ) 
		guiSetVisible(GUIEditor.staticimage[1], true)
		guiSetVisible(GUIEditor.staticimage[2], true)
		guiSetVisible(GUIEditor.staticimage[3], true)
		guiSetVisible(hamrger, true)
		guiSetVisible(shwrma, true)
		guiSetVisible(potato, true)
		guiSetVisible(exit, true)
		addEventHandler("onClientRender", getRootElement(), dx)
		end
	end
)

-- زر اغلاق النافذة 

addEventHandler("onClientGUIClick", getRootElement(),
function()
	if source == exit then
	guiSetVisible(GUIEditor.staticimage[1], false)
	guiSetVisible(GUIEditor.staticimage[2], false)
	guiSetVisible(GUIEditor.staticimage[3], false)
	guiSetVisible(hamrger, false)
	guiSetVisible(shwrma, false)
	guiSetVisible(potato, false)
	guiSetVisible(exit, false)
	showCursor ( false ) 
	removeEventHandler("onClientRender", getRootElement(), dx)
	end
end
)

 

Share this post


Link to post
On 05/10/2019 at 23:10, Do_De<3 said:

 


-- Gui Code GUIEditor = { staticimage = {} }hamrger = guiCreateButton(568, 589, 209, 106, "", false)shwrma = guiCreateButton(824, 589, 208, 105, "", false)potato = guiCreateButton(1078, 590, 208, 104, "", false)exit = guiCreateButton(1287, 385, 32, 30, "", false)GUIEditor.staticimage[1] = guiCreateStaticImage(568, 413, 210, 154, "hamburger.png", false)GUIEditor.staticimage[2] = guiCreateStaticImage(824, 413, 208, 154, "shawarma.png", false)GUIEditor.staticimage[3] = guiCreateStaticImage(1077, 415, 209, 152, "potato.png", false)guiSetVisible(GUIEditor.staticimage[1], false)guiSetVisible(GUIEditor.staticimage[2], false)guiSetVisible(GUIEditor.staticimage[3], false)guiSetVisible(hamrger, false)guiSetVisible(shwrma, false)guiSetVisible(potato, false)guiSetVisible(exit, false)guiSetAlpha(hamrger, 0)guiSetAlpha(shwrma, 0)guiSetAlpha(potato, 0)guiSetAlpha(exit, 0)-- Dx Codefunction dx()        dxDrawImage(1280, 376, 43, 44, "close.png", 0, 0, 0, tocolor(131, 126, 123, 255), false)        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(776, 695, 566, 695, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(509, 378, 1319, 378, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(509, 378, 509, 731, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(508, 731, 1319, 731, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(1319, 378, 1319, 731, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(777, 589, 777, 695, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(778, 695, 568, 695, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(568, 588, 568, 695, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(569, 588, 778, 588, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(823, 588, 1032, 588, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(1077, 588, 1286, 588, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(1032, 694, 822, 694, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(1032, 589, 1032, 695, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(823, 588, 823, 694, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(1077, 589, 1077, 695, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(1286, 588, 1286, 694, tocolor(255, 255, 255, 255), 1, false)        dxDrawLine(1287, 694, 1077, 694, tocolor(255, 255, 255, 255), 1, false)        dxDrawText("Hamburger 300$", 586, 602, 756, 672, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)        dxDrawText("Shawrma 200$", 840, 604, 1010, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)        dxDrawText("Potato 100$", 1097, 604, 1267, 674, tocolor(255, 255, 255, 255), 1.50, "default", "center", "center", false, false, false, false, false)    end	-- فتح النافذة + الماركرlocal Marker = createMarker(x, y, z, "cylinder", 1, 255, 255, 0, 255)addEventHandler ( "onClientMarkerHit", Marker,function ( player )		if ( player == localPlayer and getElementType ( player ) == "player" ) then		showCursor ( true ) 		guiSetVisible(GUIEditor.staticimage[1], true)		guiSetVisible(GUIEditor.staticimage[2], true)		guiSetVisible(GUIEditor.staticimage[3], true)		guiSetVisible(hamrger, true)		guiSetVisible(shwrma, true)		guiSetVisible(potato, true)		guiSetVisible(exit, true)		addEventHandler("onClientRender", getRootElement(), dx)		end	end)-- زر اغلاق النافذة addEventHandler("onClientGUIClick", getRootElement(),function()	if source == exit then	guiSetVisible(GUIEditor.staticimage[1], false)	guiSetVisible(GUIEditor.staticimage[2], false)	guiSetVisible(GUIEditor.staticimage[3], false)	guiSetVisible(hamrger, false)	guiSetVisible(shwrma, false)	guiSetVisible(potato, false)	guiSetVisible(exit, false)	showCursor ( false ) 	removeEventHandler("onClientRender", getRootElement(), dx)	endend)

 

مشكور يبعدي ما قصرت

Share this post


Link to post

للافاده

اليوزفل

-- Color
    function SetButtonColor(element,property,r,g,b)
      
                             if getElementType(element) == 'gui-button' then
                         guiSetProperty(element , property, string.format("%.2X%.2X%.2X%.2X",r,g,b,255))
 
                          end
    
                 end

-- button

    function buttonDx(element,x_,y_,w_,h_)

            s = 1

                    x, y, w, h = x_,y_,w_,h_

                        dxDrawRectangle(x, y, w, h, tocolor(6, 137, 244, 200), false)

                            buttonLine = tocolor(7,7,7, 255)

                        dxDrawLine(x - 1, y - 1, x - 1, h+y, buttonLine, s, false)
     
   
                                dxDrawLine(w+x, y - 1, x - 1, y - 1,buttonLine, s, false)
   

                            dxDrawLine(x - 1, h+y, w+x, h+y, buttonLine, s, false)
        

                dxDrawLine(w+x, h+y, w+x, y - 1, buttonLine, s, false)

        local r, g, b = getColorFromString("#"..guiGetProperty(element, "NormalTextColour"))

    dxDrawText(guiGetText (element), x,y, w+x, h+y,tocolor(r,g,b, 255), 1,"default-bold", "center", "center", false, false, false, false, false)

        
end
-- Window

    function WindowDx(element,x, y, w, h)

        s = 7


                guiWindowSetSizable(element, false)

                dxDrawRectangle(x, y, w, h, tocolor(255, 255, 255, 200), false)

                    dxDrawRectangle(x, y, w, 20%h, tocolor(9,9,9,255) , false)

            WindowLine = tocolor(7,7,7, 255)

        dxDrawLine(x - 1, y - 2, x - 1, h+y, WindowLine, s, false)
    
    
            dxDrawLine(w+x, y + 20, x - 1, y + 20,WindowLine, s, false)
   
          
        dxDrawLine(w+x, y + 2, x - 1, y - 1,WindowLine, s, false)
   

            dxDrawLine(x - 3, h+y, w+x+3, h+y, WindowLine, s, false)
        

                dxDrawLine(w+x, h+y, w+x, y - 1, WindowLine, s, false)

            dxDrawText(guiGetText (element), x,y, w+x, 20%h+y, tocolor(255,255,255, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false)

                end

        

-- Image
       function ImageDx(x_, y_, w_, h_,guiStaticImage)
                colorl = tocolor(7,7,7, 255)

                x, y, w, h = x_,y_,w_,h_

                dxDrawImage (x, y, w, h,guiStaticImage..'.png', 0, 0, 0 )

                s = 1.5

                      dxDrawLine(x - 1, y - 1, x - 1, h+y, colorl, s, false)
        

                 dxDrawLine(w+x, y - 1, x - 1, y - 1,colorl, s, false)
   
 
                     dxDrawLine(x - 1, h+y, w+x, h+y, colorl, s, false)
        

                 dxDrawLine(w+x, h+y, w+x, y - 1, colorl, s, false)
                end
-- Position

                function GetPosition(n)

                   X,Y = guiGetPosition(n , false) 

                         w,h  = guiGetSize (n , false )

                -- guiMoveToBack( n )

                    guiSetAlpha(n, 0)   

                            return X,Y ,w,h  

                end

addEventHandler( "onClientMouseEnter",getResourceGUIElement(getThisResource()),function ()
SetButtonColor(source,'NormalTextColour',200, 200, 200)
    end)
addEventHandler( "onClientMouseLeave",getResourceGUIElement(getThisResource()),function ()
SetButtonColor(source,'NormalTextColour',110 , 110, 110)

    end)
addEventHandler( "onClientGUIMouseDown", getResourceGUIElement(getThisResource()),function ()
SetButtonColor(source,'NormalTextColour',110 , 110, 110)

    end)
addEventHandler( "onClientGUIMouseUp", getResourceGUIElement(getThisResource()),function ()
SetButtonColor(source,'NormalTextColour',200, 200, 200)
    end)

اكواد اللوحه

--- Gui Element
local screenW, screenH = guiGetScreenSize()
Wind = guiCreateWindow((screenW - 849) / 2, (screenH - 364) / 2, 849, 364, "Food", false)
guiWindowSetSizable(Wind, false)
staticimage1 = guiCreateStaticImage(9, 27, 266, 247, "images/1.png", false, Wind)
staticimage2 = guiCreateStaticImage(291, 27, 266, 247, "images/2.png", false, Wind)
staticimage3 = guiCreateStaticImage(573, 27, 266, 247, "images/3.png", false, Wind)
Hamburger = guiCreateButton(9, 279, 266, 48, "Hamburger 300$", false, Wind)
Shawrma = guiCreateButton(291, 279, 266, 48, "Shawrma 200$", false, Wind)
Potato = guiCreateButton(573, 279, 266, 48, "Potato 100$", false, Wind)
Close = guiCreateButton(9, 327, 830, 25, "X Close X", false, Wind)
--- color Button

for k,element in ipairs(getElementsByType('gui-button',getResourceGUIElement(getThisResource()))) do
SetButtonColor(element,'NormalTextColour',110 , 110, 110)
end
guiSetVisible(Wind,false )

--- Create dx
addEventHandler("onClientRender",root,function ()
if ( guiGetVisible (Wind) == true ) then
local x, y, w, h = GetPosition(Wind)
WindowDx(Wind,x, y, w, h)
buttonDx(Hamburger,x+9, y+279, 266, 48)
buttonDx(Shawrma,x+291, y+279, 266, 48)
buttonDx(Potato,x+573, y+279, 266, 48)
buttonDx(Close,x+9, y+330, 830, 25)
ImageDx(x+9, y+29, 266, 247,"images/1")
ImageDx(x+291, y+29, 266, 247,"images/2")
ImageDx(x+573, y+29, 266, 247,"images/3")
end
end)

bindKey( "x", "down",function( )
guiSetVisible(Wind,not guiGetVisible( Wind))
showCursor( guiGetVisible( Wind))
end)


addEventHandler ( "onClientGUIClick",root, function ( )
    if source == Close then
guiSetVisible(Wind,false)
showCursor( false)

    end
end)

او ممكن تحمله  

download-zip

تفتح اللوحه حرف x

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.