Native referenceFiveM

SWITCH_TO_MULTI_SECONDPART

0xD8295AF639FD9CB8 STREAMING
FUNCTION SIGNATURE
void SWITCH_TO_MULTI_SECONDPART(Ped ped);
Property Value
Native Name SWITCH_TO_MULTI_SECONDPART
Hash 0xD8295AF639FD9CB8
Return Type void
Parameters ped (Ped)

Description: After using SWITCH_TO_MULTI_FIRSTPART , use this native to smoothly return the camera to the player's character.

Examples

RegisterCommand("switchPlayer", function()
    if IsPlayerSwitchInProgress() then return end
    local ped = PlayerPedId()
    SwitchToMultiFirstPart(ped, 0, 1)
    Citizen.Wait(5000)
    SwitchToMultiSecondPart(ped)
end, false)
RegisterCommand("switchPlayer", () => {
    if (IsPlayerSwitchInProgress()) return;
    const ped = PlayerPedId();
    SwitchToMultiFirstPart(ped, 0, 1);
    Delay(5000); // Delay doesn't exist, you have to make it yourself
    SwitchToMultiSecondPart(ped);
}, false);
using static CitizenFX.Core.Native.API;
RegisterCommand("switchPlayer", new Action<int, List<object>, string>(async (user, args, raw) =>
{
    if (IsPlayerSwitchInProgress()) return;
    Ped ped = PlayerPedId();
    SwitchToMultiFirstPart(ped, 0, 1);
    await Delay(5000);
    SwitchToMultiSecondPart(ped);
}), false);
Back to STREAMING