Static methods

@:native("GetGlobalWaterType")staticGetGlobalWaterType():Int

NativeDB Introduced: v2189

@:native("GetUsedCreatorModelMemoryPercentage")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_*

@:native("IsModelAPed")staticIsModelAPed(model:Int):Bool

@:native("LoadGlobalWaterType")staticLoadGlobalWaterType(waterType:Int):Dynamic

0 - default 1 - HeistIsland

NativeDB Introduced: v2189

@:native("AddModelToCreatorBudget")staticaddModelToCreatorBudget(modelHash:Int):Bool

@:native("AllowPlayerSwitchAscent")staticallowPlayerSwitchAscent():Dynamic

@:native("AllowPlayerSwitchDescent")staticallowPlayerSwitchDescent():Dynamic

@:native("AllowPlayerSwitchOutro")staticallowPlayerSwitchOutro():Dynamic

@:native("AllowPlayerSwitchPan")staticallowPlayerSwitchPan():Dynamic

@:native("BeginSrl")staticbeginSrl():Dynamic

@:native("ClearFocus")staticclearFocus():Dynamic

@:native("ClearHdArea")staticclearHdArea():Dynamic

@:native("DisableSwitchOutroFx")staticdisableSwitchOutroFx():Dynamic

@:native("DoesAnimDictExist")staticdoesAnimDictExist(animDict:String):Bool

@:native("EnableSwitchPauseBeforeDescent")staticenableSwitchPauseBeforeDescent():Dynamic

@:native("EndSrl")staticendSrl():Dynamic

Clear the current srl and stop rendering the area selected by PREFETCH_SRL and started with BEGIN_SRL.

@:native("GetIdealPlayerSwitchType")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  

@:native("GetLodscale")staticgetLodscale():Float

@:native("GetNumberOfStreamingRequests")staticgetNumberOfStreamingRequests():Int

@:native("GetPlayerShortSwitchState")staticgetPlayerShortSwitchState():Int

@:native("GetPlayerSwitchInterpOutCurrentTime")staticgetPlayerSwitchInterpOutCurrentTime():Dynamic

@:native("GetPlayerSwitchInterpOutDuration")staticgetPlayerSwitchInterpOutDuration():Int

@:native("GetPlayerSwitchJumpCutIndex")staticgetPlayerSwitchJumpCutIndex():Int

@:native("GetPlayerSwitchState")staticgetPlayerSwitchState():Int

@:native("GetPlayerSwitchType")staticgetPlayerSwitchType():Int

@:native("HasAnimDictLoaded")statichasAnimDictLoaded(animDict:String):Bool

@:native("HasAnimSetLoaded")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.

@:native("HasClipSetLoaded")statichasClipSetLoaded(clipSet:String):Bool

Alias for HAS_ANIM_SET_LOADED.  

@:native("HasCollisionForModelLoaded")statichasCollisionForModelLoaded(model:Int):Bool

@:native("HasModelLoaded")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.

@:native("HasNamedPtfxAssetLoaded")statichasNamedPtfxAssetLoaded(fxName:String):Bool

@:native("HasPtfxAssetLoaded")statichasPtfxAssetLoaded():Bool

@:native("InitCreatorBudget")staticinitCreatorBudget():Dynamic

@:native("IsEntityFocus")staticisEntityFocus(entity:Dynamic):Bool

@:native("IsIplActive")staticisIplActive(iplName:String):Bool

@:native("IsModelAVehicle")staticisModelAVehicle(model:Int):Bool

Returns whether the specified model represents a vehicle.  

@:native("IsModelInCdimage")staticisModelInCdimage(model:Int):Bool

Check if model is in cdimage(rpf)  

@:native("IsModelValid")staticisModelValid(model:Int):Bool

Returns whether the specified model exists in the game.  

@:native("IsNetworkLoadingScene")staticisNetworkLoadingScene():Bool

@:native("IsNewLoadSceneActive")staticisNewLoadSceneActive():Bool

@:native("IsNewLoadSceneLoaded")staticisNewLoadSceneLoaded():Bool

@:native("IsPlayerSwitchInProgress")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)  

@:native("IsSrlLoaded")staticisSrlLoaded():Bool

Returns true when the srl from BEGIN_SRL is loaded.

@:native("IsStreamvolActive")staticisStreamvolActive():Bool

@:native("IsSwitchReadyForDescent")staticisSwitchReadyForDescent():Bool

@:native("IsSwitchSkippingDescent")staticisSwitchSkippingDescent():Bool

@:native("LoadAllObjectsNow")staticloadAllObjectsNow():Dynamic

@:native("LoadScene")staticloadScene(x:Float, y:Float, z:Float):Dynamic

@:native("NetworkStopLoadScene")staticnetworkStopLoadScene():Dynamic

@:native("NetworkUpdateLoadScene")staticnetworkUpdateLoadScene():Bool

@:native("NewLoadSceneStart")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 1868

@:native("NewLoadSceneStartSphere")staticnewLoadSceneStartSphere(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)

@:native("NewLoadSceneStop")staticnewLoadSceneStop():Dynamic

@:native("OverrideLodscaleThisFrame")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/DetailedHauntingIncatern

