M MY Multiplayer: Wiki
Side
Kind

getCinematicActor

Client

Returns the local element (ped or vehicle) that plays an actor in the current playback.

element|false getCinematicActor(cinematic cinematic, string slot)

Parameters

NameTypeDescription
cinematiccinematicThe cinematic.
slotstringThe actor's name.

Returns

The element, or false if nothing is playing or the actor is not in the scene.

Example

local intro = createCinematic("cinematics/intro.cine")
playCinematic(intro)

setTimer(function()
    local hero = getCinematicActor(intro, "hero")
    if hero then
        setElementAlpha(hero, 150)
    end
end, 1000, 1)

See also