FiveM Docs / Native Reference
API Set:
  • all
  • server
  • client
Language:
  • raw
  • lua
  • c#
  • js
Namespace: SYSTEMAPI set: clientGame: gta5editImprove

VDIST2

0xB7A628320EFF8E47
0xC85DEF1F
// Vdist2
float VDIST2(float x1, float y1, float z1, float x2, float y2, float z2);
Parameters:
  • x1:

    X coordinate of the first point.

  • y1:

    Y coordinate of the first point.

  • z1:

    Z coordinate of the first point. Represents the height or elevation at the first point.

  • x2:

    X coordinate of the second point.

  • y2:

    Y coordinate of the second point.

  • z2:

    Z coordinate of the second point. Represents the height or elevation at the second point.

Returns:

Returns the distance as a float between the two points (x1, y1, z1) and (x2, y2, z2) in the game world.

Calculates distance between vectors but does not perform Sqrt operations. Its way faster than VDIST, but it's not faster than direct mathematical calculations.

NativeDB Introduced: v323
Privacy
•
Cookie Policy
•
Cookie Settings
0xFB199266061F820A()
Namespace: SYSTEM
CEIL(float value)
COS(float value)
FLOOR(float value)
_LOG10(float value)
POW(float base, float exponent)
ROUND(float value)
_SET_THREAD_PRIORITY(int priority)
SETTIMERA(int value)
SETTIMERB(int value)
SHIFT_LEFT(int value, int bitShift)
SHIFT_RIGHT(int value, int bitShift)
SIN(float value)
SQRT(float value)
START_NEW_SCRIPT(char* scriptName, int stackSize)
START_NEW_SCRIPT_WITH_ARGS(char* scriptName, Any* args, int argCount, int stackSize)
START_NEW_SCRIPT_WITH_NAME_HASH(Hash scriptHash, int stackSize)
START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS(Hash scriptHash, Any* args, int argCount, int stackSize)
TIMERA()
TIMERB()
TIMESTEP()
TO_FLOAT(int value)
VDIST(float x1, float y1, float z1, float x2, float y2, float z2)
VDIST2(float x1, float y1, float z1, float x2, float y2, float z2)
VMAG(float x, float y, float z)
VMAG2(float x, float y, float z)
WAIT(int ms)
Namespace: TASK
ADD_COVER_BLOCKING_AREA(float playerX, float playerY, float playerZ, float radiusX, float radiusY, float radiusZ, BOOL p6, BOOL p7, BOOL p8, BOOL p9)
ADD_COVER_POINT(float p0, float p1, float p2, float p3, Any p4, Any p5, Any p6, BOOL p7)
ADD_PATROL_ROUTE_LINK(int id1, int id2)
ADD_PATROL_ROUTE_NODE(int id, char* guardScenario, float x1, float y1, float z1, float x2, float y2, float z2, int waitTime)
ADD_VEHICLE_SUBTASK_ATTACK_COORD(Ped ped, float x, float y, float z)
ADD_VEHICLE_SUBTASK_ATTACK_PED(Ped ped, Ped ped2)