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
  • Modding Tools
  • Lucas' Simpsons Hit & Run Mod Launcher
  • Hacks
  • Mod Requirable Hacks
  • Additional Script Functionality
  • Console Commands
  • MFK Commands
  • Mission Initialisation
  • Stages
  • Stage Vehicles

SetStageVehicleAllowSeatSlide

Available since Version 1.19.

Sets whether or not a vehicle allows seat sliding for a stage.

Scope

This command should be called between calls to AddStage and CloseStage in a mission's initialisation script.

Syntax

MFK
Lua
SetStageVehicleAllowSeatSlide( car, allow_seat_slide );
Game.SetStageVehicleAllowSeatSlide( car, allow_seat_slide )
  • car: The name of the car.
    • current: The player's current vehicle.
  • allow_seat_slide: Whether or not to allow seat slide.

Examples

MFK
Lua
AddStage();
	AddStageVehicleCharacter("current", "lisa");

	// Lisa is now in the passenger seat so we need to block it.
	SetStageVehicleAllowSeatSlide("current", 0);

	AddObjective("dummy");
	CloseObjective();
CloseStage();

AddStage();
	RemoveStageVehicleCharacter("current", "lisa");

	// Lisa is no longer in the seat so re-enable seat slide
	SetStageVehicleAllowSeatSlide("current", 1);

	AddObjective("dummy");
	CloseObjective();
CloseStage();
Game.AddStage() 
	Game.AddStageVehicleCharacter("current", "lisa")

	-- Lisa is now in the passenger seat so we need to block it.
	Game.SetStageVehicleAllowSeatSlide("current", 0)

	Game.AddObjective("dummy")
	Game.CloseObjective()
Game.CloseStage()

Game.AddStage() 
	Game.RemoveStageVehicleCharacter("current", "lisa")

	-- Lisa is no longer in the seat so re-enable seat slide
	Game.SetStageVehicleAllowSeatSlide("current", 1)

	Game.AddObjective("dummy")
	Game.CloseObjective()
Game.CloseStage()

Notes

This command is really only useful for the player's car at this time as there is no intended way to enter a stage vehicle.