Available since Version 1.27.
Gets what mission the player is currently in.
Syntax
GetCurrentMission()Arguments
No arguments.
Return Values
- (string | nil): The internal name of the mission the player is currently in or
nilif the player is not in game. - (integer | nil): The index of the mission the player is currently in or
nilif the player is not in game.
Examples
local CurrentMissionName, CurrentMissionIndex = GetCurrentMission()
if CurrentMissionName == "m1sd" then
-- Do something here if this path handler is executed during the first mission's sunday drive
elseif CurrentMissionName == "m1" then
-- Do something else if it is executed during the actual mission
end