Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. include( 'init.lua' )
  2. include( 'shared.lua' )
  3.  
  4.  
  5. // Spawn-menu
  6.  
  7. function teamselect()
  8.  
  9.  
  10. local DermaPanel = vgui.Create( "DFrame" )
  11. DermaPanel:Center()
  12. DermaPanel:SetSize( 400, 300 )
  13. DermaPanel:SetTitle( "Information" )
  14. DermaPanel:SetVisible( true )
  15. DermaPanel:SetDraggable( false )
  16. DermaPanel:ShowCloseButton( false )
  17. DermaPanel:MakePopup()
  18.    DermaPanel.Paint = function() -- The paint function
  19.    surface.SetDrawColor( 30, 30, 30, 200 ) -- What color ( R, B, G, A )
  20.    surface.DrawRect( 0, 0, 400, 700 ) -- How big is it (cords)
  21.    end
  22.  
  23. local TestingPanel = vgui.Create( "DPanel", DermaPanel )
  24. TestingPanel:SetPos( 25, 50 )
  25. TestingPanel:SetSize( 350, 225 )
  26. TestingPanel.Paint = function()
  27.     surface.SetDrawColor( 127, 127, 127, 255 )
  28.     surface.DrawRect( 0, 0, TestingPanel:GetWide(), TestingPanel:GetTall() )
  29. end
  30.  
  31. local button = vgui.Create( "DButton", TestingPanel )
  32.     button:SetSize( 100, 50 )
  33.     button:SetPos( 25, 75 )
  34.     button:SetText( "Spawn" )
  35.     button.DoClick = function( button )
  36.         soldierspawn()
  37.         DermaPanel:Close()
  38.        
  39.     end
  40.  
  41. local buttonx = vgui.Create( "DButton", TestingPanel )
  42.     buttonx:SetSize( 100, 50 )
  43.     buttonx:SetPos( 225, 75 )
  44.     buttonx:SetText( "Spectate" )
  45.     buttonx.DoClick = function( button )
  46.         DermaPanel:Close()
  47.        
  48.     end
  49.  
  50.  
  51. end
  52.  
  53. concommand.Add( "nazi_teammenu", teamselect )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement