Games > The Simpsons Hit & Run > Console File Commands > MFK Commands > Levels > Traffic > AddTrafficModel


This command adds a vehicle to a traffic group.


This command should be called in a level's initialisation script (leveli.mfk).

Additionally, it must be called between calls to CreateTrafficGroup and CloseTrafficGroup.


AddTrafficModel( car, amount, [no_park] );

Game.AddTrafficModel( car, amount, [no_park] )

  • car: The name of the car to add.
  • amount: How many instances of the car can appear at once.
  • no_park: Prevent the vehicle from spawning idle on Type 3 Locators with the Parked Car flag.
    • Optional, defaults to 0 (which allows it to be parked).


	AddTrafficModel("minivanA", 2); 	// 2 instances, can appear parked
	AddTrafficModel("glastruc", 1, 1); 	// 1 instance, cannot appear parked
	AddTrafficModel("schoolbu", 1, 1);
	AddTrafficModel("pickupA", 1);

	Game.AddTrafficModel("minivanA", 2) 	-- 2 instances, can appear parked
	Game.AddTrafficModel("glastruc", 1, 1)	-- 1 instance, cannot appear parked
	Game.AddTrafficModel("schoolbu", 1, 1)
	Game.AddTrafficModel("pickupA", 1)


By default, the combined total of all the amount values for each call to this command must amount to 5 or the game will crash.

You can have more or less by using the Mod Launcher's Custom Traffic Support hack.

Donut Team © 2023 · v4.0