Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include('shared.lua')
- surface.CreateFont( "arialFont", {
- font = "Arial",
- extended = false,
- size = 56,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- })
- surface.CreateFont( "aspectFont", {
- font = "Arial",
- extended = false,
- size = 12,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- })
- surface.CreateFont( "playerFontExD", {
- font = "Arial",
- extended = false,
- size = 24,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- })
- local nextone = 0
- local btn1Bg = Color(0, 0, 255, 100)
- local btn2Bg = Color(0, 0, 255, 100)
- local btn3Bg = Color(0, 0, 255, 100)
- local btn4Bg = Color(0, 0, 255, 100)
- local btn5Bg = Color(0, 0, 255, 100)
- local nextone = 1
- local function tcount(T)
- local count1 = 0
- for _ in pairs(T) do count1 = count1 + 1 end
- return count1
- end
- function ENT:Draw()
- self:DrawModel()
- local theplayer = LocalPlayer()
- local dist = (theplayer:GetShootPos() - self.Entity:GetPos()):Length()
- if (dist > 2500) then return end
- local ang = (self.Entity:GetPos() - theplayer:GetShootPos())
- local tr = util.GetPlayerTrace(theplayer, ang)
- local tr = util.TraceLine(tr)
- local t = {}
- t.start = theplayer:GetShootPos()
- t.endpos = theplayer:GetAimVector() * 88 + t.start
- t.filter = theplayer
- local tr = util.TraceLine(t)
- local pos = self.Entity:WorldToLocal(tr.HitPos)
- local x = -100
- local y = -40
- if (tr.Entity == self.Entity) and pos.x > -47 and pos.x < -14 and pos.y > 26 and pos.y < 38 then
- btn1Bg = Color(150,150,150, 255)
- if (theplayer:KeyPressed(IN_USE)) then
- openMain()
- end
- else
- btn1Bg = Color(0, 0, 255, 100)
- end
- if (tr.Entity == self.Entity) and pos.x > 4 and pos.x < 60 and pos.y > 26 and pos.y < 40 then
- btn2Bg = Color(150,150,150, 255)
- if (theplayer:KeyPressed(IN_USE)) then
- openMain1()
- end
- else
- btn2Bg = Color(0, 0, 255, 100)
- end
- if (tr.Entity == self.Entity) and pos.x > -47 and pos.x < -22 and pos.y > 10 and pos.y < 20 then
- btn3Bg = Color(150,150,150, 255)
- if (theplayer:KeyPressed(IN_USE)) then
- openMain2()
- end
- else
- btn3Bg = Color(0, 0, 255, 100)
- end
- if (tr.Entity == self.Entity) and pos.x > 3 and pos.x < 51 and pos.y > 10 and pos.y < 20 then
- btn4Bg = Color(150,150,150, 255)
- if (theplayer:KeyPressed(IN_USE)) then
- openMain3()
- end
- else
- btn4Bg = Color(0, 0, 255, 100)
- end
- if (tr.Entity == self.Entity) and pos.x > -60 and pos.x < 60 and pos.y > -30 and pos.y < -15 then
- if (theplayer:KeyPressed(IN_USE)) and CurTime() > nextone then
- nextone = CurTime()+7
- net.Start("pingServer")
- net.SendToServer()
- end
- end
- hook.Add( "PostDrawTranslucentRenderables", "test", function( bDepth, bSkybox )
- local myAngel = self:GetAngles()
- myAngel:RotateAroundAxis(self:GetAngles():Right(), 0)
- myAngel:RotateAroundAxis(self:GetAngles():Forward(), 0)
- cam.Start3D2D(self:GetPos(), myAngel , 0.2)
- draw.RoundedBox(10, -358, -240, 716, 250, Color(30,30,30,255))
- draw.RoundedBox(10, -358, 40, 716, 150, Color(30,30,30,255))
- cam.End3D2D()
- cam.Start3D2D(self:GetPos(), myAngel , 0.2)
- draw.WordBox(10, -350, -320,"Population : " .. player.GetCount() , "playerFontExD", Color(0,0,0,0), Color(255,255,255,255))
- draw.WordBox(10, -300, 80, "Need a Trainer? Click here!", "arialFont", btn5Bg, Color(255,255,255,255))
- draw.WordBox(2, -240, -200, "RULES", "arialFont", btn1Bg, Color(255,255,255,255))
- draw.WordBox(2, 20, -200, "STAFF LIST", "arialFont", btn2Bg, Color(255,255,255,255))
- draw.WordBox(2, -240, -100, "HELP", "arialFont", btn3Bg, Color(255,255,255,255))
- draw.WordBox(2, 20, -100, "Updates", "arialFont", btn4Bg, Color(255,255,255,255))
- draw.WordBox(2, -150, -320, "AlliedRP.com", "arialFont", Color(0,0,0,100), Color(255,0,0,255))
- draw.WordBox(2, 270, 330, "Made By Aspect", "aspectFont", Color(0,0,0,100), Color(255,0,0,255))
- cam.End3D2D()
- end )
- end
- net.Receive("notifyPlyNeedsHelp", function()
- chat.AddText(unpack(net.ReadTable()))
- end)
- function openMain()
- local frame = vgui.Create( "DFrame" )
- frame:SetSize(ScrH() - 20, ScrW())
- frame:SetTitle( "AlliedRoleplay" )
- frame:SetVisible( true )
- frame:SetDraggable( true )
- frame:Center()
- frame.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color(50, 50, 50, 200))
- end
- local html = vgui.Create( "DHTML" , frame )
- html:Dock( FILL )
- html:SetAllowLua( true )
- html:OpenURL("http://alliedrp.com/community/showthread.php?tid=4")
- frame:MakePopup()
- end
- function openMain1()
- local frame = vgui.Create( "DFrame" )
- frame:SetSize(ScrH() - 20, ScrW())
- frame:SetTitle( "AlliedRoleplay" )
- frame:SetVisible( true )
- frame:SetDraggable( true )
- frame:Center()
- frame.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color(50, 50, 50, 200))
- end
- local html = vgui.Create( "DHTML" , frame )
- html:Dock( FILL )
- html:SetAllowLua( true )
- html:OpenURL("http://alliedrp.com/community/showthread.php?tid=2")
- frame:MakePopup()
- end
- function openMain2()
- local frame = vgui.Create( "DFrame" )
- frame:SetSize(ScrH() - 20, ScrW())
- frame:SetTitle( "AlliedRoleplay" )
- frame:SetVisible( true )
- frame:SetDraggable( true )
- frame:Center()
- frame.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color(50, 50, 50, 200))
- end
- local html = vgui.Create( "DHTML" , frame )
- html:Dock( FILL )
- html:SetAllowLua( true )
- html:OpenURL("http://alliedrp.com/community/forumdisplay.php?fid=28")
- frame:MakePopup()
- end
- function openMain3()
- local frame = vgui.Create( "DFrame" )
- frame:SetSize(ScrH() - 20, ScrW())
- frame:SetTitle( "AlliedRoleplay" )
- frame:SetVisible( true )
- frame:SetDraggable( true )
- frame:Center()
- frame.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color(50, 50, 50, 200))
- end
- local html = vgui.Create( "DHTML" , frame )
- html:Dock( FILL )
- html:SetAllowLua( true )
- html:OpenURL("http://alliedrp.com/community/forumdisplay.php?fid=8")
- frame:MakePopup()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement