Player::taskStartScenarioInPlace

From RAGE Multiplayer Wiki

Plays a scenario on a player at their current location.

Syntax

player.taskStartScenarioInPlace(scenarioName, unkDelay, playEnterAnim);

Required Arguments

  • scenarioName: String ( Scenario List )
  • unkDelay: Int (0 or -1 loops infinitely, anything else will only make it run once)
  • playEnterAnim: Boolean (True = Play the 'enter' animation, False = Exit animation)

Example

This will play the drilling scenario and constantly loop.

Client-Side
mp.events.add('playDrillScenario', () => {
    mp.players.local.taskStartScenarioInPlace('WORLD_HUMAN_CONST_DRILL', 0, false);
});

See also