Checks if the player's current car is one of the given cars.
Scope
This command can be called anywhere.
Syntax
IfCurrentCar( ...cars )Game.IfCurrentCar( ...cars )- ...cars: List up to 15 car names to check as separate arguments.
- Car names are case-insensitive.
Examples
IfCurrentCar("famil_v", "honor_v")
{
// Add an extra stage when the player started the mission
// in the Family Sedan or Honor Roller
AddStage();
// ...
CloseStage();
}Game.IfCurrentCar("famil_v", "honor_v")
-- Add an extra stage when the player started the mission
-- in the Family Sedan or Honor Roller
Game.AddStage()
-- ...
Game.CloseStage()
Game.EndIf()Notes
Due to the nature of how console scripts work in the game, all conditional commands are evaluated at the time the script is executed. This unfortunately limits the utility of many of these types of commands, but we believe they still have some use cases even with this limitation.