@:native("PrefetchSrl")staticprefetchSrl(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.

@:native("RemoveAnimDict")staticremoveAnimDict(animDict:String):Dynamic

@:native("RemoveAnimSet")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.

@:native("RemoveClipSet")staticremoveClipSet(clipSet:String):Dynamic

Alias for REMOVE_ANIM_SET.  

@:native("RemoveIpl")staticremoveIpl(iplName:String):Dynamic

IPL list can be found here.

@:native("RemoveModelFromCreatorBudget")staticremoveModelFromCreatorBudget(modelHash:Int):Dynamic

@:native("RemoveNamedPtfxAsset")staticremoveNamedPtfxAsset(fxName:String):Dynamic

@:native("RemovePtfxAsset")staticremovePtfxAsset():Dynamic

@:native("RequestAdditionalCollisionAtCoord")staticrequestAdditionalCollisionAtCoord(x:Float, y:Float, z:Float):Dynamic

@:native("RequestAnimDict")staticrequestAnimDict(animDict:String):Dynamic

@:native("RequestAnimSet")staticrequestAnimSet(animSet:String):Dynamic

Starts loading the specified animation set. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET.

@:native("RequestClipSet")staticrequestClipSet(clipSet:String):Dynamic

@:native("RequestCollisionAtCoord")staticrequestCollisionAtCoord(x:Float, y:Float, z:Float):Dynamic

@:native("RequestCollisionForModel")staticrequestCollisionForModel(model:Int):Dynamic

@:native("RequestIpl")staticrequestIpl(iplName:String):Dynamic

Exemple: REQUEST_IPL("TrevorsTrailerTrash");

@:native("RequestMenuPedModel")staticrequestMenuPedModel(model:Int):Dynamic

@:native("RequestModel")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.

@:native("RequestModelsInRoom")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");

@:native("RequestNamedPtfxAsset")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");

@:native("RequestPtfxAsset")staticrequestPtfxAsset():Dynamic

maps script name (thread + 0xD0) by lookup via scriptfx.dat - does nothing when script name is empty

@:native("SetDitchPoliceModels")staticsetDitchPoliceModels(toggle:Bool):Dynamic

This is a NOP function. It does nothing at all.  

@:native("SetFocusEntity")staticsetFocusEntity(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.  

@:native("SetFocusPosAndVel")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.0

@:native("SetGamePausesForStreaming")staticsetGamePausesForStreaming(toggle:Bool):Dynamic

@:native("SetHdArea")staticsetHdArea(x:Float, y:Float, z:Float, radius:Float):Dynamic

@:native("SetInteriorActive")staticsetInteriorActive(interiorID:Int, toggle:Bool):Dynamic

@:native("SetIslandEnabled")staticsetIslandEnabled(islandName:String, toggle:Bool):Dynamic

Enables the specified island. For more information, see islandhopper.meta

NativeDB Introduced: v2189

@:native("SetMapdatacullboxEnabled")staticsetMapdatacullboxEnabled(name:String, toggle:Bool):Dynamic

Possible p0 values:  
"prologue"  
"Prologue_Main"  

@:native("SetModelAsNoLongerNeeded")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.

@:native("SetPedPopulationBudget")staticsetPedPopulationBudget(budgetLevel:Int):Dynamic

Sets the memory budget level for ped population.

@:native("SetPlayerShortSwitchStyle")staticsetPlayerShortSwitchStyle(style:Int):Dynamic

@:native("SetPlayerSwitchEstablishingShot")staticsetPlayerSwitchEstablishingShot(name:String):Dynamic

All names can be found in playerswitchestablishingshots.meta

@:native("SetPlayerSwitchOutro")staticsetPlayerSwitchOutro(cameraCoordX:Float, cameraCoordY:Float, cameraCoordZ:Float, camRotationX:Float, camRotationY:Float, camRotationZ:Float, camFov:Float, camFarClip:Float, rotationOrder:Int):Dynamic

@:native("SetReducePedModelBudget")staticsetReducePedModelBudget(toggle:Bool):Dynamic

@:native("SetReduceVehicleModelBudget")staticsetReduceVehicleModelBudget(toggle:Bool):Dynamic

@:native("SetRenderHdOnly")staticsetRenderHdOnly(toggle:Bool):Dynamic

@:native("SetSrlTime")staticsetSrlTime(p0:Float):Dynamic

@:native("SetStreaming")staticsetStreaming(toggle:Bool):Dynamic

@:native("SetVehiclePopulationBudget")staticsetVehiclePopulationBudget(p0:Int):Dynamic

@:native("ShutdownCreatorBudget")staticshutdownCreatorBudget():Dynamic

@:native("StartPlayerSwitch")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
}

@:native("StopPlayerSwitch")staticstopPlayerSwitch():Dynamic

@:native("StreamvolCreateFrustum")staticstreamvolCreateFrustum(p0:Float, p1:Float, p2:Float, p3:Float, p4:Float, p5:Float, p6:Float, p7:Dynamic, p8:Dynamic):Dynamic

Always returns zero.

@:native("StreamvolCreateLine")staticstreamvolCreateLine(p0:Float, p1:Float, p2:Float, p3:Float, p4:Float, p5:Float, p6:Dynamic):Dynamic

Always returns zero.

@:native("StreamvolCreateSphere")staticstreamvolCreateSphere(x:Float, y:Float, z:Float, rad:Float, p4:Dynamic, p5:Dynamic):Dynamic

Always returns zero.

@:native("StreamvolDelete")staticstreamvolDelete(unused:Dynamic):Dynamic

@:native("StreamvolHasLoaded")staticstreamvolHasLoaded(unused:Dynamic):Bool

@:native("StreamvolIsValid")staticstreamvolIsValid(unused:Dynamic):Bool

@:native("SwitchToMultiFirstpart")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.

@:native("SwitchToMultiSecondpart")staticswitchToMultiSecondpart(ped:Dynamic):Dynamic

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