Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local neededAngles = Angle(-90, 0, 0)
- HeadLinesActive = true
- function HeadLines2()
- cam.Start3D(EyePos(), EyeAngles())
- for k,ply in pairs(player.GetAll()) do
- if ply != LocalPlayer() && ply:Alive() then
- local shootPos = ply:GetShootPos()
- local data = {}
- data.start = shootPos
- data.endpos = shootPos + neededAngles:Forward() * 10000
- data.filter = ply
- local tr = util.TraceLine(data)
- cam.Start3D2D(shootPos, neededAngles, 1)
- if IsValid(tr.Entity) then
- surface.SetDrawColor(255, 140, 0, 255)
- else
- surface.SetDrawColor(0, 0, 255, 255)
- end
- surface.DrawLine(0, 0, tr.HitPos:Distance(shootPos), 0)
- cam.End3D2D()
- end
- end
- cam.End3D()
- end
- hook.Add("HUDPaint", "HeadLines2", HeadLines2)
- concommand.Add("suckmydick", function()
- if toggleLinesHead then
- hook.Remove("HUDPaint", "HeadLines2")
- toggleLinesHead = false
- HeadLinesActive = false
- else
- hook.Add("HUDPaint", "HeadLines2", HeadLines2)
- toggleLinesHead = true
- HeadLinesActive = true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement