Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.92 KB | None | 0 0
  1. AddCSLuaFile()
  2.  
  3. if CLIENT then
  4.  
  5. function landingmenu()
  6.         if vgui.CursorVisible() then return end
  7.  
  8.         local Menu = vgui.Create( "DFrame" )
  9.             Menu:SetPos( 0, 0 )
  10.             Menu:SetSize( ScrW() / 2, ScrH() / 1 )
  11.             Menu:SetTitle( "" )
  12.             Menu:SetDraggable( false )
  13.             Menu:Center()
  14.             Menu:SetBackgroundBlur( true )
  15.             Menu:ShowCloseButton( false )
  16.             Menu.Paint = function() -- The paint function
  17.             surface.SetDrawColor( 0, 0, 0, 0 ) -- What color do You want to paint the button (R, B, G, A)
  18.             surface.DrawRect( 0, 0, Menu:GetWide(), Menu:GetTall() )
  19.         end
  20.            
  21.        
  22.  
  23.         local img_text = vgui.Create( "DImage", Menu )
  24.             img_text:SetPos( ScrW() * 0.12, ScrH() * 0.25 )
  25.             img_text:SetSize( ScrW() / 4, ScrH() / 1.8 )
  26.             img_text:SetImage( "lande_menu.png" )
  27.            
  28.  
  29.         local DermaButton = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  30.             DermaButton:MakePopup()
  31.             DermaButton:SetText( "Schließen" )                 // Set the text on the button
  32.             DermaButton:SetTextColor( Color( 255, 255, 255 ) )
  33.             DermaButton:SetPos( ScrW() * 0.405, ScrH() * 0.78 )                 // Set the position on the frame
  34.             DermaButton:SetSize( ScrW() / 6, ScrH() / 16 )                  // Set the size
  35.             DermaButton:SetFont( "Trebuchet24" )
  36.             DermaButton.Paint = function() -- The paint function
  37.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  38.             surface.DrawRect( 0, 0, DermaButton:GetWide(), DermaButton:GetTall() )
  39.         end
  40.             DermaButton.DoClick = function()
  41.             surface.PlaySound( "UI/buttonclick.wav" )
  42.             Menu:Close()
  43.         end
  44.  
  45.         local Landung_Korriban = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  46.             Landung_Korriban:MakePopup()
  47.             Landung_Korriban:SetText( "Korriban" )                  // Set the text on the button
  48.             Landung_Korriban:SetTextColor( Color( 255, 255, 255 ) )
  49.             Landung_Korriban:SetPos( ScrW() * 0.43, ScrH() * 0.398 )                // Set the position on the frame
  50.             Landung_Korriban:SetSize( ScrW() / 8, ScrH() / 37 )                     // Set the size
  51.             Landung_Korriban:SetFont( "Trebuchet24" )
  52.             Landung_Korriban.Paint = function() -- The paint function
  53.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  54.             surface.DrawRect( 0, 0, Landung_Korriban:GetWide(), Landung_Korriban:GetTall() )
  55.         end
  56.             Landung_Korriban.DoClick = function()
  57.             surface.PlaySound( "UI/buttonclick.wav" )
  58.             RunConsoleCommand( "say", "/akt Landung auf Korriban" )
  59.             Menu:Close()
  60.         end
  61.        
  62.         local Landung_Tython = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  63.             Landung_Tython:MakePopup()
  64.             Landung_Tython:SetText( "Tython" )                  // Set the text on the button
  65.             Landung_Tython:SetTextColor( Color( 255, 255, 255 ) )
  66.             Landung_Tython:SetPos( ScrW() * 0.43, ScrH() * 0.447 )                  // Set the position on the frame
  67.             Landung_Tython:SetSize( ScrW() / 8, ScrH() / 37 )                       // Set the size
  68.             Landung_Tython:SetFont( "Trebuchet24" )
  69.             Landung_Tython.Paint = function() -- The paint function
  70.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  71.             surface.DrawRect( 0, 0, Landung_Tython:GetWide(), Landung_Tython:GetTall() )
  72.         end
  73.             Landung_Tython.DoClick = function()
  74.             surface.PlaySound( "UI/buttonclick.wav" )
  75.             RunConsoleCommand( "say", "/akt Landung auf Tython" )
  76.             Menu:Close()
  77.         end
  78.        
  79.         local Landung_Geonosis = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  80.             Landung_Geonosis:MakePopup()
  81.             Landung_Geonosis:SetText( "Geonosis" )                  // Set the text on the button
  82.             Landung_Geonosis:SetTextColor( Color( 255, 255, 255 ) )
  83.             Landung_Geonosis:SetPos( ScrW() * 0.43, ScrH() * 0.496 )                // Set the position on the frame
  84.             Landung_Geonosis:SetSize( ScrW() / 8, ScrH() / 37 )                 // Set the size
  85.             Landung_Geonosis:SetFont( "Trebuchet24" )
  86.             Landung_Geonosis.Paint = function() -- The paint function
  87.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  88.             surface.DrawRect( 0, 0, Landung_Geonosis:GetWide(), Landung_Geonosis:GetTall() )
  89.         end
  90.             Landung_Geonosis.DoClick = function()
  91.             surface.PlaySound( "UI/buttonclick.wav" )
  92.             RunConsoleCommand( "say", "/akt Landung auf Geonosis" )
  93.             Menu:Close()
  94.         end
  95.        
  96.         local Landung_Tatooine = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  97.             Landung_Tatooine:MakePopup()
  98.             Landung_Tatooine:SetText( "Tatooine" )                  // Set the text on the button
  99.             Landung_Tatooine:SetTextColor( Color( 255, 255, 255 ) )
  100.             Landung_Tatooine:SetPos( ScrW() * 0.43, ScrH() * 0.545 )                // Set the position on the frame
  101.             Landung_Tatooine:SetSize( ScrW() / 8, ScrH() / 37 )                 // Set the size
  102.             Landung_Tatooine:SetFont( "Trebuchet24" )
  103.             Landung_Tatooine.Paint = function() -- The paint function
  104.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  105.             surface.DrawRect( 0, 0, Landung_Tatooine:GetWide(), Landung_Tatooine:GetTall() )
  106.         end
  107.             Landung_Tatooine.DoClick = function()
  108.             surface.PlaySound( "UI/buttonclick.wav" )
  109.             RunConsoleCommand( "say", "/akt Landung auf Tatooine" )
  110.             Menu:Close()
  111.         end
  112.        
  113.         local Landung_Hoth = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  114.             Landung_Hoth:MakePopup()
  115.             Landung_Hoth:SetText( "Hoth" )                  // Set the text on the button
  116.             Landung_Hoth:SetTextColor( Color( 255, 255, 255 ) )
  117.             Landung_Hoth:SetPos( ScrW() * 0.43, ScrH() * 0.594 )                    // Set the position on the frame
  118.             Landung_Hoth:SetSize( ScrW() / 8, ScrH() / 37 )                 // Set the size
  119.             Landung_Hoth:SetFont( "Trebuchet24" )
  120.             Landung_Hoth.Paint = function() -- The paint function
  121.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  122.             surface.DrawRect( 0, 0, Landung_Hoth:GetWide(), Landung_Hoth:GetTall() )
  123.         end
  124.             Landung_Hoth.DoClick = function()
  125.             surface.PlaySound( "UI/buttonclick.wav" )
  126.             RunConsoleCommand( "say", "/akt Landung auf Hoth" )
  127.             Menu:Close()
  128.         end
  129.        
  130.         local Landung_Asteroid = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  131.             Landung_Asteroid:MakePopup()
  132.             Landung_Asteroid:SetText( "Asteroid" )                  // Set the text on the button
  133.             Landung_Asteroid:SetTextColor( Color( 255, 255, 255 ) )
  134.             Landung_Asteroid:SetPos( ScrW() * 0.43, ScrH() * 0.643 )                        // Set the position on the frame
  135.             Landung_Asteroid:SetSize( ScrW() / 8, ScrH() / 37 )                 // Set the size
  136.             Landung_Asteroid:SetFont( "Trebuchet24" )
  137.             Landung_Asteroid.Paint = function() -- The paint function
  138.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  139.             surface.DrawRect( 0, 0, Landung_Asteroid:GetWide(), Landung_Asteroid:GetTall() )
  140.         end
  141.             Landung_Asteroid.DoClick = function()
  142.             surface.PlaySound( "UI/buttonclick.wav" )
  143.             RunConsoleCommand( "say", "/akt Landung auf der Asteoriden Basis" )
  144.             Menu:Close()
  145.         end
  146.        
  147.         local Landung_Illum = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  148.             Landung_Illum:MakePopup()
  149.             Landung_Illum:SetText( "Illum" )                    // Set the text on the button
  150.             Landung_Illum:SetTextColor( Color( 255, 255, 255 ) )
  151.             Landung_Illum:SetPos( ScrW() * 0.43, ScrH() * 0.692 )                       // Set the position on the frame
  152.             Landung_Illum:SetSize( ScrW() / 8, ScrH() / 37 )                    // Set the size
  153.             Landung_Illum:SetFont( "Trebuchet24" )
  154.             Landung_Illum.Paint = function() -- The paint function
  155.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  156.             surface.DrawRect( 0, 0, Landung_Illum:GetWide(), Landung_Illum:GetTall() )
  157.         end
  158.             Landung_Illum.DoClick = function()
  159.             surface.PlaySound( "UI/buttonclick.wav" )
  160.             RunConsoleCommand( "say", "/akt Landung auf Illum" )
  161.             Menu:Close()
  162.         end
  163.        
  164.         local Landung_Endor = vgui.Create( "DButton", Menu ) // Create the button and parent it to the frame
  165.             Landung_Endor:MakePopup()
  166.             Landung_Endor:SetText( "Endor" )                    // Set the text on the button
  167.             Landung_Endor:SetTextColor( Color( 255, 255, 255 ) )
  168.             Landung_Endor:SetPos( ScrW() * 0.43, ScrH() * 0.741 )                       // Set the position on the frame
  169.             Landung_Endor:SetSize( ScrW() / 8, ScrH() / 37 )                    // Set the size
  170.             Landung_Endor:SetFont( "Trebuchet24" )
  171.             Landung_Endor.Paint = function() -- The paint function
  172.             surface.SetDrawColor( 0, 0, 0, 255 ) -- What color do You want to paint the button (R, B, G, A)
  173.             surface.DrawRect( 0, 0, Landung_Endor:GetWide(), Landung_Endor:GetTall() )
  174.         end
  175.             Landung_Endor.DoClick = function()
  176.             surface.PlaySound( "UI/buttonclick.wav" )
  177.             RunConsoleCommand( "say", "/akt Landung auf Endor" )
  178.             Menu:Close()
  179.         end
  180. end
  181.  
  182.  
  183. local alreadyopen = false
  184. hook.Add( "Tick", "landingmenutoggle", function()
  185.    if (input.IsKeyDown(KEY_K) and alreadyopen == false) then
  186.     landingmenu()
  187.     alreadyopen = true
  188.     timer.Simple(1,function()
  189.    alreadyopen = false
  190.    end)
  191.    end
  192.  end)
  193. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement