Forum Mod Bakery Docs

M7L1 Crashing

Posted in Support
Please login to contribute to the conversation.
to your question , yes
If you want the player to start in their vehicle every time the mission begins, you'll need to include this line in the first stage of the mission:
PutMFPlayerInCar();
This will put the player in their vehicle every time the mission begins (including the first time).
doenst work , it is like this after i put the MFP thing (obviously this is only the stage, not the complete mission)
AddStage(1);
PutMFPlayerInCar();
 RESET_TO_HERE();
 SetMaxTraffic(2); //for this race, reduce traffic to prevent overwhelming the user
 SetStageMessageIndex(18);
 SetHUDIcon( "mansion" );
 ShowStageComplete();
 //ActivateVehicle("smith_v","NULL","race");
 AddStageVehicle("smith_v","m7_smithers_carstart","race","Missions\level01\L1cop.con", "smithers");
        AddStageVehicle("pickupA","m7_lenny_carstart","race","Missions\level01\L1cop.con", "male4");
        AddStageVehicle("sedanA","m7_worker_carstart","race","Missions\level01\L1cop.con", "male2");
        AddStageVehicle("minivanA","m5_sedan","NULL","Missions\level06\sr3_1st.con", "male3");
//SetStageAIRaceCatchupParams( 
// STAGEVEHICLENAME,
//      ALONGROADDISTFROMPLAYER_TO_APPLYMAXCATCHUP, // default = 80
//      FRACTIONPLAYERSPEED_MINCATCHUP,   // default = 0.5
//      FRACTIONPLAYERSPEED_NOCATCHUP,    // default = 1.1
//      FRACTIONPLAYERSPEED_MAXCATCHUP )  // default = 1.7 AddStageWaypoint( "m7_smithers_race1" );
//SetStageAIRaceCatchupParams("smith_v", 80, 0.5, 1.1, 1.7); 
//SetStageAIRaceCatchupParams("smith_v", 80, 0.75, 1.1, 2.3); 
SetStageAIRaceCatchupParams("smith_v", 80, 0.5, 1.0, 1.5);
SetStageAIRaceCatchupParams("pickupA", 80, 0.5, 1.0, 1.5);
SetStageAIRaceCatchupParams("sedanA", 80, 0.5, 1.0, 1.5);
// SetVehicleAIParams( "smith_v", -10, -9 );   // no shortcuts
 AddStageWaypoint( "m7_smithers_race1" );
 AddStageWaypoint( "m5_smithers_nav1" );
 AddStageWaypoint( "m7_smithers_race1b" );
 AddStageWaypoint( "m7_smithers_race9" );
 AddObjective( "race","both");
  AddNPC("burns", "m7_burns_place");
  AddCollectible("m7_smithers_race1");
  AddCollectible("m7_smithers_race2");
  AddCollectible("m7_smithers_race3");
  //AddCollectible("m7_smithers_race4");
  AddCollectible("m7_smithers_race5");
  AddCollectible("m7_smithers_race6");
  AddCollectible("m7_smithers_race7");
  AddCollectible("m7_smithers_race9");
 CloseObjective();
AddCondition("position");
SetConditionPosition(1);
CloseCondition();
 StageStartMusicEvent("M7_drama");
CloseStage();
Let me ask this - What are you trying to DO in this mission? (i.e. What are the objectives in this mission?)
1- Normal Race against Smithers and Two Random Characters (workers of Power Plant) (and with Forced Car)
2- Escape the Minivan after i finish the Race
3- Talk to Mr. Burns
4- Mission Completes
In that case, let's try this...
SelectMission("m7");
SetMissionResetPlayerInCar("m7_wagon");
SetDynaLoadData("l1z6.p3d;l1r6.p3d;");
InitLevelPlayerVehicle("wagonA", "m7_wagon", "AI");
SetPedGroup(7);
SetForcedCar();
StreetRacePropsLoad("l1m7door.p3d;");
StreetRacePropsUnload("l1m7door.p3d:");

