Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.69 KB | None | 0 0
  1.  
  2. surface.CreateFont( "slawer_scoreboard_30", {
  3. font = "Roboto",
  4. extended = false,
  5. size = 22,
  6. weight = 700,
  7. blursize = 0,
  8. scanlines = 0,
  9. antialias = true,
  10. } )
  11.  
  12. surface.CreateFont( "SimpleScoreboard1", {
  13. font = "Roboto",
  14. extended = false,
  15. size = 30,
  16. weight = 500,
  17. blursize = 0,
  18. scanlines = 0,
  19. antialias = true,
  20. })
  21.  
  22.  
  23. local blur = Material("pp/blurscreen")
  24. local function DrawBlur(panel, amount)
  25. local x, y = panel:LocalToScreen(0, 0)
  26. local scrW, scrH = ScrW(), ScrH()
  27. surface.SetDrawColor(255, 255, 255)
  28. surface.SetMaterial(blur)
  29. for i = 1, 3 do
  30. blur:SetFloat("$blur", (i / 3) * (amount or 6))
  31. blur:Recompute()
  32. render.UpdateScreenEffectTexture()
  33. surface.DrawTexturedRect(x * -1, y * -1, scrW, scrH)
  34. end
  35. end
  36.  
  37. local blur = Material("pp/blurscreen")
  38. local function DrawBlur2( p, a, d )
  39. local x, y = p:LocalToScreen(0, 0)
  40. surface.SetDrawColor( 255, 255, 255 )
  41. surface.SetMaterial( blur )
  42. for i = 1, d do
  43. blur:SetFloat( "$blur", (i / d ) * ( a ) )
  44. blur:Recompute()
  45. render.UpdateScreenEffectTexture()
  46. surface.DrawTexturedRect( x * -1, y * -1, ScrW(), ScrH() )
  47. end
  48. end
  49.  
  50. local function drawRectOutline( x, y, w, h, color )
  51. surface.SetDrawColor( color )
  52. surface.DrawOutlinedRect( x, y, w, h )
  53. end
  54.  
  55. hook.Add("ScoreboardShow","dqzdzq", function()
  56. if IsValid(scoframe) then return end
  57. scoframe = vgui.Create("DFrame")
  58. scoframe:SetSize(800,400)
  59. scoframe:Center()
  60. gui.EnableScreenClicker(true)
  61. scoframe:SetTitle("")
  62. scoframe:ShowCloseButton(false)
  63. scoframe:SetDraggable(false)
  64. scoframe.Paint = function(s,w,h)
  65. DrawBlur(s,5)
  66. draw.RoundedBox(0, 0, 50, w, 1, (Color(255,255,255,50)))
  67. drawRectOutline(0, 0, w, h, (Color(255,255,255,50)))
  68. draw.SimpleText(GetHostName(),"SimpleScoreboard1",600, 10, Color(255,255,255,255),TEXT_ALIGN_CENTER)
  69. end
  70.  
  71. local ssettings = vgui.Create( "DImageButton", scoframe )
  72. ssettings:SetPos( 1180, 5)
  73. ssettings:SetImage( "icon16/cog.png" )
  74. ssettings:SizeToContents()
  75. ssettings.DoClick = function()
  76. local frameS = vgui.Create("DPanel", scoframe)
  77. frameS:SetSize(400, 48)
  78. frameS:SetPos(775, 1)
  79. frameS.Paint = function(self, w, h)
  80. DrawBlur2(self, 3, 6)
  81. draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 80))
  82. end
  83.  
  84. local ButtonCU = vgui.Create("DButton", frameS)
  85. ButtonCU:SetSize(90, 40)
  86. ButtonCU:SetPos(5, 5)
  87. ButtonCU:SetText("Clean UP")
  88. ButtonCU:SetTextColor(Color(255,255, 255))
  89. ButtonCU.Paint = function(self, w, h)
  90. DrawBlur2(self, 3, 6)
  91. draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 100))
  92. drawRectOutline(0, 0, w, h, Color(255, 255, 255))
  93. end
  94. function ButtonCU.DoClick()
  95. LocalPlayer():ConCommand("_Fadmin cleanup")
  96. end
  97.  
  98. local ButtonSS = vgui.Create("DButton", frameS)
  99. ButtonSS:SetSize(95, 40)
  100. ButtonSS:SetPos(100, 5)
  101. ButtonSS:SetText("Stop Sound")
  102. ButtonSS:SetTextColor(Color(255,255, 255))
  103. ButtonSS.Paint = function(self, w, h)
  104. DrawBlur2(self, 3, 6)
  105. draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 100))
  106. drawRectOutline(0, 0, w, h, Color(255, 255, 255))
  107. end
  108. function ButtonSS.DoClick()
  109. LocalPlayer():ConCommand("_Fadmin stopsounds")
  110. end
  111.  
  112.  
  113.  
  114. local ButtonCD = vgui.Create("DButton", frameS)
  115. ButtonCD:SetSize(95, 40)
  116. ButtonCD:SetPos(200, 5)
  117. ButtonCD:SetText("Clear Decal")
  118. ButtonCD:SetTextColor(Color(255,255, 255))
  119. ButtonCD.Paint = function(self, w, h)
  120. DrawBlur2(self, 3, 6)
  121. draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 100))
  122. drawRectOutline(0, 0, w, h, Color(255, 255, 255))
  123. end
  124. function ButtonCD.DoClick()
  125. LocalPlayer():ConCommand("_Fadmin cleardecals")
  126. end
  127.  
  128. local ButtonRC = vgui.Create("DButton", frameS)
  129. ButtonRC:SetSize(95, 40)
  130. ButtonRC:SetPos(300 , 5)
  131. ButtonRC:SetText("RCon")
  132. ButtonRC:SetTextColor(Color(255,255, 255))
  133. ButtonRC.Paint = function(self, w, h)
  134. DrawBlur2(self, 3, 6)
  135. draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 100))
  136. drawRectOutline(0, 0, w, h, Color(255, 255, 255))
  137. end
  138. function ButtonRC.DoClick()
  139. LocalPlayer():ConCommand("_Fadmin rcon")
  140. end
  141. end
  142.  
  143. local Scroll = vgui.Create( "DScrollPanel", scoframe )
  144. Scroll:SetSize( scoframe:GetWide() - 4 + 17, scoframe:GetTall() - 28 )
  145. Scroll:SetPos( 2, 52 )
  146.  
  147. local List = vgui.Create( "DIconLayout", Scroll )
  148. List:SetSize( scoframe:GetWide() - 2, 200 )
  149. List:SetPos( 0, 0 )
  150. List:SetSpaceY( 3 )
  151. List:SetSpaceX( 100 )
  152.  
  153. for k, v in pairs(player.GetAll()) do
  154. local ppanel = List:Add( "DPanel")
  155. ppanel:SetSize(796, 50 )
  156. ppanel.Paint = function(s,w,h)
  157. local AvatarP = vgui.Create("AvatarImage", ppanel)
  158. AvatarP:SetSize(50, 46)
  159. AvatarP:SetPos(2, 2 )
  160. AvatarP:SetPlayer(self, 64)
  161.  
  162. draw.RoundedBox(0,0,0,w,h,Color(0,0,0, 150))
  163. draw.SimpleText(v:GetName(),"slawer_scoreboard_30",55,2,Color(230,230,230))
  164. draw.SimpleText(v:getDarkRPVar("job"),"slawer_scoreboard_30",w/2 + 30,15,Color(230,230,230),TEXT_ALIGN_CENTER)
  165. draw.SimpleText("Ping:","slawer_scoreboard_30",w - 110,15,Color(230,230,230),TEXT_ALIGN_CENTER)
  166. if v:Ping() >= 100 then
  167. if v:Ping() >= 175 then
  168. if v:Ping() >= 230 then
  169. draw.SimpleText(v:Ping(),"slawer_scoreboard_30",w - 25,15,Color(230,50,50),TEXT_ALIGN_CENTER)
  170. else
  171. draw.SimpleText(v:Ping(),"slawer_scoreboard_30",w - 25,15,Color(255,150,50),TEXT_ALIGN_CENTER)
  172. end
  173. else
  174. draw.SimpleText(v:Ping(),"slawer_scoreboard_30",w - 25,15,Color(230,230,50),TEXT_ALIGN_CENTER)
  175. end
  176. else
  177. draw.SimpleText(v:Ping(),"slawer_scoreboard_30",w - 25,15,Color(50,230,50),TEXT_ALIGN_CENTER)
  178. end
  179. end
  180. end
  181.  
  182. return false
  183.  
  184. end)
  185.  
  186.  
  187. hook.Add("ScoreboardHide","dqzdzq", function()
  188. if not IsValid(scoframe) then return end
  189. scoframe:Close()
  190. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement