From 868e729d68b5913716bfe5ddb512f4099851e9a2 Mon Sep 17 00:00:00 2001 From: Apickx Date: Mon, 28 Dec 2015 19:18:30 -0500 Subject: Initial commit --- gamemode/cl_hud/draw_playercircle.lua | 1 + 1 file changed, 1 insertion(+) create mode 100644 gamemode/cl_hud/draw_playercircle.lua (limited to 'gamemode/cl_hud/draw_playercircle.lua') diff --git a/gamemode/cl_hud/draw_playercircle.lua b/gamemode/cl_hud/draw_playercircle.lua new file mode 100644 index 0000000..68498aa --- /dev/null +++ b/gamemode/cl_hud/draw_playercircle.lua @@ -0,0 +1 @@ +local CIRCLE = surface.GetTextureID("SGM/playercircle") local CIROFF = Vector(0,0,1) local CIROF2 = Vector(0,0,10) local CIRDOW = Vector(0,0,150) local CIRANG = Angle(0,0,0) local CIRENA = true local CIRCOL = MAIN_COLOR function GM:SetEnableMawCircle(bool) CIRENA = bool end function GM:SetMawCircleTexture(TexID) CIRCLE = TexID end function GM:SetMawCircleColor(Col) CIRCOL = Col end hook.Add("PostPlayerDraw","DrawingPlayerCircle",function(pl) if (!CIRENA) then return end local p = pl:GetPos() local t = { start = p+CIROF2, endpos = p-CIRDOW, filter = pl, mask = MASK_SOLID_BRUSHONLY, } t = util.TraceLine(t) local B = CIRCOL.a*1 CIRCOL.a = math.Clamp(140-p:Distance(t.HitPos),0,250) if (t.Hit) then cam.Start3D2D(t.HitPos+CIROFF,CIRANG,0.2) DrawTexturedRect( -100, -100, 200, 200, CIRCOL, CIRCLE) cam.End3D2D() end CIRCOL.a = B end) \ No newline at end of file -- cgit v1.2.3-70-g09d2