Checks if any of the given cheats are enabled.
Scope
This command can be called anywhere.
Syntax
IfAnyCheatEnabled( ...cheats )Game.IfAnyCheatEnabled( ...cheats )- ...cheats: Specify up to 15 cheats as separate arguments.
- UnlockAllOutfits
- UnlockAllStoryMissions
- UnlockAllMovies
- UnlockAllRewardVehicles
- UnlockAllCameras
- NoTopSpeed
- HighAcceleration
- CarJumpOnHorn
- FlamingCar
- OneTapTrafficDeath
- x5StageTime
- KickSwapsCharacterModel
- PlayCreditsDialogue
- ShowSpeedometer
- RedBrick
- InvincibleCar
- ShowTree
- Trippy
Examples
AddStage();
IfAnyCheatEnabled("InvincibleCar", "HighAcceleration")
{
// do something differently for this stage if the user is a filthy cheater
// in any of these specific ways
}
AddObjective("dummy");
CloseObjective();
CloseStage();Game.AddStage()
Game.IfAnyCheatEnabled("InvincibleCar", "HighAcceleration")
-- do something differently for this stage if the user is a filthy cheater
-- in any of these specific ways
Game.EndIf()
Game.AddObjective("dummy")
Game.CloseObjective()
Game.CloseStage()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.
Lua scripts can also use the global Cheat table in place of the bit flags or strings, for convenience.