Vector3::toArray

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

This function returns an array of the partials of a Vector3.

Syntax

vector.toArray();

Returns

  • number[] An array of [x, y, z].

Example

Server-Side
const vec1 = new mp.Vector3(10, 30, 100);

const array = vec1.toArray(); // [10, 30, 100]

See Also