# getCinematicData (Client)

> Returns the whole cinematic as `.cine` bytes, which `createCinematic` reads back.

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

## Syntax

```lua
string|false getCinematicData(cinematic cinematic)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `cinematic` | `cinematic` | The cinematic. |

## Returns

A string with the bytes, or `false` if the element is not a cinematic, it is still recording or it could not be written.

## Example

```lua
local function saveCinematic(cinematic, path)
    local data = getCinematicData(cinematic)
    if not data then
        return false
    end
    local file = fileCreate(path)
    fileWrite(file, data)
    fileClose(file)
    return true
end
```

## See also

- [createCinematic (Client)](https://wiki.mymp.gg/en/createCinematic.md): Creates a cinematic element, empty or from a saved cinematic. It belongs to the resource that created it and exists on this client only.
- [fileWrite (Shared)](https://wiki.mymp.gg/en/fileWrite.md): Writes one or more texts to a file, at the current position.
- [stopCinematicRecording (Client)](https://wiki.mymp.gg/en/stopCinematicRecording.md): Stops the cinematic's recording. The other actors that were playing during the recording stop too.
