float GET_DISTANCE_BETWEEN_COORDS(float x1, float y1, float z1, float x2, float y2, float z2, BOOL useZ);
| Property |
Value |
| Native Name |
GET_DISTANCE_BETWEEN_COORDS |
| Hash |
0x0BE7F4E3CDBAFB28 |
| Return Type |
float |
| Build |
1207 |
| API Set |
client |
| Parameters |
x1 (float), y1 (float), z1 (float), x2 (float), y2 (float), z2 (float), useZ (BOOL) |
Description: If useZ is false, only the 2D plane (X-Y) will be considered for calculating the distance.
Consider using this faster native instead: BUILTIN::VDIST - DVIST always takes in consideration the 3D coordinates.
Usage
Lua (Direct):
local result = GetDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, useZ)
Lua (Hash):
local result = Citizen.InvokeNative(0x0BE7F4E3CDBAFB28, x1, y1, z1, x2, y2, z2, useZ)
Back to MISC