Jump to content

Setting server [ تعديل ]


Recommended Posts

السلام عليكم ورحمة الله وبركاته

انا مسوي ذا الكود عشان اتدرب وكذا

المهم عندي 3 بوتون و 2 اديت

حطيت عند 2 بوتون 2 ايديت

ابي لما يحط رقم بالايديت ويضغط البوتون

يتغير الحجم

:D

addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        wnd = guiCreateWindow((screenW - 428) / 2, (screenH - 260) / 2, 428, 260, "Setting Server", false) 
        guiWindowSetSizable(wnd, false) 
        guiSetVisible(wnd,false) 
        guiSetAlpha(wnd, 1.00) 
  
        bbb1 = guiCreateButton(10, 28, 124, 54, "Change Moon Size", false, wnd) 
        guiSetProperty(bbb1, "NormalTextColour", "FFFFFEFE") 
        bbb2 = guiCreateButton(152, 28, 124, 54, "create Marker", false, wnd) 
        guiSetProperty(bbb2, "NormalTextColour", "FFFFFEFE") 
        bbb3 = guiCreateButton(294, 28, 124, 54, "Change Sun Size", false, wnd) 
        guiSetProperty(bbb3, "NormalTextColour", "FFFFFEFE") 
        eee1 = guiCreateEdit(10, 98, 124, 48, "", false, wnd) 
        eee2 = guiCreateEdit(294, 98, 124, 48, "", false, wnd) 
        Close = guiCreateButton(152, 197, 124, 53, "Close", false, wnd) 
        guiSetProperty(Close, "NormalTextColour", "FFFFFEFE")     
    end 
) 
  
------------------------------------------------- 
bindKey("F5", "down", 
function() 
    guiSetVisible(wnd, not guiGetVisible(wnd)) 
    showCursor(guiGetVisible(wnd)) 
end) 
------------------------------------------------- 
  
  
addEventHandler("onClientGUIClick",root, 
       function() 
      if source == bbb2 then 
createMarker ( -2424.584, -607.5998, 132.5625, "cylinder", 1.5, 255, 0, 0, 170 ) 
     end 
end 
) 
  
  
------------------------------------------------- 
  
  
  
addEventHandler("onClientGUIClick",root, 
       function() 
      if source == bbb1 then 
setSunSize ( 5 ) 
     end 
end 
) 
  
  
-------------------------------------------------- 
  
  
addEventHandler("onClientGUIClick",root, 
       function() 
      if source == bbb3 then 
setMoonSize ( 5 ) 
     end 
end 
) 
  
-------------------------------------------------- 
  
  
addEventHandler("onClientGUIClick",root,  
function ()  
if source == Close then  
if(guiGetVisible(wnd) == false)then end 
guiSetVisible(wnd,false) 
showCursor(false) 
guiSetInputEnabled(false) 
end end)  

Link to comment

جرب

local screenW, screenH = guiGetScreenSize() 
wnd = guiCreateWindow((screenW - 428) / 2, (screenH - 260) / 2, 428, 260, "Setting Server", false) 
guiWindowSetSizable(wnd, false) 
guiSetVisible(wnd,false) 
guiSetAlpha(wnd, 1.00) 
bb1 = guiCreateButton(10, 28, 124, 54, "Change Moon Size", false, wnd) 
guiSetProperty(bbb1, "NormalTextColour", "FFFFFEFE") 
bbb2 = guiCreateButton(152, 28, 124, 54, "create Marker", false, wnd) 
guiSetProperty(bbb2, "NormalTextColour", "FFFFFEFE") 
bbb3 = guiCreateButton(294, 28, 124, 54, "Change Sun Size", false, wnd) 
guiSetProperty(bbb3, "NormalTextColour", "FFFFFEFE") 
eee1 = guiCreateEdit(10, 98, 124, 48, "", false, wnd) 
eee2 = guiCreateEdit(294, 98, 124, 48, "", false, wnd) 
Close = guiCreateButton(152, 197, 124, 53, "Close", false, wnd) 
guiSetProperty(Close, "NormalTextColour", "FFFFFEFE")     
  
  
bindKey ( "F5", "down", 
      guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) 
      showCursor ( guiGetVisible ( wnd ) ) 
