RedM Natives

GET_PLAYER_FOCUS_POS

Gets the focus position (i.e.

Hash0x586F80FF
Runtime nameGetPlayerFocusPos
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

Vector3 GET_PLAYER_FOCUS_POS(char* playerSrc);

Parameters

NameTypeDescription
playerSrcchar*

The player to get the focus position of

Returns Vector3 — Returns a `Vector3` containing the focus position of the player.

Description

Cfx.re native reference

Gets the focus position (i.e. the position of the active camera in the game world) of a player.

Usage

Lua
local retval = GetPlayerFocusPos(playerSrc)

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

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

Sources

Cfx.re native reference

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