class Cutscene
package fivem.client.natives
Static methods
staticGetCutFileNumSections(cutsceneName:String):Int
staticGetCutsceneEndTime():Int
Returns the time of the cutscene's end accounting for REQUEST_CUTSCENE_WITH_PLAYBACK_LIST
If a cutscene is laid out with 10 second sections, and section 0 and 1 are enabled then it would be 20000ms.
NativeDB Introduced: v1734staticcanRequestAssetsForCutsceneEntity():Bool
Returns when it is safe to start applying changes to cutscene entities.
Should always be used for applying components.
See SET_CUTSCENE_PED_COMPONENT_VARIATION_FROM_PED and REGISTER_ENTITY_FOR_CUTSCENE for an example.
This will be true before the cutscene is considered loaded
staticcanSetEnterStateForRegisteredEntity(cutsceneEntName:String, modelHash:Int):Bool
modelHash (p1) was always 0 in R* scripts staticcanSetExitStateForCamera(p0:Bool):Bool
Whether or not it is safe to run functions on the camera, as the camera is now no longer being used by the cutscene.
staticcanSetExitStateForRegisteredEntity(cutsceneEntName:String, modelHash:Int):Bool
Returns if the script can begin interacting with the registered entity. Primarly used for lead-outs of cutscenes. Returns on frame after cutscene ends, so you cannot get is while using IsCutsceneActive()
Whether it is safe to start doing scripted actions on the entity, like simulating walking out of a cutscene.
staticdoesCutsceneEntityExist(cutsceneEntName:String, modelHash:Int):Bool
staticgetCutsceneSectionPlaying():Int
staticgetCutsceneTotalDuration():Int
Gets the total length of the cutscene irrespective of playback list in milliseconds
To account for sections, see _GET_CUTSCENE_END_TIME
staticgetEntityIndexOfCutsceneEntity(cutsceneEntName:String, modelHash:Int):Dynamic
Returns the handle of a cutscene entity, can be ped
staticgetEntityIndexOfRegisteredEntity(cutsceneEntName:String, modelHash:Int):Dynamic
statichasCutFileLoaded(cutsceneName:String):Bool
Simply checks if the cutscene has loaded and doesn't check via CutSceneManager as opposed to HAS_[THIS]_CUTSCENE_LOADED.statichasCutsceneCutThisFrame():Bool
statichasCutsceneFinished():Bool
statichasCutsceneLoaded():Bool
statichasThisCutsceneLoaded(cutsceneName:String):Bool
staticisCutsceneActive():Bool
staticisCutscenePlaybackFlagSet(flag:Int):Bool
staticisCutscenePlaying():Bool
staticregisterEntityForCutscene(cutsceneEntity:Dynamic, cutsceneEntName:String, p2:Int, modelHash:Int, p4:Int):Dynamic
This can only be run once CAN_REQUEST_ASSETS_FOR_CUTSCENE_ENTITY is true, but can be run before HAS_CUTSCENE_LOADED
staticremoveCutFile(cutsceneName:String):Dynamic
Simply unloads the cutscene and doesn't do extra stuff that REMOVE_CUTSCENE does.staticremoveCutscene():Dynamic
staticrequestCutFile(cutsceneName:String):Dynamic
Simply loads the cutscene and doesn't do extra stuff that REQUEST_CUTSCENE does.staticrequestCutscene(cutsceneName:String, flags:Int):Dynamic
staticrequestCutsceneWithPlaybackList(cutsceneName:String, playbackFlags:Int, flags:Int):Dynamic
playbackFlags: Which scenes should be played.
Example: 0x105 (bit 0, 2 and 8 set) will enable scene 1, 3 and 9.staticsetCutsceneCanBeSkipped(p0:Bool):Dynamic
staticsetCutsceneEntityStreamingFlags(cutsceneEntName:String, p1:Int, p2:Int):Dynamic
Only used in networked environment with MP cutscenes
staticsetCutsceneFadeValues(p0:Bool, p1:Bool, p2:Bool, p3:Bool):Dynamic
staticsetCutsceneOrigin(x:Float, y:Float, z:Float, heading:Float, p4:Int):Dynamic
Sets cutscene location, used for multiplayer apartments/businesses.
staticsetCutscenePedComponentVariation(cutsceneEntName:String, componentId:Int, drawableId:Int, textureId:Int, modelHash:Int):Dynamic
staticsetCutscenePedComponentVariationFromPed(cutsceneEntName:String, ped:Dynamic, modelHash:Int):Dynamic
Sets the components for a cutscene ped, this will take precendence over the cutscene's component overrides. This does not require the entity be registered.
See
staticsetCutscenePedPropVariation(cutsceneEntName:String, componentId:Int, drawableId:Int, textureId:Int, modelHash:Int):Dynamic
staticsetCutsceneTriggerArea(p0:Float, p1:Float, p2:Float, p3:Float, p4:Float, p5:Float):Dynamic
Only used twice in R* scripts staticstartCutsceneAtCoords(x:Float, y:Float, z:Float, flags:Int):Dynamic
Similar to SET_CUTSCENE_ORIGIN but without heading and doesn't need START_CUTSCENE
staticstopCutscene(p0:Bool):Dynamic
staticstopCutsceneImmediately():Dynamic
Stop cutscene instantly, will dump registered entities right where they were when ran.