Available since Version 1.27.
Gets the number of for sale cars that the player has purchased in the given level.
Syntax
GetLevelNumCarsPurchased( level )Arguments
- level (integer): The level to check.
- Between 1 and 7 or the max
Levelsset by the Custom Stats Totals hack, if it is loaded.
- Between 1 and 7 or the max
Return Values
- (integer | nil): The number of cars the player has purchased or
nilif unavailable.
Examples
local NumberOfCarsHomerHasBought = GetLevelNumCarsPurchased(1)
if NumberOfCarsHomerHasBought ~= nil and NumberOfCarsHomerHasBought > 2 then
-- Do something now that Homer has way too many cars for one man
end