M MY Multiplayer: Wiki
Side
Kind

setCinematicProp

Client

Places a vehicle or object that stands still over a part of the cinematic, or changes one already placed.

bool setCinematicProp(cinematic cinematic, string slot, table prop)

Parameters

NameTypeDescription
cinematiccinematicThe cinematic.
slotstringThe actor's name.
proptableA table with type, model, position, rotation, start and stop.

Returns

true if it was placed. false if the table is invalid, slot is a recorded actor or the cinematic is recording, with a warning saying why.

The fields:

  • type: "vehicle" or "object".
  • model: the model's name.
  • position: a vec3.
  • rotation: a vec3 in degrees.
  • start: cinematic time, in ms, at which it appears.
  • stop: time at which it leaves. 0 keeps it to the end.

For a new actor, type, model and position are required. For one already placed, only the given fields change. A ped recording a take may get into a placed vehicle; the vehicle then becomes a recorded actor.

Example

local scene = createCinematic()
setCinematicProp(scene, "getaway", {
    type = "vehicle",
    model = "infernus",
    position = vec3(2495.0, -1680.0, 13.3),
    rotation = vec3(0, 0, 90),
})

See also