manve1 Posted December 13, 2012 Share Posted December 13, 2012 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 ) ? Link to comment
Imposter Posted December 13, 2012 Share Posted December 13, 2012 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 BTW hello manve1! Link to comment
manve1 Posted December 14, 2012 Author Share Posted December 14, 2012 The mathematical way will take me ages to make, I use random markers for this. P.S. Hi NooP Link to comment
Imposter Posted December 14, 2012 Share Posted December 14, 2012 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 Link to comment
manve1 Posted December 14, 2012 Author Share Posted December 14, 2012 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 Link to comment
Anderl Posted December 14, 2012 Share Posted December 14, 2012 I still didn't get what are you trying to do. Would you mind explaining? Link to comment
manve1 Posted December 14, 2012 Author Share Posted December 14, 2012 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 )) Link to comment
Anderl Posted December 14, 2012 Share Posted December 14, 2012 And why do you need to take "Y" axis? Btw, you should use math.ceil in getDistanceBetweenPoints2D not in X axis', if I understood what you wanted to say. Link to comment
manve1 Posted December 14, 2012 Author Share Posted December 14, 2012 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 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now