class Streaming
package fivem.client.natives
Static methods
staticGetUsedCreatorModelMemoryPercentage():Float
0.0 = no memory used
1.0 = all memory used
Maximum model memory (as defined in common\data\missioncreatordata.meta) is 100 MiB
GET_*staticIsModelAPed(model:Int):Bool
staticLoadGlobalWaterType(waterType:Int):Dynamic
0 - default 1 - HeistIsland
NativeDB Introduced: v2189staticaddModelToCreatorBudget(modelHash:Int):Bool
staticallowPlayerSwitchAscent():Dynamic
staticallowPlayerSwitchDescent():Dynamic
staticallowPlayerSwitchOutro():Dynamic
staticallowPlayerSwitchPan():Dynamic
staticbeginSrl():Dynamic
staticclearFocus():Dynamic
staticclearHdArea():Dynamic
staticdisableSwitchOutroFx():Dynamic
staticdoesAnimDictExist(animDict:String):Bool
staticenableSwitchPauseBeforeDescent():Dynamic
staticendSrl():Dynamic
Clear the current srl and stop rendering the area selected by PREFETCH_SRL and started with BEGIN_SRL.
staticgetIdealPlayerSwitchType(x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float):Int
x1, y1, z1 -- Coords of your ped model
x2, y2, z2 -- Coords of the ped you want to switch to staticgetLodscale():Float
staticgetNumberOfStreamingRequests():Int
staticgetPlayerShortSwitchState():Int
staticgetPlayerSwitchInterpOutCurrentTime():Dynamic
staticgetPlayerSwitchInterpOutDuration():Int
staticgetPlayerSwitchJumpCutIndex():Int
staticgetPlayerSwitchState():Int
staticgetPlayerSwitchType():Int
statichasAnimDictLoaded(animDict:String):Bool
statichasAnimSetLoaded(animSet:String):Bool
Gets whether the specified animation set has finished loading. An animation set provides movement animations for a ped.
Animation set and clip set are synonymous. See SET_PED_MOVEMENT_CLIPSET.
statichasCollisionForModelLoaded(model:Int):Bool
statichasModelLoaded(model:Int):Bool
Returns whether the specified model (archetype) is currently loaded.
Note that this will return 'true' even if the model has been requested and loaded by something other than the current script, if you're intending to actually use the model in a later frame, you should call REQUEST_MODEL anyway.
statichasNamedPtfxAssetLoaded(fxName:String):Bool
statichasPtfxAssetLoaded():Bool
staticinitCreatorBudget():Dynamic
staticisEntityFocus(entity:Dynamic):Bool
staticisIplActive(iplName:String):Bool
staticisNetworkLoadingScene():Bool
staticisNewLoadSceneActive():Bool
staticisNewLoadSceneLoaded():Bool
staticisPlayerSwitchInProgress():Bool
Returns true if the player is currently switching, false otherwise.
(When the camera is in the sky moving from Trevor to Franklin for example) staticisStreamvolActive():Bool
staticisSwitchReadyForDescent():Bool
staticisSwitchSkippingDescent():Bool
staticloadAllObjectsNow():Dynamic
staticloadScene(x:Float, y:Float, z:Float):Dynamic
staticnetworkStopLoadScene():Dynamic
staticnetworkUpdateLoadScene():Bool
staticnewLoadSceneStart(posX:Float, posY:Float, posZ:Float, offsetX:Float, offsetY:Float, offsetZ:Float, radius:Float, p7:Int):Bool
`radius` value is usually between `3f` and `7000f` in original 1868 scripts.
`p7` is 0, 1, 2, 3 or 4 used in decompiled scripts, 0 is by far the most common.
Returns True if success, used only 7 times in decompiled scripts of 1868staticnewLoadSceneStartSphere(x:Float, y:Float, z:Float, radius:Float, p4:Dynamic):Bool
if (!sub_8f12("START LOAD SCENE SAFE")) {
if (CUTSCENE::GET_CUTSCENE_TIME() > 4178) {
STREAMING::_ACCFB4ACF53551B0(1973.845458984375, 3818.447265625, 32.43629837036133, 15.0, 2);
sub_8e9e("START LOAD SCENE SAFE", 1);
}
}
(Previously known as STREAMING::_NEW_LOAD_SCENE_START_SAFE)staticnewLoadSceneStop():Dynamic
staticoverrideLodscaleThisFrame(scaling:Float):Dynamic
This allows you to override "extended distance scaling" setting. Needs to be called each frame.
Max scaling seems to be 200.0, normal is 1.0
See https://gfycat.com/DetailedHauntingIncaternstaticprefetchSrl(srl:String):Dynamic
This native is used to attribute the SRL that BeginSrl is going to load. This is usually used for 'in-game' cinematics (not cutscenes but camera stuff) instead of SetFocusArea because it loads a specific area of the map which is pretty useful when the camera moves from distant areas. For instance, GTA:O opening cutscene.
https://pastebin.com/2EeKVeLA : a list of SRL found in srllist.meta https://pastebin.com/zd9XYUWY : here is the content of a SRL file opened with codewalker.
staticremoveAnimDict(animDict:String):Dynamic
staticremoveAnimSet(animSet:String):Dynamic
Unloads the specified animation set. An animation set provides movement animations for a ped.
Animation set and clip set are synonymous. See SET_PED_MOVEMENT_CLIPSET.
staticremoveModelFromCreatorBudget(modelHash:Int):Dynamic
staticremoveNamedPtfxAsset(fxName:String):Dynamic
staticremovePtfxAsset():Dynamic
staticrequestAdditionalCollisionAtCoord(x:Float, y:Float, z:Float):Dynamic
staticrequestAnimDict(animDict:String):Dynamic
staticrequestAnimSet(animSet:String):Dynamic
Starts loading the specified animation set. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET.
staticrequestClipSet(clipSet:String):Dynamic
staticrequestCollisionAtCoord(x:Float, y:Float, z:Float):Dynamic
staticrequestCollisionForModel(model:Int):Dynamic
staticrequestMenuPedModel(model:Int):Dynamic
staticrequestModel(model:Int):Dynamic
Request a model (archetype) to be loaded for use by the current script. Use SET_MODEL_AS_NO_LONGER_NEEDED when done using the model in script.
staticrequestModelsInRoom(interior:Int, roomName:String):Dynamic
STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "V_FIB01_cur_elev");
STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo");
STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "V_Office_gnd_lifts");
STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "limbo");
STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "v_fib01_jan_elev");
STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo");staticrequestNamedPtfxAsset(fxName:String):Dynamic
From the b678d decompiled scripts:
STREAMING::REQUEST_NAMED_PTFX_ASSET("core_snow");
STREAMING::REQUEST_NAMED_PTFX_ASSET("fm_mission_controler");
STREAMING::REQUEST_NAMED_PTFX_ASSET("proj_xmas_firework");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_apartment_mp");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_biolab_heist");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_fireworks");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_parachute");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_wheelsmoke");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_cig_plane");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_creator");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_tankbattle");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_ornate_heist");
STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_prison_break_heist_station");staticrequestPtfxAsset():Dynamic
maps script name (thread + 0xD0) by lookup via scriptfx.dat - does nothing when script name is emptystaticsetFocusEntity(entity:Dynamic):Dynamic
It seems to make the entity's coords mark the point from which LOD-distances are measured. In my testing, setting a vehicle as the focus entity and moving that vehicle more than 300 distance units away from the player will make the level of detail around the player go down drastically (shadows disappear, textures go extremely low res, etc). The player seems to be the default focus entity. staticsetFocusPosAndVel(x:Float, y:Float, z:Float, offsetX:Float, offsetY:Float, offsetZ:Float):Dynamic
Override the area where the camera will render the terrain.
p3, p4 and p5 are usually set to 0.0staticsetGamePausesForStreaming(toggle:Bool):Dynamic
staticsetHdArea(x:Float, y:Float, z:Float, radius:Float):Dynamic
staticsetInteriorActive(interiorID:Int, toggle:Bool):Dynamic
staticsetIslandEnabled(islandName:String, toggle:Bool):Dynamic
Enables the specified island. For more information, see islandhopper.meta
NativeDB Introduced: v2189staticsetMapdatacullboxEnabled(name:String, toggle:Bool):Dynamic
Possible p0 values:
"prologue"
"Prologue_Main" staticsetModelAsNoLongerNeeded(model:Int):Dynamic
Releases the script ownership assigned by REQUEST_MODEL. This command should be used when done using a specific model hash in script.
staticsetPedPopulationBudget(budgetLevel:Int):Dynamic
Sets the memory budget level for ped population.
staticsetPlayerShortSwitchStyle(style:Int):Dynamic
staticsetPlayerSwitchEstablishingShot(name:String):Dynamic
All names can be found in playerswitchestablishingshots.metastaticsetPlayerSwitchOutro(cameraCoordX:Float, cameraCoordY:Float, cameraCoordZ:Float, camRotationX:Float, camRotationY:Float, camRotationZ:Float, camFov:Float, camFarClip:Float, rotationOrder:Int):Dynamic
staticsetReducePedModelBudget(toggle:Bool):Dynamic
staticsetReduceVehicleModelBudget(toggle:Bool):Dynamic
staticsetRenderHdOnly(toggle:Bool):Dynamic
staticsetSrlTime(p0:Float):Dynamic
staticsetStreaming(toggle:Bool):Dynamic
staticsetVehiclePopulationBudget(p0:Int):Dynamic
staticshutdownCreatorBudget():Dynamic
staticstartPlayerSwitch(from:Dynamic, to:Dynamic, flags:Int, switchType:Int):Dynamic
enum ePlayerSwitchType
{
SWITCH_TYPE_AUTO = 0,
SWITCH_TYPE_LONG = 1,
SWITCH_TYPE_MEDIUM = 2,
SWITCH_TYPE_SHORT = 3
};
enum eSwitchFlags {
SKIP_INTRO = 1,
SKIP_OUTRO = 2,
PAUSE_BEFORE_PAN = 4,
PAUSE_BEFORE_OUTRO = 8,
SKIP_PAN = 16,
UNKNOWN_DEST = 32,
DESCENT_ONLY = 64,
START_FROM_CAMPOS = 128,
PAUSE_BEFORE_ASCENT = 256,
PAUSE_BEFORE_DESCENT = 512,
ALLOW_SNIPER_AIM_INTRO = 1024,
ALLOW_SNIPER_AIM_OUTRO = 2048,
SKIP_TOP_DESCENT = 4096,
SUPPRESS_OUTRO_FX = 8192,
SUPPRESS_INTRO_FX = 16384,
DELAY_ASCENT_FX = 32768
}staticstopPlayerSwitch():Dynamic
staticstreamvolCreateFrustum(p0:Float, p1:Float, p2:Float, p3:Float, p4:Float, p5:Float, p6:Float, p7:Dynamic, p8:Dynamic):Dynamic
Always returns zero.staticstreamvolCreateLine(p0:Float, p1:Float, p2:Float, p3:Float, p4:Float, p5:Float, p6:Dynamic):Dynamic
Always returns zero.staticstreamvolCreateSphere(x:Float, y:Float, z:Float, rad:Float, p4:Dynamic, p5:Dynamic):Dynamic
Always returns zero.staticstreamvolDelete(unused:Dynamic):Dynamic
staticstreamvolHasLoaded(unused:Dynamic):Bool
staticstreamvolIsValid(unused:Dynamic):Bool
staticswitchToMultiFirstpart(ped:Dynamic, flags:Int, switchType:Int):Dynamic
You can check if the player is in a Switch state with IS_PLAYER_SWITCH_IN_PROGRESS.
*
* ***Note:** Doesn't act normally when used on Mount Chiliad.
staticswitchToMultiSecondpart(ped:Dynamic):Dynamic
After using SWITCH_TO_MULTI_FIRSTPART , use this native to smoothly return the camera to the player's character.