Player::taskStartScenarioInPlace

From RAGE Multiplayer Wiki
Revision as of 13:13, 26 October 2018 by Rootcause (talk | contribs) (Replaced HTML with template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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