RedM Natives

GET_PLAYER_WANTED_CENTRE_POSITION

Gets the current known coordinates for the specified player from cops perspective.

Hash0x821F2D2C
Runtime nameGetPlayerWantedCentrePosition
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

Vector3 GET_PLAYER_WANTED_CENTRE_POSITION(char* playerSrc);

Parameters

NameTypeDescription
playerSrcchar*

The target player

Returns Vector3 — The player's position known by police. Vector zero if the player has no wanted level.

Description

Cfx.re native reference

Gets the current known coordinates for the specified player from cops perspective. This native is used server side when using OneSync.

Usage

Lua
local retval = GetPlayerWantedCentrePosition(playerSrc)

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

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

Sources

Cfx.re native reference

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