Advertisement
trickstarog

Untitled

Jun 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. local PANEL = {
  2. Init = function( self )
  3. self:SetSize(1000,500 )
  4. self:Center()
  5. self:SetVisible( true )
  6.  
  7. local x, y = self:GetSize()
  8.  
  9. surface.SetFont( "DermaLarge" )
  10. local titleX, titleY = surface.GetTextSize( "DarkRP F4Menu" )
  11.  
  12. local title = vgui.Create( "DLabel", self)
  13. title:SetText( "DarkRPF4Menu" )
  14. title:SetSize(titleX, titleY)
  15. title:SetPos( 20, 6 )
  16. title:SetFont( "DermaLarge" )
  17. title:SetTextColor( Color(255,255,255,255) )
  18.  
  19. local closebutton = vgui.Create( "DButton", self)
  20. closebutton:SetText( "Close" )
  21. closebutton:SetSize(75, 25)
  22. closebutton:SetPos( x-81, 6)
  23. closebutton.Paint = function(self, w, h)
  24. surface.SetDrawColor( 30,30,30, 50)
  25. surface.DrawRect( 0, 0, w, h )
  26. surface.SetDrawColor( 20,20,20, 150)
  27. surface.DrawOutlinedRect( 0, 0, w, h )
  28.  
  29. end
  30. closebutton.DoClick = function()
  31. CSF4Menu:SetVisible( false )
  32. gui.EnableScreenClicker( false )
  33. end
  34.  
  35. local removebutton = vgui.Create( "DButton", self)
  36. removebutton:SetText( "Remove" )
  37. removebutton:SetSize(75, 25)
  38. removebutton:SetPos( x-162, 6)
  39. removebutton.Paint = function(self, w, h)
  40. surface.SetDrawColor( 30,30,30, 50)
  41. surface.DrawRect( 0, 0, w, h )
  42. surface.SetDrawColor( 20,20,20, 150)
  43. surface.DrawOutlinedRect( 0, 0, w, h )
  44.  
  45. end
  46. removebutton.DoClick = function()
  47. gui.EnableScreenClicker( false )
  48. CSF4Menu:Remove()
  49. CSF4Menu = vgui.Create( "cs_f4_menu" )
  50. CSF4Menu:SetVisible( false )
  51. end
  52.  
  53. local pagesback = vgui.Create( "DPanel" , self )
  54. pagesback:SetPos( 6, 37 )
  55. pagesback:SetSize( x - 12, y - 43 )
  56. pagesback.Paint = function( self, w, h )
  57. surface.SetDrawColor( 30, 30, 30, 150 )
  58. surface.DrawRect( 0, 0, w, h )
  59.  
  60. end
  61.  
  62. local pages = vgui.Create( "DColumnSheet", pagesback )
  63. pages:Dock ( FILL )
  64.  
  65. local jobs = vgui.Create( "DPanel" , pages )
  66. jobs:Dock( FILL )
  67. jobs.Paint = function(self, w, h )
  68. surface.SetDrawColor( 30, 30, 30, 150 )
  69. surface.DrawRect( 0, 0, w, h )
  70. end
  71.  
  72. pages:AddSheet( "Jobs", jobs, "icon16/user.png" )
  73.  
  74. local shop = vgui.Create( "DPanel" , pages )
  75. shop:Dock( FILL )
  76. shop.Paint = function(self, w, h )
  77. surface.SetDrawColor( 30, 30, 30, 150 )
  78. surface.DrawRect( 0, 0, w, h )
  79. end
  80.  
  81. pages:AddSheet( "Shop", shop, "icon16/basket.png" )
  82.  
  83. local commands = vgui.Create( "DPanel" , pages )
  84. commands:Dock( FILL )
  85. commands.Paint = function(self, w, h )
  86. surface.SetDrawColor( 30, 30, 30, 150 )
  87. surface.DrawRect( 0, 0, w, h )
  88. end
  89.  
  90. pages:AddSheet( "Commands", commands, "icon16/application_xp_terminal.png" )
  91.  
  92.  
  93. end,
  94.  
  95.  
  96. Paint = function( self, w, h )
  97. surface.SetDrawColor( 50,50,50, 150)
  98. surface.DrawRect( 0, 0, w, h )
  99. surface.DrawOutlinedRect( 2, 2, w - 4, h - 4 )
  100.  
  101. end
  102.  
  103. }
  104. vgui.Register( "cs_f4_menu", PANEL)
  105.  
  106. timer.Simple( 2, function()
  107. GAMEMODE.ShowSpare2 = openF4
  108. end )
  109.  
  110. concommand.Add("open_f4", function()
  111. openF4()
  112. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement