MrGTAmodsgerman Posted June 14, 2015 Share Posted June 14, 2015 Hello, I just write a nice script for my MTA Server but i want to convert to GTA V. I want to write my first GTA 5 script.But how can i do it? function showVehicleDistance(player, matchingDimension, seat, jacked)local veh = getPedOccupiedVehicle(player)if veh == vehicle_1 thenlocal veh1_pos = {getElementPosition(vehicle_1)}local veh2_pos = {getElementPosition(vehicle_2)}local distance = getDistanceBetweenPoints3D(veh1_pos[1], veh1_pos[2], veh1_pos[3], veh2_pos[1], veh2_pos[2], veh2_pos[3])if distance < 5 then... I want to get the distance between a specific Vehicle type for example: Distance between a random Cheetah and a random BMX Bike.You know what i mean?Thanks MrGTAmodsgerman Link to comment Share on other sites More sharing options...
MrPancakes Posted June 15, 2015 Share Posted June 15, 2015 try this native float GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(float x1, float y1, float z1, float x2, float y2, float z2, BOOL unknown) Link to comment Share on other sites More sharing options...
TrevorsDad Posted November 15, 2015 Share Posted November 15, 2015 Also this returns a float. CALCULATE_TRAVEL_DISTANCE_BETWEEN_POINTS Anyone know formula to convert whatever this float is to miles/km? I've also looked through all the radar/GPS to get from there but cannot find it. Link to comment Share on other sites More sharing options...
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