RedM Natives

GET_PLAYER_CAMERA_ROTATION

Gets the current camera rotation for a specified player.

Hash0x433C765D
Runtime nameGetPlayerCameraRotation
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

Vector3 GET_PLAYER_CAMERA_ROTATION(char* playerSrc);

Parameters

NameTypeDescription
playerSrcchar*

The player handle.

Returns Vector3 — The player's camera rotation. Values are in radians.

Description

Cfx.re native reference

Gets the current camera rotation for a specified player. This native is used server side when using OneSync.

Usage

Lua
local retval = GetPlayerCameraRotation(playerSrc)

-- always works, by hash
local retval = Citizen.InvokeNative(0x433c765d, playerSrc, Citizen.ResultAsVector())
JavaScript and C#
JavaScript
const retval = GetPlayerCameraRotation(playerSrc);

// by hash
const retval = Citizen.invokeNative('0x433c765d', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsVector());
C#
Vector3 retval = Function.Call<Vector3>((Hash)0x433c765d, playerSrc);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.