M MY Multiplayer: Wiki
Side
Kind

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.

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

Parameters

NameTypeDescription
cinematiccinematicThe cinematic.
slotstringThe actor's name.
standInped|player|vehicle|falseWho 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

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