Jump to content

[Help] distance


Recommended Posts

What do you mean by mille?

I think he means mile... You can try using this:

function getDistanceBetweenPoints3DUSA ( x, y, z, x_, y_, z_ ) 
    local dist =  ( getDistanceBetweenPoints3D ( x, y, z, x_, y_, z_ ) * 3.28 ) -- Get feet 
    local dist = ( dist / 5280 )-- Convert to miles 
    return dist; -- Return it 
end 
  
  
-- Example: 
local p = getRandomPlayer ( ) 
local x, y, z = getElementPosition ( p ) 
outputChatBox ( "You are "..getDistanceBetweenPoints3DUSA(x,y,z,0,0,0).." miles from 0, 0, 0", p ) 

Link to comment

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