Advertisement
Guest User

Untitled

a guest
May 26th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.64 KB | None | 0 0
  1. include('shared.lua')
  2.  
  3. surface.CreateFont( "arialFont", {
  4. font = "Arial",
  5. extended = false,
  6. size = 56,
  7. weight = 500,
  8. blursize = 0,
  9. scanlines = 0,
  10. antialias = true,
  11. underline = false,
  12. italic = false,
  13. strikeout = false,
  14. symbol = false,
  15. rotary = false,
  16. shadow = false,
  17. additive = false,
  18. outline = false,
  19. })
  20.  
  21. surface.CreateFont( "aspectFont", {
  22. font = "Arial",
  23. extended = false,
  24. size = 12,
  25. weight = 500,
  26. blursize = 0,
  27. scanlines = 0,
  28. antialias = true,
  29. underline = false,
  30. italic = false,
  31. strikeout = false,
  32. symbol = false,
  33. rotary = false,
  34. shadow = false,
  35. additive = false,
  36. outline = false,
  37. })
  38.  
  39. surface.CreateFont( "playerFontExD", {
  40. font = "Arial",
  41. extended = false,
  42. size = 24,
  43. weight = 500,
  44. blursize = 0,
  45. scanlines = 0,
  46. antialias = true,
  47. underline = false,
  48. italic = false,
  49. strikeout = false,
  50. symbol = false,
  51. rotary = false,
  52. shadow = false,
  53. additive = false,
  54. outline = false,
  55. })
  56.  
  57. local nextone = 0
  58.  
  59. local btn1Bg = Color(0, 0, 255, 100)
  60. local btn2Bg = Color(0, 0, 255, 100)
  61. local btn3Bg = Color(0, 0, 255, 100)
  62. local btn4Bg = Color(0, 0, 255, 100)
  63. local btn5Bg = Color(0, 0, 255, 100)
  64.  
  65. local nextone = 1
  66.  
  67. local function tcount(T)
  68.  
  69. local count1 = 0
  70.  
  71. for _ in pairs(T) do count1 = count1 + 1 end
  72.  
  73. return count1
  74.  
  75. end
  76.  
  77. function ENT:Draw()
  78.  
  79. self:DrawModel()
  80.  
  81. local theplayer = LocalPlayer()
  82. local dist = (theplayer:GetShootPos() - self.Entity:GetPos()):Length()
  83.  
  84. if (dist > 2500) then return end
  85.  
  86. local ang = (self.Entity:GetPos() - theplayer:GetShootPos())
  87. local tr = util.GetPlayerTrace(theplayer, ang)
  88. local tr = util.TraceLine(tr)
  89.  
  90. local t = {}
  91. t.start = theplayer:GetShootPos()
  92. t.endpos = theplayer:GetAimVector() * 88 + t.start
  93. t.filter = theplayer
  94.  
  95. local tr = util.TraceLine(t)
  96.  
  97. local pos = self.Entity:WorldToLocal(tr.HitPos)
  98.  
  99. local x = -100
  100. local y = -40
  101.  
  102. if (tr.Entity == self.Entity) and pos.x > -47 and pos.x < -14 and pos.y > 26 and pos.y < 38 then
  103.  
  104. btn1Bg = Color(150,150,150, 255)
  105. if (theplayer:KeyPressed(IN_USE)) then
  106. openMain()
  107. end
  108. else
  109. btn1Bg = Color(0, 0, 255, 100)
  110. end
  111.  
  112. if (tr.Entity == self.Entity) and pos.x > 4 and pos.x < 60 and pos.y > 26 and pos.y < 40 then
  113.  
  114. btn2Bg = Color(150,150,150, 255)
  115. if (theplayer:KeyPressed(IN_USE)) then
  116. openMain1()
  117. end
  118. else
  119. btn2Bg = Color(0, 0, 255, 100)
  120. end
  121.  
  122. if (tr.Entity == self.Entity) and pos.x > -47 and pos.x < -22 and pos.y > 10 and pos.y < 20 then
  123.  
  124. btn3Bg = Color(150,150,150, 255)
  125. if (theplayer:KeyPressed(IN_USE)) then
  126. openMain2()
  127. end
  128. else
  129. btn3Bg = Color(0, 0, 255, 100)
  130. end
  131.  
  132. if (tr.Entity == self.Entity) and pos.x > 3 and pos.x < 51 and pos.y > 10 and pos.y < 20 then
  133.  
  134. btn4Bg = Color(150,150,150, 255)
  135. if (theplayer:KeyPressed(IN_USE)) then
  136. openMain3()
  137. end
  138. else
  139. btn4Bg = Color(0, 0, 255, 100)
  140. end
  141.  
  142. if (tr.Entity == self.Entity) and pos.x > -60 and pos.x < 60 and pos.y > -30 and pos.y < -15 then
  143.  
  144. if (theplayer:KeyPressed(IN_USE)) and CurTime() > nextone then
  145. nextone = CurTime()+7
  146. net.Start("pingServer")
  147. net.SendToServer()
  148. end
  149. end
  150.  
  151. hook.Add( "PostDrawTranslucentRenderables", "test", function( bDepth, bSkybox )
  152.  
  153. local myAngel = self:GetAngles()
  154.  
  155. myAngel:RotateAroundAxis(self:GetAngles():Right(), 0)
  156. myAngel:RotateAroundAxis(self:GetAngles():Forward(), 0)
  157.  
  158. cam.Start3D2D(self:GetPos(), myAngel , 0.2)
  159. draw.RoundedBox(10, -358, -240, 716, 250, Color(30,30,30,255))
  160. draw.RoundedBox(10, -358, 40, 716, 150, Color(30,30,30,255))
  161. cam.End3D2D()
  162.  
  163. cam.Start3D2D(self:GetPos(), myAngel , 0.2)
  164. draw.WordBox(10, -350, -320,"Population : " .. player.GetCount() , "playerFontExD", Color(0,0,0,0), Color(255,255,255,255))
  165. draw.WordBox(10, -300, 80, "Need a Trainer? Click here!", "arialFont", btn5Bg, Color(255,255,255,255))
  166. draw.WordBox(2, -240, -200, "RULES", "arialFont", btn1Bg, Color(255,255,255,255))
  167. draw.WordBox(2, 20, -200, "STAFF LIST", "arialFont", btn2Bg, Color(255,255,255,255))
  168. draw.WordBox(2, -240, -100, "HELP", "arialFont", btn3Bg, Color(255,255,255,255))
  169. draw.WordBox(2, 20, -100, "Updates", "arialFont", btn4Bg, Color(255,255,255,255))
  170. draw.WordBox(2, -150, -320, "AlliedRP.com", "arialFont", Color(0,0,0,100), Color(255,0,0,255))
  171. draw.WordBox(2, 270, 330, "Made By Aspect", "aspectFont", Color(0,0,0,100), Color(255,0,0,255))
  172. cam.End3D2D()
  173.  
  174. end )
  175. end
  176.  
  177.  
  178. net.Receive("notifyPlyNeedsHelp", function()
  179.  
  180. chat.AddText(unpack(net.ReadTable()))
  181.  
  182. end)
  183.  
  184. function openMain()
  185.  
  186. local frame = vgui.Create( "DFrame" )
  187. frame:SetSize(ScrH() - 20, ScrW())
  188. frame:SetTitle( "AlliedRoleplay" )
  189. frame:SetVisible( true )
  190. frame:SetDraggable( true )
  191. frame:Center()
  192.  
  193. frame.Paint = function( self, w, h )
  194.  
  195. draw.RoundedBox( 0, 0, 0, w, h, Color(50, 50, 50, 200))
  196.  
  197. end
  198.  
  199. local html = vgui.Create( "DHTML" , frame )
  200. html:Dock( FILL )
  201. html:SetAllowLua( true )
  202.  
  203. html:OpenURL("http://alliedrp.com/community/showthread.php?tid=4")
  204. frame:MakePopup()
  205.  
  206. end
  207.  
  208. function openMain1()
  209.  
  210. local frame = vgui.Create( "DFrame" )
  211. frame:SetSize(ScrH() - 20, ScrW())
  212. frame:SetTitle( "AlliedRoleplay" )
  213. frame:SetVisible( true )
  214. frame:SetDraggable( true )
  215. frame:Center()
  216.  
  217. frame.Paint = function( self, w, h )
  218.  
  219. draw.RoundedBox( 0, 0, 0, w, h, Color(50, 50, 50, 200))
  220.  
  221. end
  222.  
  223. local html = vgui.Create( "DHTML" , frame )
  224. html:Dock( FILL )
  225. html:SetAllowLua( true )
  226.  
  227. html:OpenURL("http://alliedrp.com/community/showthread.php?tid=2")
  228. frame:MakePopup()
  229.  
  230. end
  231.  
  232. function openMain2()
  233.  
  234. local frame = vgui.Create( "DFrame" )
  235. frame:SetSize(ScrH() - 20, ScrW())
  236. frame:SetTitle( "AlliedRoleplay" )
  237. frame:SetVisible( true )
  238. frame:SetDraggable( true )
  239. frame:Center()
  240.  
  241. frame.Paint = function( self, w, h )
  242.  
  243. draw.RoundedBox( 0, 0, 0, w, h, Color(50, 50, 50, 200))
  244.  
  245. end
  246.  
  247. local html = vgui.Create( "DHTML" , frame )
  248. html:Dock( FILL )
  249. html:SetAllowLua( true )
  250.  
  251. html:OpenURL("http://alliedrp.com/community/forumdisplay.php?fid=28")
  252. frame:MakePopup()
  253.  
  254. end
  255.  
  256. function openMain3()
  257.  
  258. local frame = vgui.Create( "DFrame" )
  259. frame:SetSize(ScrH() - 20, ScrW())
  260. frame:SetTitle( "AlliedRoleplay" )
  261. frame:SetVisible( true )
  262. frame:SetDraggable( true )
  263. frame:Center()
  264.  
  265. frame.Paint = function( self, w, h )
  266.  
  267. draw.RoundedBox( 0, 0, 0, w, h, Color(50, 50, 50, 200))
  268.  
  269. end
  270.  
  271. local html = vgui.Create( "DHTML" , frame )
  272. html:Dock( FILL )
  273. html:SetAllowLua( true )
  274.  
  275. html:OpenURL("http://alliedrp.com/community/forumdisplay.php?fid=8")
  276. frame:MakePopup()
  277.  
  278. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement