# startCinematicRecording (Client)

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

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

## Syntax

```lua
bool startCinematicRecording(cinematic cinematic, string slot, ped|vehicle actor [, int time = nil])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `cinematic` | `cinematic` | The cinematic. |
| `slot` | `string` | The actor's name. A take already recorded under that name is replaced. |
| `actor` | `ped\|vehicle` | The ped, player or vehicle to record. |
| `time` | `int` | Cinematic time, in ms, from which the actor is recorded again. Without it, the take is recorded from scratch. *(default: `nil`)* |

## Returns

`true` if recording started, `false` if the cinematic is playing, the element is already being recorded or re-recording from `time` is not possible.

The other actors that already have a take play while one records. A recorded ped takes along every vehicle it gets into.

With `time`, the actor `slot` must exist and be a ped with a recorded take, at speed 1 and on foot at that moment, and the ped must be controlled by this client. For the 2 seconds before `time` the ped follows the earlier take, hidden; then it takes over.

## Example

```lua
local scene = createCinematic()

addCommandHandler("rec", function()
    startCinematicRecording(scene, "hero", localPlayer)
end)

addCommandHandler("stoprec", function()
    stopCinematicRecording(scene)
end)
```

## See also

- [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.
- [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.
- [getCinematicActors (Client)](https://wiki.mymp.gg/en/getCinematicActors.md): Lists the cinematic's actors: the recorded ones and the placed ones.
- [setCinematicProp (Client)](https://wiki.mymp.gg/en/setCinematicProp.md): Places a vehicle or object that stands still over a part of the cinematic, or changes one already placed.
