PlayPlayerScenario

From GT-MP
Jump to: navigation, search
PlayPlayerScenario
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

Makes the specified player play the specified scenario. See Ped Scenarios.

Syntax

In C#
Server-Side Function

API.playPlayerScenario(Client player, string scenarioName);

Required Arguments

  • player: parameter input should be in Client type.
  • scenarioName: parameter input should be in string type.

In Javascript
Client-Side Function

Variation 1:

API.playPlayerScenario(string scenarioName);

Required Arguments

  • scenarioName: parameter input should be in string type.


Varitation 2:

API.playPlayerScenario(string scenarioName, bool playEnterAnim);

Required Arguments

  • scenarioName: parameter input should be in string type.
  • playEnterAnim: parameter input should be in bool type.

Usage example(s)

In C#
Server-Side Function

API.playPlayerScenario(Client player, string scenarioName);

In Javascript
Client-Side Function

API.playPlayerScenario(string scenarioName);

References