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.
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
local scene = createCinematic()
addCommandHandler("rec", function()
startCinematicRecording(scene, "hero", localPlayer)
end)
addCommandHandler("stoprec", function()
stopCinematicRecording(scene)
end)