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
| Name | Type | Description |
|---|---|---|
| cinematic | cinematic | The cinematic. |
| slot | string | The 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)