end ) 
  
  
  
addEventHandler("onClientGUIClick",root, 
         function (   ) 
          
         if source == bb2 then 
          
         createMarker (  -2424.584, -607.5998, 132.5625, "cylinder", 1.5, 255, 0, 0, 170  ) 
      end 
   end 
 ) 
          
  
------------------------------------------------- 
  
addEventHandler("onClientGUIClick",root, 
   function (   ) 
    
         if source == bbb1 then 
    
         setSunSize ( 5 ) 
      end 
  end ) 
    
  
addEventHandler("onClientGUIClick",root, 
   function (   ) 
    
         if source == bbb3 then 
    
         setSunSize ( 5 ) 
      end 
  end ) 
    
  
  
addEventHandler("onClientGUIClick",root, 
   function (   ) 
     
         if source == Close then 
         guiSetVisible ( wnd, false ) 
         showCursor (  false ) 
         guiSetInputEnabled(false) 
    end 
end ) 
  
  
Link to comment
جرب

local screenW, screenH = guiGetScreenSize() 
wnd = guiCreateWindow((screenW - 428) / 2, (screenH - 260) / 2, 428, 260, "Setting Server", false) 
guiWindowSetSizable(wnd, false) 
guiSetVisible(wnd,false) 
guiSetAlpha(wnd, 1.00) 
bb1 = guiCreateButton(10, 28, 124, 54, "Change Moon Size", false, wnd) 
guiSetProperty(bbb1, "NormalTextColour", "FFFFFEFE") 
bbb2 = guiCreateButton(152, 28, 124, 54, "create Marker", false, wnd) 
guiSetProperty(bbb2, "NormalTextColour", "FFFFFEFE") 
bbb3 = guiCreateButton(294, 28, 124, 54, "Change Sun Size", false, wnd) 
guiSetProperty(bbb3, "NormalTextColour", "FFFFFEFE") 
eee1 = guiCreateEdit(10, 98, 124, 48, "", false, wnd) 
eee2 = guiCreateEdit(294, 98, 124, 48, "", false, wnd) 
Close = guiCreateButton(152, 197, 124, 53, "Close", false, wnd) 
guiSetProperty(Close, "NormalTextColour", "FFFFFEFE")     
  
  
bindKey ( "F5", "down", 
      guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) 
      showCursor ( guiGetVisible ( wnd ) ) 
end ) 
  
  
  
addEventHandler("onClientGUIClick",root, 
         function (   ) 
          
         if source == bb2 then 
          
         createMarker (  -2424.584, -607.5998, 132.5625, "cylinder", 1.5, 255, 0, 0, 170  ) 
      end 
   end 
 ) 
          
  
------------------------------------------------- 
  
addEventHandler("onClientGUIClick",root, 
   function (   ) 
    
         if source == bbb1 then 
    
         setSunSize ( 5 ) 
      end 
  end ) 
    
  
addEventHandler("onClientGUIClick",root, 
   function (   ) 
    
         if source == bbb3 then 
    
         setSunSize ( 5 ) 
      end 
  end ) 
    
  
  
addEventHandler("onClientGUIClick",root, 
   function (   ) 
     
         if source == Close then 
         guiSetVisible ( wnd, false ) 
         showCursor (  false ) 
         guiSetInputEnabled(false) 
    end 
end ) 
  
  

ايش سويت انت كذا ؟

Link to comment

انت تبيه يحط بالايديت بوكس رقم على شان يغير حجم الشمس

ف تسويه كذا

addEventHandler("onClientGUIClick",root, 
       function() 
if source == bbb1 then 
setSunSize ( guiGetText( eee1 ) ) 
     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...