Jump to content

سؤال


Recommended Posts

طيب سؤال ثاني عملت هل لوحه

--[[------------------------------------------------- 
Notes: 
  
> This code is using a relative image filepath. This will only work as long as the location it is from always exists, and the resource it is part of is running. 
    To ensure it does not break, it is highly encouraged to move images into your local resource and reference them there. 
--]]------------------------------------------------- 
bindKey("q", "VIP",  
  
GUIEditor = { 
    button = {}, 
    window = {}, 
    staticimage = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(0, 0, 96, 48, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
  
        GUIEditor.window[2] = guiCreateWindow(175, 59, 381, 485, "[VIP]", false) 
        guiWindowSetSizable(GUIEditor.window[2], false) 
        guiSetAlpha(GUIEditor.window[2], 1.00) 
  
        GUIEditor.staticimage[1] = guiCreateStaticImage(9, 19, 362, 456, ":guieditor/images/examples/gift.png", false, GUIEditor.window[2]) 
  
        GUIEditor.button[1] = guiCreateButton(2, 11, 143, 53, "سيارات", false, GUIEditor.staticimage[1]) 
        GUIEditor.button[2] = guiCreateButton(1, 122, 144, 47, "شخصيات", false, GUIEditor.staticimage[1]) 
        GUIEditor.button[3] = guiCreateButton(4, 268, 141, 45, "حقيبه نفاثه", false, GUIEditor.staticimage[1]) 
        GUIEditor.button[4] = guiCreateButton(1, 387, 144, 46, "درع", false, GUIEditor.staticimage[1]) 
        GUIEditor.button[5] = guiCreateButton(219, 6, 133, 58, "دم", false, GUIEditor.staticimage[1]) 
        GUIEditor.button[6] = guiCreateButton(205, 123, 153, 46, "الانتقال", false, GUIEditor.staticimage[1]) 
        GUIEditor.button[7] = guiCreateButton(232, 254, 126, 55, "الموت", false, GUIEditor.staticimage[1]) 
        GUIEditor.button[8] = guiCreateButton(252, 381, 110, 52, "اصلاح السياره", false, GUIEditor.staticimage[1])     
  
    end 
) 
  

صممت كل اكوادها وعملتهم بس ظل اعرف وين احطهم وين احط اول ما اكبس تطلعلي ممكن تقلي وشو لازم احط لما يكبس البوتون؟

Link to comment

تستخدم ذا الايفينت

"onClientGUIClick" 

حسب ارقام الزر وترقمهاbutton[1] وكذا

وتضيف لها الوضيفه

+

كمثال

شوفف ذا لما تضغط راح يشغل الاغنيه

addEventHandler("onClientGUIClick", root, 
    function() 
        if(source == GUIEditor.button[1])then 
            if(sound)then return end 
            sound = playSound("http://cdn.top4top.net/d_11668d4a9b1.mp3",true) 
        elseif(source == GUIEditor.button[11])then 
            if(sound)then 
                stopSound(sound) 
                sound = nil 
            end 
        end 
    end 
) 
  

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...