setPlayerWantedCentrePosition
SET_PLAYER_WANTED_CENTRE_POSITION0x520E541A97A13354The 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.
setPlayerWantedCentrePosition(
player: Player,
position: { x: number, y: number, z: number },
p2: boolean,
p3: boolean
): voidsetPlayerWantedCentrePosition(
player: Player,
position: Vector3,
p2: boolean,
p3: boolean
)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
setPlayerWantedCentrePosition(player, position, p2, p3);setPlayerWantedCentrePosition(player, position, p2, p3)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
player | Player | number | integer |
position | Vector3 | { x: number, y: number, z: number } | Vector3 |
p2 | BOOL | boolean | boolean |
p3 | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
On LS:MP
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