Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. --------------------------------------
  2. --- Multi-Purpose Menu
  3. --- Designed and Created by KONSOLEJR
  4. --------------------------------------
  5.  
  6. ----------------
  7. --- Server Side
  8. ----------------
  9.  
  10. if SERVER then
  11. function ulx.admpanel_p2( calling_ply, target_ply )
  12. ULib.clientRPC( target_ply, "ulx.admclient2" )
  13. end
  14. end
  15.  
  16. local admpanel = ulx.command( "", "ulx admpanel_p2", ulx.admpanel_p2 )
  17. admpanel:defaultAccess( ULib.ACCESS_ADMIN )
  18. admpanel:help( "Opens the admin panel page 2." )
  19.  
  20. ----------------
  21. --- Client Side
  22. ----------------
  23. function ulx.admclient2( ply )
  24.  
  25. local Frame = vgui.Create( "DFrame" )
  26. Frame:SetSize(193,750)
  27. Frame:Center()
  28. Frame:SetTitle("Administration Menu: Page 2")
  29. Frame:SetVisible(true)
  30. Frame:SetDraggable(true)
  31. Frame:ShowCloseButton(true)
  32. Frame:MakePopup()
  33. Frame.Paint = function (self, w, h)
  34. draw.RoundedBox(0,0,0,w,h,(Color(0,0,0,255)))
  35. end
  36. -----------------
  37. --- Page Changer
  38. -----------------
  39. local gui = vgui.Create ("DButton", Frame)
  40. gui:SetPos(21,650)
  41. gui:SetSize(50,50)
  42. gui:SetText("<")
  43. gui:SetVisible(true)
  44. function gui:OnMousePressed()
  45. RunConsoleCommand( "ulx", "admpanel_p1" )
  46. Frame:SetVisible(false)
  47. end
  48.  
  49. local gui = vgui.Create ("DButton", Frame)
  50. gui:SetPos(121,650)
  51. gui:SetSize(50,50)
  52. gui:SetText(">")
  53. gui:SetVisible(true)
  54. function gui:OnMousePressed()
  55. RunConsoleCommand( "ulx", "admpanel_p2" )
  56. Frame:SetVisible(false)
  57. end
  58. -------------
  59. --- Commands
  60. -------------
  61.  
  62. local gui = vgui.Create ("DButton", Frame)
  63. gui:SetPos(21,50)
  64. gui:SetSize(150,50)
  65. gui:SetText("Reset the Map -CAUTION-")
  66. gui:SetVisible(true)
  67. function gui:OnMousePressed()
  68. RunConsoleCommand("ulx", "resetmap")
  69. Frame:SetVisible(false)
  70. end
  71.  
  72. local gui = vgui.Create ("DButton", Frame)
  73. gui:SetPos(21,150)
  74. gui:SetSize(150,50)
  75. gui:SetText("Restart the Server -CAUTION-")
  76. gui:SetVisible(true)
  77. function gui:OnMousePressed()
  78. ply:ConCommand("ulx rcon _Restart")
  79. Frame:SetVisible(false)
  80. end
  81. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement