Advertisement
Guest User

Untitled

a guest
May 27th, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.35 KB | None | 0 0
  1. --[[
  2. Copyright Novacock
  3. --]]
  4.  
  5. surface.CreateFont( "CombineRecognitionFont",
  6.                     {
  7.                     font    = "Trebuchet24",
  8.                     size    = ScreenScale(8),
  9.                     weight  = 1000,
  10.                     antialias = true,
  11.                     shadow = false
  12.             })
  13.  
  14. function CanSee(ent)
  15. local data = {}
  16.     data.start = LocalPlayer():GetShootPos()
  17.     data.endpos = data.start + LocalPlayer():GetAimVector()*340
  18. local trace = util.TraceLine(data)
  19. local ent = trace.ent
  20.     if ( ent:IsValid() ) then
  21.         local dist = ent:GetPos():Distance(LocalPlayer():GetPos())*0.0245;
  22.         local pos = ent:GetPos():ToScreen()
  23.         --draw.DrawText("this is an ent but name returns nil lmao ur a faggot XD", "CB1", pos.x, pos.y, Color(100, 104, 113, 255), 1 )
  24.     end
  25. end
  26.  
  27. function DrawCombineRecognition()
  28.     for k,v in pairs(player.GetAll()) do
  29.         if CanSee(v) then
  30.             if (v:GetFaction() == "Citizen") then
  31.                 local pos = Vector(0,0,0)
  32.                 cam.Start3D2D(v:GetPos()+Vector(0,0,80), ang, 0.1);
  33.                     draw.SimpleTextOutlined(v:Name(), "CombineRecognitionFont", pos.x, pos.y-20, Color(255,255,255, alpha), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 2,Color(0,0,0, alpha) )
  34.                 cam.End3D2D();
  35.                 halo.Add({v}, Color( 255, 155, 0 ), 5, 5, 2)
  36.             end
  37.         end
  38.     end
  39. end
  40.  
  41. hook.Add( "HUDPaint", "DrawCombineRecognition", DrawCombineRecognition );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement