getIdealPlayerSwitchType
GET_IDEAL_PLAYER_SWITCH_TYPE0xB5D7B26B45720E05The GTA V native GET_IDEAL_PLAYER_SWITCH_TYPE of the STREAMING namespace, as LS:MP client scripts call it: the global function getIdealPlayerSwitchType, in JavaScript and in Lua.
getIdealPlayerSwitchType(
x1: number,
y1: number,
z1: number,
x2: number,
y2: number,
z2: number
): numbergetIdealPlayerSwitchType(
x1: number,
y1: number,
z1: number,
x2: number,
y2: number,
z2: number
): integerUsage
JavaScript
const result = getIdealPlayerSwitchType(x1, y1, z1, x2, y2, z2);Lua
local result = getIdealPlayerSwitchType(x1, y1, z1, x2, y2, z2)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
const result = getIdealPlayerSwitchType(pos1, pos2);Lua · with vectors
local result = getIdealPlayerSwitchType(pos1, pos2)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x1 | float | number | number |
y1 | float | number | number |
z1 | float | number | number |
x2 | float | number | number |
y2 | float | number | number |
z2 | float | number | number |
Returns
int JavaScript number, Lua integerNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
x1, y1, z1 -- Coords of your ped model
x2, y2, z2 -- Coords of the ped you want to switch to
Reference
- Namespace
- Streaming STREAMING
- In the game
int GET_IDEAL_PLAYER_SWITCH_TYPE(float x1, float y1, float z1, float x2, float y2, float z2)- Hash
0xB5D7B26B45720E05