Ped::setSynchronizedSceneLooped

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

Client-Side
Function

 JavaScript



JavaScript Syntax


The `setSynchronizedSceneLooped` function is used to set a synchronized scene to loop or stop looping based on the toggle parameter. This can be particularly useful for animations or sequences that need to be repeated continuously, such as background activities or idle loops.

Required Params

  • sceneID: int – The ID of the synchronized scene.
  • toggle: boolean – `true` to loop the scene, `false` to play once.

Return Value

  • Undefined – This function does not return a value.

Syntax

mp.game.ped.setSynchronizedSceneLooped(sceneID, toggle);

Example

// Example usage of setSynchronizedSceneLooped

const sceneID = mp.game.ped.createSynchronizedScene(x, y, z, rotX, rotY, rotZ, 2); // Sample scene creation
mp.game.ped.setSynchronizedSceneLooped(sceneID, true); // Loop the scene

See Also