Cam::createCinematicShot

From RAGE Multiplayer Wiki
Revision as of 09:36, 2 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


The `createCinematicShot` function in RageMP initiates a cinematic camera shot that can be focused on a specific entity. This function allows you to create a dramatic view, useful for cutscenes or special sequences where a more controlled camera angle is needed.

The parameters `p0`, `p1`, and `p2` are not fully documented, but `entity` specifies the object or player to focus the cinematic shot on.

Required Params

  • p0: unknown – Purpose unknown (requires testing).
  • p1: int – Possibly shot mode/type.
  • p2: unknown – Purpose unknown (requires testing).
  • entity: Entity – The entity handle or object to target for the cinematic shot.

Return Value

  • Undefined – This function does not return a value.

Syntax

mp.game.cam.createCinematicShot(p0, p1, p2, entity);

Example

// Example usage of createCinematicShot
const player = mp.players.local;
const cam = mp.cameras.new("default", new mp.Vector3(0, 0, 10), new mp.Vector3(0, 0, 0), 60);
cam.setActive(true);
mp.game.cam.renderScriptCams(true, false, 0, true, false);

const targetEntity = player.handle; // Replace with any valid entity handle

// Initiate a cinematic shot focused on the player entity
mp.game.cam.createCinematicShot(cam.handle, 1, 0, targetEntity);
mp.gui.chat.push("Cinematic shot created for player.");


See Also

Template:Cam s function c