Jump to content

Help - getDistanceBetweenPoints2D


manve1

Recommended Posts

Posted

how can i get rid of y axis on:

local x, y, z = getElementPosition( pMarker ) 
local x2, y2, z2 = getElementPosition( localPlayer ) 
getDistanceBetweenPoints2D( math.ceil(x), y, math.ceil(x2), y2 ) 

?

Posted
how can i get rid of y axis on:
local x, y, z = getElementPosition( pMarker ) 
local x2, y2, z2 = getElementPosition( localPlayer ) 
getDistanceBetweenPoints2D( math.ceil(x), y, math.ceil(x2), y2 ) 

?

I believe the function requires all three, if you want to find the difference between the other two, why not do it mathematically? Just make a function yourself that does that :D BTW hello manve1!

Posted
The mathematical way will take me ages to make, I use random markers for this.

P.S. Hi NooP

maybe when i get back from school today, i will try to make a function :D

Posted

Thanx, but I seen in one server having the distance between 2 points, and only in one piece, without decimal point, i just dont want the decimal point, That is what now i actually need

Posted

Well, never mind, I just leave it as it is, although i was trying to:

Make a marker and check how far player is away from him, in meters and without a decimal (( original is like this EMAPLE: 345.247166245 ))

Posted

no, no need it anymore, i used it in all of them, still the same thing, i try stuff before i ask help, but i leave it as it is

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...