Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Games
  • Radical Entertainment
  • The Simpsons: Hit & Run
  • Scripting
  • Console Commands
  • MFK Commands
  • Reward Initialisation

SetCarAttributes

Sets attributes for a car in the phonebooth.

Scope

This command should be called in the rewards file.

Syntax

MFK
Lua
SetCarAttributes( name, top_speed, acceleration, toughness, handling );
Game.SetCarAttributes( name, top_speed, acceleration, toughness, handling )
  • name: The internal name of the car.
  • top_speed: Sets how many stars this car will have for the top speed attribute.
    • Use 0 to 5. Half values such as 1.5 are also supported.
  • acceleration: Sets how many stars this car will have for the acceleration attribute.
    • Use 0 to 5. Half values such as 1.5 are also supported.
  • toughness: Sets how many stars this car will have for the toughness attribute.
    • Use 0 to 5. Half values such as 1.5 are also supported.
  • handling: Sets how many stars this car will have for the handling attribute.
    • Use 0 to 5. Half values such as 1.5 are also supported.

Examples

MFK
Lua
// Both are valid
SetCarAttributes("famil_v", 1, 1.5, 2.5, 4);
SetCarAttributes("famil_v", 1.0, 1.5, 2.5, 4.0);
-- Both are valid
Game.SetCarAttributes("famil_v", 1, 1.5, 2.5, 4)
Game.SetCarAttributes("famil_v", 1.0, 1.5, 2.5, 4.0)

Notes

By default, you can register attributes for up to 50 cars.

Mods can bypass this limit by requiring the Increased Reward Limits hack.