startPlayerSwitch
START_PLAYER_SWITCH0xFAA23F2CBA159D67The GTA V native START_PLAYER_SWITCH of the STREAMING namespace, as LS:MP client scripts call it: the global function startPlayerSwitch, in JavaScript and in Lua.
startPlayerSwitch(from: Ped, to: Ped, flags: number, switchType: number): voidstartPlayerSwitch(from: Ped, to: Ped, flags: integer, switchType: integer)Usage
JavaScript
startPlayerSwitch(from, to, flags, switchType);Lua
startPlayerSwitch(from, to, flags, switchType)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
from | Ped | number | integer |
to | Ped | number | integer |
flags | int | number | integer |
switchType | int | number | integer |
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.
Use getIdealPlayerSwitchType for the best switch type.
Examples from the decompiled scripts:
startPlayerSwitch(l_832._f3, playerPedId(), 0, 3);
startPlayerSwitch(l_832._f3, playerPedId(), 2050, 3);
startPlayerSwitch(playerPedId(), l_832._f3, 1024, 3);
startPlayerSwitch(g_141F27, playerPedId(), 513, v_14);Reference
- Namespace
- Streaming STREAMING
- In the game
void START_PLAYER_SWITCH(Ped from, Ped to, int flags, int switchType)- Hash
0xFAA23F2CBA159D67