PlayerClient

setPlayerWantedCentrePosition

SET_PLAYER_WANTED_CENTRE_POSITION0x520E541A97A13354

The GTA V native SET_PLAYER_WANTED_CENTRE_POSITION of the PLAYER namespace, as LS:MP client scripts call it: the global function setPlayerWantedCentrePosition, in JavaScript and in Lua.

SignatureJavaScript
setPlayerWantedCentrePosition(
  player: Player,
  position: { x: number, y: number, z: number },
  p2: boolean,
  p3: boolean
): void
SignatureLua
setPlayerWantedCentrePosition(
  player: Player,
  position: Vector3,
  p2: boolean,
  p3: boolean
)
⚠
Known issue

The value of position does not reach the game yet: LS:MP currently treats this pointer as an output, so the game receives an empty value instead of yours.

Usage

JavaScript
setPlayerWantedCentrePosition(player, position, p2, p3);
Lua
setPlayerWantedCentrePosition(player, position, p2, p3)

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger
positionVector3{ x: number, y: number, z: number }Vector3
p2BOOLbooleanboolean
p3BOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

⚠
Signature under review

LS:MP's table describes the parameters of this native differently from the current native database (void SET_PLAYER_WANTED_CENTRE_POSITION(Player player, float x, float y, float z)). Until the table is refreshed, some values may be passed or returned under the wrong type.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

# Predominant call signatures

setPlayerWantedCentrePosition(playerId(), getEntityCoords(playerPedId(), 1));

# Parameter value ranges
P0: playerId()
P1: getEntityCoords(playerPedId(), 1)
P2: Not set by any call

Reference

Namespace
Player PLAYER
In the game
void SET_PLAYER_WANTED_CENTRE_POSITION(Player player, Vector3* position, BOOL p2, BOOL p3)
Hash
0x520E541A97A13354

Open in the interactive natives reference