Streaming::startPlayerSwitch
// this enum comes directly from R* so don't edit this
enum ePlayerSwitchTypes
{
SWITCH_TYPE_AUTO,
SWITCH_TYPE_LONG,
SWITCH_TYPE_MEDIUM,
SWITCH_TYPE_SHORT
};
Use GET_IDEAL_PLAYER_SWITCH_TYPE for the best switch type.
----------------------------------------------------
Examples from the decompiled scripts:
STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 0, 3);
STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 2050, 3);
STREAMING::START_PLAYER_SWITCH(PLAYER::PLAYER_PED_ID(), l_832._f3, 1024, 3);
STREAMING::START_PLAYER_SWITCH(g_141F27, PLAYER::PLAYER_PED_ID(), 513, v_14);
Note: DO NOT, use SWITCH_TYPE_LONG with flag 513. It leaves you stuck in the clouds. You'll have to call STOP_PLAYER_SWITCH() to return to your ped.
Flag 8 w/ SWITCH_TYPE_LONG will zoom out 3 steps, then zoom in 2/3 steps and stop on the 3rd and just hang there.
Flag 8 w/ SWITCH_TYPE_MEDIUM will zoom out 1 step, and just hang there.
Syntax
mp.game.streaming.startPlayerSwitch(from, to, flags, switchType);
Required Arguments
- from: Ped handle or object
- to: Ped handle or object
- flags: int
- switchType: int
Return value
- Undefined
Example
// todo
See also
- mp.game.streaming.loadAllObjectsNow
- mp.game.streaming.loadScene
- mp.game.streaming.networkUpdateLoadScene
- mp.game.streaming.isNetworkLoadingScene
- mp.game.streaming.setInteriorActive
- mp.game.streaming.requestModel
- mp.game.streaming.requestMenuPedModel
- mp.game.streaming.requestModel2
- mp.game.streaming.hasModelLoaded
- mp.game.streaming.requestModelsInRoom
- mp.game.streaming.setModelAsNoLongerNeeded
- mp.game.streaming.isModelInCdimage
- mp.game.streaming.isModelValid
- mp.game.streaming.isModelAPed
- mp.game.streaming.isModelAVehicle
- mp.game.streaming.requestCollisionAtCoord
- mp.game.streaming.requestCollisionForModel
- mp.game.streaming.hasCollisionForModelLoaded
- mp.game.streaming.requestAdditionalCollisionAtCoord
- mp.game.streaming.doesAnimDictExist
- mp.game.streaming.requestAnimDict
- mp.game.streaming.hasAnimDictLoaded
- mp.game.streaming.removeAnimDict
- mp.game.streaming.requestAnimSet
- mp.game.streaming.hasAnimSetLoaded
- mp.game.streaming.removeAnimSet
- mp.game.streaming.requestClipSet
- mp.game.streaming.hasClipSetLoaded
- mp.game.streaming.removeClipSet
- mp.game.streaming.requestIpl
- mp.game.streaming.removeIpl
- mp.game.streaming.isIplActive
- mp.game.streaming.set
- mp.game.streaming.setStreaming
- mp.game.streaming.loadGlobalWaterType
- mp.game.streaming.getGlobalWaterType
- mp.game.streaming.setGamePausesFor
- mp.game.streaming.setGamePausesForStreaming
- mp.game.streaming.setReducePedModelBudget
- mp.game.streaming.setReduceVehicleModelBudget
- mp.game.streaming.setDitchPoliceModels
- mp.game.streaming.getNumberOfRequests
- mp.game.streaming.requestPtfxAsset
- mp.game.streaming.hasPtfxAssetLoaded
- mp.game.streaming.removePtfxAsset
- mp.game.streaming.requestNamedPtfxAsset
- mp.game.streaming.hasNamedPtfxAssetLoaded
- mp.game.streaming.removeNamedPtfxAsset
- mp.game.streaming.setVehiclePopulationBudget
- mp.game.streaming.setPedPopulationBudget
- mp.game.streaming.clearFocus
- mp.game.streaming.setFocusPosAndVel
- mp.game.streaming.setFocusArea
- mp.game.streaming.setFocusEntity
- mp.game.streaming.isEntityFocus
- mp.game.streaming.setMapdatacullboxEnabled
- mp.game.streaming.streamvolCreateSphere
- mp.game.streaming.setUnkCameraSettings
- mp.game.streaming.streamvolCreateFrustum
- mp.game.streaming.streamvolCreateLine
- mp.game.streaming.streamvolDelete
- mp.game.streaming.streamvolHasLoaded
- mp.game.streaming.streamvolIsValid
- mp.game.streaming.isStreamvolActive
- mp.game.streaming.newLoadSceneStart
- mp.game.streaming.newLoadSceneStartSphere
- mp.game.streaming.newLoadSceneStartSafe
- mp.game.streaming.newLoadSceneStop
- mp.game.streaming.isNewLoadSceneActive
- mp.game.streaming.isNewLoadSceneLoaded
- mp.game.streaming.startPlayerSwitch
- mp.game.streaming.stopPlayerSwitch
- mp.game.streaming.isPlayerSwitchInProgress
- mp.game.streaming.getPlayerSwitchType
- mp.game.streaming.getIdealPlayerSwitchType
- mp.game.streaming.getPlayerSwitchState
- mp.game.streaming.getPlayerShortSwitchState
- mp.game.streaming.getPlayerSwitchJumpCutIndex
- mp.game.streaming.setPlayerSwitchOutro
- mp.game.streaming.setPlayerSwitchLocation
- mp.game.streaming.setPlayerSwitchEstablishingShot
- mp.game.streaming.allowPlayerSwitchPan
- mp.game.streaming.allowPlayerSwitchOutro
- mp.game.streaming.allowPlayerSwitchAscent
- mp.game.streaming.allowPlayerSwitchDescent
- mp.game.streaming.isSwitchReadyForDescent
- mp.game.streaming.enableSwitchPauseBeforeDescent
- mp.game.streaming.disableSwitchOutroFx
- mp.game.streaming.switchOutPlayer
- mp.game.streaming.switchInPlayer
- mp.game.streaming.getPlayerSwitchInterpOutDuration
- mp.game.streaming.getPlayerSwitchInterpOutCurrentTime
- mp.game.streaming.isSwitchSkippingDescent
- mp.game.streaming.getLodscale
- mp.game.streaming.overrideLodscaleThisFrame
- mp.game.streaming.setRenderHdOnly
- mp.game.streaming.prefetchSrl
- mp.game.streaming.isSrlLoaded
- mp.game.streaming.beginSrl
- mp.game.streaming.endSrl
- mp.game.streaming.setSrlTime
- mp.game.streaming.setHdArea
- mp.game.streaming.clearHdArea
- mp.game.streaming.initCreatorBudget
- mp.game.streaming.shutdownCreatorBudget
- mp.game.streaming.addModelToCreatorBudget
- mp.game.streaming.removeModelFromCreatorBudget
- mp.game.streaming.getUsedCreatorModelMemoryPercentage
- mp.game.streaming.setIslandHopperEnabled
- mp.game.streaming.getAllModelNames
- mp.game.streaming.getAllModelHashes
- mp.game.streaming.getModelNameFromHash
- mp.game.streaming.forceStreamingUpdate
- mp.game.streaming.requestAnimDictAsync
- mp.game.streaming.requestRuntimeAssetFromUrl
- mp.game.streaming.releaseRuntimeAsset