Jump to content

ابي كود زر يفتح لوحه


baba

Recommended Posts

سلام عليكم شباب

بوضح الطلب

انا الحين عندي لوحه وحاط في الوحه زر

بي اذا ضغط على الزر يفتح لي وحه كمان

وابي كود زر لي اغلاق الوحه

Link to comment

فتح هذه لو بلوحة ثانيه يعني الماوس يكون موجود

لو مختفي

showCursor ( true )

addEventHandler ( "onClientGUIClick", open, function ()  
guiSetVisible(win, true) 
end) 

اغلاق

addEventHandler ( "onClientGUIClick", x, function () 
guiSetVisible(win, false) 
showCursor ( false ) 
end) 
  
  

Link to comment

This Code By ZA7F

bindKey ( "الزر المطلوب", "down", function (   ) 
      guiSetVisible ( اسم النافذه, not guiGetVisible ( اسم النافذه ) ) 
      showCursor ( guiGetVisible ( اسم النافذه ) ) 
end ) 

Edited by Guest
Link to comment
This Code By ZA7F
bindKey ( "الزر المطلوب", "down", function (   ) 
      guiSetVisible ( اسم النافذه, not guiGetVisible ( اسم النافذه ) ) 
      showCursor ( guiGetVisible ( اسم النافذه ) ) 
end ) 

سلام عليكم شباب

بوضح الطلب

انا الحين عندي لوحه وحاط في الوحه زر

بي اذا ضغط على الزر يفتح لي وحه كمان

وابي كود زر لي اغلاق الوحه

Link to comment

معليش مانتبهت هههههههههه

اذا عندك لوحه وفيها زر وتبي اذا ضغطت الزر تطلع لوحه ثانيه ؟ هذا الكود

addEventHandler("onClientGUIClick", root, function (    ) 
    if ( source == اسم الزر ) then -- اسم الزر الي اذا ضغطته تطلع لوحه 
        اسم اللوحه = guiCreateWindow ( 535, 113, 242, 193, "....", false ) -- لوحه 
        guiSetVisible ( اسم اللوحه, true ) -- اظهار اللوحه 
    end 
end ) 

كود اغلاق النافذه

addEventHandler ( "onClientGUIClick", root, function (    ) 
    if ( source == اسم الزر ) then -- تحقق من الزر 
        guiSetVisible (   اسم اللوحه, false ) -- اخفاء اللوحه 
        showCursor ( false ) --   اخفاء الماوس 
    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...