AddStage();
   RESET_TO_HERE();
   PutMFPlayerInCar();
   SetMaxTraffic(2);
   SetStageMessageIndex(18);
   SetHUDIcon("mansion");
   ShowStageComplete();
   AddStageVehicle("smith_v", "m7_smithers_carstart", "race", "Missions\level01\M7race.con", "smithers");
      SetStageAIRaceCatchupParams("smith_v", 80, 0.5, 1.0, 1.5);
   AddStageVehicle("pickupA", "m7_lenny_carstart", "race", "Missions\level01\L1cop.con", "male2");
      SetStageAIRaceCatchupParams("pickupA", 80, 0.5, 1.0, 1.5);
   AddStageVehicle("sedanA", "m7_worker_carstart", "race", "Missions\level01\L1cop.con", "male2");
      SetStageAIRaceCatchupParams("sedanA", 80, 0.5, 1.0, 1.5);
   AddStageWaypoint( "m7_smithers_race1" );
   AddStageWaypoint( "m7_smithers_nav1" );
   AddStageWaypoint( "m7_smithers_race1b" );
   AddStageWaypoint( "m7_smithers_race9" );
   AddObjective("race", "both");
      AddNPC("burns", "m7_burns_place");
      AddCollectible("m7_smithers_race1");
      AddCollectible("m7_smithers_race2");
      AddCollectible("m7_smithers_race3");
      AddCollectible("m7_smithers_race5");
      AddCollectible("m7_smithers_race6");
      AddCollectible("m7_smithers_race7");
      AddCollectible("m7_smithers_race9");
   CloseObjective();
   AddCondition("position");
      SetConditionPosition(1);
   CloseCondition();
   StageStartMusicEvent("m7_drama");
CloseStage();

AddStage();
   AddStageVehicle("minivanA", "m5_sedan", "chase", "Missions\level06\sr3_1st.con", "male3");
   SetMaxTraffic(2);
   SetHUDIcon("bsedan_v");
   SetStageMessageIndex(258);
   SetStageTime(45);
   AddObjective("losetail");
      AddNPC("burns", "m7_burns_place");
      SetObjTargetVehicle("minivanA");
      SetObjDistance(200);
   CloseObjective();
   AddCondition( "outofvehicle" )
      SetCondTime(10000);
   CloseCondition();
   AddCondition("damage");
      SetCondMinHealth( 0.0 );
      SetCondTargetVehicle("current");
   CloseCondition();
   AddCondition("timeout");
   CloseCondition();
   ShowStageComplete();
CloseStage();

AddStage();
   SetHUDIcon("burns");
   SetMaxTraffic(2);
   SetStageMessageIndex(19);
   AddObjective( "talkto" );
      AddNPC("burns", "m7_burns_place");
      AddObjectiveNPCWaypoint("burns", "m7_burns_walk_1");
      SetTalkToTarget("burns");
   CloseObjective();
   SetCompletionDialog("there");
CloseStage();

AddStage("final");
   AddObjective("dialog");
      // INSERT MISSION DIALOGUE HERE!
   CloseObjective();
CloseStage();

CloseMission();

...and this would be the load file:
LoadP3DFile("art\missions\level01\m7.p3d");
LoadDisposableCar("art\cars\smith_v.p3d", "smith_v", "AI");
LoadDisposableCar("art\cars\pickupA.p3d", "pickupA", "AI");
LoadDisposableCar("art\cars\sedanA.p3d", "sedanA", "AI");
LoadDisposableCar("art\cars\minivanA.p3d", "minivanA", "AI");
LoadDisposableCar("art\cars\wagonA.p3d", "wagonA", "OTHER");
LoadP3DFile("art\frontend\dynaload\images\msnicons\location\mansion.p3d");
LoadP3DFile("art\frontend\dynaload\images\msnicons\vehicle\bsedan_v.p3d");
LoadP3DFile("art\frontend\dynaload\images\msnicons\char\burns.p3d");
Make sure all the locations are mentioned in the m7.p3d file!
:( it didnt worked , i copy and paste it , and make it  the normal format
can you use Pastebin or send me a download link? the format messes up ;(
I believe I figured out the issue. The problem is the minivanA car you're trying to add during the race stage. For whatever reason, the game dislikes that being added with the other cars being set to "race". To fix this, I threw it into a get into your car stage that the game skips over because the player is forced into the car anyway. Along with that, I removed a bunch of commented out things.

Here's the fixed m7i.mfk.

Here's the fixed m7l.mfk.

I've tested this myself by setting up a simple mod with this script in it, and the mission appears to work flawlessly. If it isn't working for you, please let me know.
Thank you soo much! it worked