Mobile phoneClient1 output

getMobilePhonePosition

GET_MOBILE_PHONE_POSITION0x584FDFDA48805B86

The GTA V native GET_MOBILE_PHONE_POSITION of the MOBILE namespace, as LS:MP client scripts call it: the global function getMobilePhonePosition, in JavaScript and in Lua.

SignatureJavaScript
getMobilePhonePosition(): { x: number, y: number, z: number }
SignatureLua
getMobilePhonePosition(): Vector3

Usage

JavaScript
const { x, y, z } = getMobilePhonePosition();
Lua
local position = getMobilePhonePosition()
-- position.x, position.y, position.z

Parameters

None. The game writes the output: it is handed back, not passed in.

Returns

The output: the value of the call in JavaScript, the return value in Lua.

#ValueTypeJavaScriptLuaDescription
1positionVector3{ x: number, y: number, z: number }Vector3output

Reference

Namespace
Mobile phone MOBILE
In the game
void GET_MOBILE_PHONE_POSITION(Vector3* position)
Hash
0x584FDFDA48805B86

Open in the interactive natives reference