Jump to content

[HELP] Marker


Domingos MTA

Recommended Posts

  • Moderators
Posted (edited)

Here use this one, I created it a month ago. (it does also have a rotation effect, which makes it more alive)

P.s 20 lines =D

 

function dxDrawCircle3D(x, y, z, radius, width, color)
	if type(x) ~= "number" or type(y) ~= "number" or type(z) ~= "number" then
		return false
	end

	local radius = radius or 1
	local width = width or 1
	local color = color or tocolor(255,255,255,150)
	
	local startRotation = (getTickCount() % 5000 / 5000) * 360
	for i=1, 18 do
		local pR1 =  (((i-1)*20 + startRotation) * 3.141592653 * 2)/360
		local pR2 =  ((i*20 + startRotation) * 3.141592653 * 2)/360
		local startX, startY = x + math.cos(pR1) * radius, y + math.sin(pR1) * radius
		local endX, endY = x + math.cos(pR2) * radius, y + math.sin(pR2) * radius
		dxDrawLine3D(startX, startY, z, endX, endY, z, color, width)
	end
	
	return true
end

 

Edited by IIYAMA

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...