GET_PLAYER_WANTED_CENTRE_POSITION
Gets the current known coordinates for the specified player from cops perspective.
Signature
Vector3 GET_PLAYER_WANTED_CENTRE_POSITION(char* playerSrc);Parameters
| Name | Type | Description |
|---|---|---|
playerSrc | char* | The target player |
Returns Vector3 — The player's position known by police. Vector zero if the player has no wanted level.
Description
Gets the current known coordinates for the specified player from cops perspective. This native is used server side when using OneSync.
Usage
local retval = GetPlayerWantedCentrePosition(playerSrc)
-- always works, by hash
local retval = Citizen.InvokeNative(0x821f2d2c, playerSrc, Citizen.ResultAsVector())JavaScript and C#
const retval = GetPlayerWantedCentrePosition(playerSrc);
// by hash
const retval = Citizen.invokeNative('0x821f2d2c', playerSrc, Citizen.returnResultAnyway(), Citizen.resultAsVector());Vector3 retval = Function.Call<Vector3>((Hash)0x821f2d2c, playerSrc);Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.