GetDistanceBetweenCoords — FiveM Natives
0xF1B760881820C952 · MISC · all
Returns the distance between two three-dimensional points, optionally ignoring the Z values. If useZ is false, only the 2D plane (X-Y) will be considered for calculating the distance. Consider using this faster native instead: SYSTEM::VDIST - DVIST always takes in consideration the 3D coordinates.
Parameters
| Name | Type | Description |
|---|---|---|
| x1 | float | The X coordinate of the first point. |
| y1 | float | The Y coordinate of the first point. |
| z1 | float | The Z coordinate of the first point. |
| x2 | float | The X coordinate of the second point. |
| y2 | float | The Y coordinate of the second point. |
| z2 | float | The Z coordinate of the second point. |
| useZ | BOOL | Whether or not to use the Z coordinate. |
Returns
float