The_Belch

Molotov Range

Jul 2nd, 2019
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. local function drawCircle(x, y, z, radius, thickness, quality, r, g, b, a)
  2. local quality = quality or 20
  3. local thickness = thickness or 8
  4. local Screen_X_Line_Old, Screen_Y_Line_Old
  5. for rot=0, 360, quality do
  6. local rot_temp = math.rad(rot)
  7. local LineX, LineY, LineZ = radius * math.cos(rot_temp) + x, radius * math.sin(rot_temp) + y, z
  8. local Screen_X_Line, Screen_Y_Line = client.WorldToScreen(LineX, LineY, LineZ)
  9. if Screen_X_Line ~=nil and Screen_X_Line_Old ~= nil then
  10. draw.SetFont(draw.CreateFont("Tahoma", 12));
  11. draw.Color(r, g, b, a)
  12. draw.Line(Screen_X_Line, Screen_Y_Line, Screen_X_Line_Old, Screen_Y_Line_Old)
  13. for i = 0, thickness do
  14. draw.Line(Screen_X_Line, Screen_Y_Line+i, Screen_X_Line_Old, Screen_Y_Line_Old+i)
  15. end
  16. end
  17. Screen_X_Line_Old, Screen_Y_Line_Old = Screen_X_Line, Screen_Y_Line
  18. end
  19. end
  20.  
  21. callbacks.Register("Draw", function()
  22. local ents = entities.FindByClass("CInferno")
  23. for i = 1, #ents do
  24. local molotov = ents[i]
  25. local x, y, z = molotov:GetAbsOrigin()
  26.  
  27. drawCircle(x, y, z, 200, 1, 15, 214, 69, 65, 255)
  28. end
  29. end)
Add Comment
Please, Sign In to add comment