# 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.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Cinematics
- **URL**: https://wiki.mymp.gg/en/createCinematic

## Syntax

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

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `source` | `string` | The `.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

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

## See also

- [getCinematicData (Client)](https://wiki.mymp.gg/en/getCinematicData.md): Returns the whole cinematic as .cine bytes, which createCinematic reads back.
- [startCinematicRecording (Client)](https://wiki.mymp.gg/en/startCinematicRecording.md): Starts recording a ped, player or vehicle as an actor of the cinematic. Called again while it records, it adds another actor to the same recording.
- [playCinematic (Client)](https://wiki.mymp.gg/en/playCinematic.md): Plays the cinematic: the actors as local clones, plus the camera, weather, hour, fade, sounds and captions.
- [setCinematicCamera (Client)](https://wiki.mymp.gg/en/setCinematicCamera.md): Sets the camera shots the cinematic directs during playback. It replaces the earlier shots.
