setMobilePhoneRotation

SET_MOBILE_PHONE_ROTATION0xBB779C0CA917E865

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

SignatureJavaScript
setMobilePhoneRotation(
  rotX: number,
  rotY: number,
  rotZ: number,
  p3: any
): void
SignatureLua
setMobilePhoneRotation(rotX: number, rotY: number, rotZ: number, p3: any)

Usage

JavaScript
setMobilePhoneRotation(rotX, rotY, rotZ, p3);
Lua
setMobilePhoneRotation(rotX, rotY, rotZ, p3)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
setMobilePhoneRotation(rot, p3);
Lua · with vectors
setMobilePhoneRotation(rot, p3)

Parameters

ParameterTypeJavaScriptLua
rotXfloatnumbernumber
rotYfloatnumbernumber
rotZfloatnumbernumber
p3Anyanyany

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Last parameter is unknown and always zero.

Reference

Namespace
Mobile phone MOBILE
In the game
void SET_MOBILE_PHONE_ROTATION(float rotX, float rotY, float rotZ, Any p3)
Hash
0xBB779C0CA917E865

Open in the interactive natives reference