M MY Multiplayer: Wiki
Side
Kind

getCinematicActors

Client

Lists the cinematic's actors: the recorded ones and the placed ones.

table|false getCinematicActors(cinematic cinematic)

Parameters

NameTypeDescription
cinematiccinematicThe cinematic.

Returns

A table with one entry per actor, or false if the element is not a cinematic.

Common fields

Every actor entry includes:

  • slot: the actor's name.
  • type: "ped", "vehicle" or "object".
  • recorded: true if the actor has a recorded take, false otherwise.

Placed actors

An actor placed with setCinematicProp also includes:

  • placed: true.
  • model: model ID or name.
  • position and rotation: vec3 values (rotation in degrees).
  • start and stop: visibility window in cinematic ms.

Recorded actors

A recorded actor also includes:

  • at, speed, start and stop (the part shown), plus takeStart and takeEnd (where the take starts and ends), all in cinematic ms.
  • voice: how many voice frames the actor spoke.
  • seats: a list of { time, change, vehicle, seat } entries, where change is "entering", "in", "leaving" or "out", vehicle is the vehicle actor's name and seat is the seat index (0 is the driver's).

Example

local intro = createCinematic("cinematics/intro.cine")
for _, actor in ipairs(getCinematicActors(intro)) do
    outputDebugString(("%s (%s) from %d to %d ms"):format(actor.slot, actor.type, actor.start, actor.stop))
end

See also