M MY Multiplayer: Wiki
Side
Kind

createCinematic

Client

Creates a cinematic element, empty or from a saved cinematic. It belongs to the resource that created it and exists on this client only.

cinematic|false createCinematic([string source = ""])

Parameters

NameTypeDescription
sourcestringThe .cine bytes getCinematicData returned, or the path of a .cine file. Empty creates an empty cinematic.default ""

Returns

The cinematic element, or false if the data is damaged, the file does not exist or it is not a cinematic.

A cinematic holds the actors' takes (peds and vehicles), placed vehicles and objects, camera shots, weather, hour, screen fade, sounds and captions. Record with startCinematicRecording, edit with the setCinematic* functions and play with playCinematic.

Example

local intro = createCinematic("cinematics/intro.cine")
if intro then
    playCinematic(intro)
end

See also