# castCinematicActor (Client)

> Has an actor played with the look and element data of a ped, player or vehicle of the session. It applies from the next playback.

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

## Syntax

```lua
bool castCinematicActor(cinematic cinematic, string slot, ped|player|vehicle|false standIn)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `cinematic` | `cinematic` | The cinematic. |
| `slot` | `string` | The actor's name. |
| `standIn` | `ped\|player\|vehicle\|false` | Who lends the look: a ped or player for a ped actor, a vehicle for a vehicle actor. `false` goes back to the recorded look. |

## Returns

`true` if it was cast, `false` if the element is not a cinematic, the actor does not exist or the type does not match.

The actor's interior and alpha stay as recorded.

## Example

```lua
local intro = createCinematic("cinematics/intro.cine")
castCinematicActor(intro, "hero", localPlayer)

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    castCinematicActor(intro, "car", vehicle)
end

playCinematic(intro)
```

## See also

- [getCinematicActors (Client)](https://wiki.mymp.gg/en/getCinematicActors.md): Lists the cinematic's actors: the recorded ones and the placed ones.
- [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.
- [getCinematicActor (Client)](https://wiki.mymp.gg/en/getCinematicActor.md): Returns the local element (ped or vehicle) that plays an actor in the current playback.
