GET_PLAYER_CAMERA_ROTATION
Gets the current camera rotation for a specified player.
Signature
Vector3 GET_PLAYER_CAMERA_ROTATION(char* playerSrc);Parameters
| Name | Type | Description |
|---|---|---|
playerSrc | char* | The player handle. |
Returns Vector3 — The player's camera rotation. Values are in radians.
Description
Gets the current camera rotation for a specified player. This native is used server side when using OneSync.
Usage
local retval = GetPlayerCameraRotation(playerSrc)
-- always works, by hash
local retval = Citizen.InvokeNative(0x433c765d, playerSrc, Citizen.ResultAsVector())JavaScript and C#
const retval = GetPlayerCameraRotation(playerSrc);
// by hash
const retval = Citizen.invokeNative('0x433c765d', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsVector());Vector3 retval = Function.Call<Vector3>((Hash)0x433c765d, playerSrc);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.