PlayerClient

startPlayerTeleport

START_PLAYER_TELEPORT0xAD15F075A4DA0FDE

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

SignatureJavaScript
startPlayerTeleport(
  player: Player,
  x: number,
  y: number,
  z: number,
  heading: number,
  p5: boolean,
  findCollisionLand: boolean,
  p7: boolean
): void
SignatureLua
startPlayerTeleport(
  player: Player,
  x: number,
  y: number,
  z: number,
  heading: number,
  p5: boolean,
  findCollisionLand: boolean,
  p7: boolean
)

Usage

JavaScript
startPlayerTeleport(player, x, y, z, heading, p5, findCollisionLand, p7);
Lua
startPlayerTeleport(player, x, y, z, heading, p5, findCollisionLand, p7)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
startPlayerTeleport(player, pos, heading, p5, findCollisionLand, p7);
Lua · with vectors
startPlayerTeleport(player, pos, heading, p5, findCollisionLand, p7)

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
headingfloatnumbernumber
p5BOOLbooleanboolean
findCollisionLandBOOLbooleanboolean
p7BOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

findCollisionLand: This teleports the player to land when set to true and will not consider the Z coordinate parameter provided by you. It will automatically put the Z coordinate so that you don't fall from sky.

Reference

Namespace
Player PLAYER
In the game
void START_PLAYER_TELEPORT(Player player, float x, float y, float z, float heading, BOOL p5, BOOL findCollisionLand, BOOL p7)
Hash
0xAD15F075A4DA0FDE

Open in the interactive natives reference