szymski

Untitled

Jan 30th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. function matcore.DrawCircle(posx, posy, radius, color)
  2. local poly = { }
  3. local v = 40
  4. for i = 0, v do
  5. poly[i+1] = {x = math.sin(-math.rad(i/v*360)) * radius + posx, y = math.cos(-math.rad(i/v*360)) * radius + posy}
  6. end
  7. draw.NoTexture()
  8. surface.SetDrawColor(color)
  9. surface.DrawPoly(poly)
  10. end
Add Comment
Please, Sign In to add comment