getPlayerWantedCentrePosition
GET_PLAYER_WANTED_CENTRE_POSITION0x0C92BA89F1AF26F8The GTA V native GET_PLAYER_WANTED_CENTRE_POSITION of the PLAYER namespace, as LS:MP client scripts call it: the global function getPlayerWantedCentrePosition, in JavaScript and in Lua.
getPlayerWantedCentrePosition(
player: Player
): { x: number, y: number, z: number }getPlayerWantedCentrePosition(player: Player): Vector3Usage
JavaScript
const { x, y, z } = getPlayerWantedCentrePosition(player);Lua
local coords = getPlayerWantedCentrePosition(player)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
player | Player | number | integer |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.
Reference
- Namespace
- Player PLAYER
- In the game
Vector3 GET_PLAYER_WANTED_CENTRE_POSITION(Player player)- Hash
0x0C92BA89F1AF26F8