SwitchToMultiFirstpart
DocsSwitchToMultiFirstpart(ped, flags, switchType)Description
You can check if the player is in a Switch state with <code>IS_PLAYER_SWITCH_IN_PROGRESS</code>.
Note: Doesn't act normally when used on Mount Chiliad.
Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | The Ped (player character) for which the switch is initiated. |
flags | int | Flags control various functionalities: 0 for normal behavior, 1 for no transition, and 255 for Switch IN. |
switchType | int | Specifies the type of switch (0 - 3): 0 for 1 step towards ped, 1 for 3 steps out from ped, 2 for 1 step out from ped, and 3 for 1 step towards ped. |
Quick Snippet: Get Ped Handleped
pedUse this to get the player ped handle for this native.
-- Get the player's ped handle (client-side)
local ped = PlayerPedId()
print("Ped handle: " .. ped)
-- For a specific player's ped (server-side):
-- local targetPed = GetPlayerPed(source)Ped Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.
Examples
Official
-- Check if the player is in a Switch "state"
if not IsPlayerSwitchInProgress() then
-- If the player is not already in a Switch state, initiate a Switch
SwitchToMultiFirstPart(PlayerPedId(), 0, 1)
-- In this case, switchType is set to 1, which means "3 steps out from ped"
end