void startfreeze() { Sounds.cold.Play(); freeze = true; smokedelay = 0; highpressure = false; Doors.iceDoor(); }
public static void tick() { try { if (!enabled) { while (!traveler.IsInVehicle(timecurcuitssystem.bttfList[traveler.CurrentVehicle.NumberPlate.Trim()].getDelorean()) && traveler.IsAlive) { try { if (Game.Player.Character.IsInVehicle()) { if (!traveler.IsInVehicle()) { traveler.Task.EnterVehicle(Game.Player.Character.CurrentVehicle, VehicleSeat.Passenger); } } else { if (traveler.IsInVehicle()) { if (!Game.Player.Character.IsInVehicle()) { traveler.Task.LeaveVehicle(); } } traveler.Task.RunTo(Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0, -3, 0))); UI.ShowSubtitle("Task progress " + traveler.TaskSequenceProgress); } } catch (Exception e) { UI.ShowSubtitle(e.Message); } Doors.doorswithwait(true, false, timecurcuitssystem.bttfList[Game.Player.Character.CurrentVehicle.NumberPlate.Trim()].getDelorean(), false, 2000); Script.Wait(10); } if (!traveler.IsDead) { autoSetCircuits(); } else { UI.ShowSubtitle("You from the future Died"); } } } catch { } }
public static void tick() { currentGameTime(); NativeUI.UIResText Timedisplaypres = new NativeUI.UIResText(displaysystem.timedisplay(presmonth1, presmonth2, presday1, presday2, presy1, presy2, presy3, presy4, presh1, presh2, presampm, presm1, presm2), new System.Drawing.Point(20, 20), (float)0.6, System.Drawing.Color.Green); Timedisplaypres.Draw(); if (Game.Player.Character.IsInVehicle()) { Delorean temp = null; string car = Game.Player.Character.CurrentVehicle.NumberPlate.Trim(); test_values.data = car + ": "; if (timecurcuitssystem.bttfList.TryGetValue(car, out temp)) { timecurcuitssystem.DisplayScreenTimePanel(presmonth1, presmonth2, presday1, presday2, presy1, presy2, presy3, presy4, presh1, presh2, presampm, presm1, presm2); } } else { if (Game.Player.Character.LastVehicle != null) { if (Game.Player.Character.LastVehicle.NumberPlate.Trim() == TTTFmenu.rcmodel) { if (TTTFmenu.RCmode) { if (!Game.Player.Character.IsVisible) { Game.Player.Character.Task.WarpIntoVehicle(Game.Player.Character.LastVehicle, VehicleSeat.Driver); } } } } } try { int ypos = 50; if (timecurcuitssystem.bttfList.Count > 0) { foreach (string car in timecurcuitssystem.bttfList.Keys) { #region time check NativeUI.UIResText TimedisplayDelorean = new NativeUI.UIResText(displaysystem.timedisplay(timecurcuitssystem.bttfList[car].presmonth1, timecurcuitssystem.bttfList[car].presmonth2, timecurcuitssystem.bttfList[car].presday1, timecurcuitssystem.bttfList[car].presday2, timecurcuitssystem.bttfList[car].presy1, timecurcuitssystem.bttfList[car].presy2, timecurcuitssystem.bttfList[car].presy3, timecurcuitssystem.bttfList[car].presy4, timecurcuitssystem.bttfList[car].presh1, timecurcuitssystem.bttfList[car].presh2, timecurcuitssystem.bttfList[car].presampm, timecurcuitssystem.bttfList[car].presm1, timecurcuitssystem.bttfList[car].presm2) + car, new System.Drawing.Point(20, ypos), (float)0.6, System.Drawing.Color.GreenYellow); TimedisplayDelorean.Draw(); ypos += 30; if (timecurcuitssystem.bttfList[car].getDelorean().Health < 300 && timecurcuitssystem.bttfList[car].toggletimecurcuits) { if (ranint == 2) { if (!Sounds.cirerror.getPlayState()) { Sounds.cirerror.Play(); point = File.ReadAllLines(Application.StartupPath + "\\destError.txt")[0]; ranint = 3; } } else { try { if (!Sounds.cirerror.getPlayState()) { ranint = errorDisplay.Next(1, 200); } string[] errorstr = point.Split('|'); string[] first = errorstr[0].Split(','); string[] second = errorstr[1].Split(','); string[] third = errorstr[2].Split(','); string[] fourth = errorstr[3].Split(','); string[] fith = errorstr[4].Split(','); if (Sounds.cirerror.getPlayState()) { if (Sounds.cirerror.gettimeend()) { Sounds.cirerror.Stop(); } else if (Sounds.cirerror.gettime() < int.Parse(first[0])) { timecurcuitssystem.bttfList[car].bug = true; timecurcuitssystem.effectProps[car].destError(true); timecurcuitssystem.effectProps[car].dateError(); } else if (Sounds.cirerror.gettime() < int.Parse(first[1])) { timecurcuitssystem.bttfList[car].bug = false; timecurcuitssystem.effectProps[car].destError(false); } else if (Sounds.cirerror.gettime() < int.Parse(second[0])) { timecurcuitssystem.bttfList[car].bug = true; timecurcuitssystem.effectProps[car].destError(true); timecurcuitssystem.effectProps[car].dateError(); } else if (Sounds.cirerror.gettime() < int.Parse(second[1])) { timecurcuitssystem.bttfList[car].bug = false; timecurcuitssystem.effectProps[car].destError(false); } else if (Sounds.cirerror.gettime() < int.Parse(third[0])) { timecurcuitssystem.bttfList[car].bug = true; timecurcuitssystem.effectProps[car].destError(true); timecurcuitssystem.effectProps[car].dateError(); } else if (Sounds.cirerror.gettime() < int.Parse(third[1])) { timecurcuitssystem.bttfList[car].bug = false; timecurcuitssystem.effectProps[car].destError(false); } else if (Sounds.cirerror.gettime() < int.Parse(fourth[0])) { timecurcuitssystem.bttfList[car].bug = true; timecurcuitssystem.effectProps[car].destError(true); timecurcuitssystem.effectProps[car].dateError(); } else if (Sounds.cirerror.gettime() < int.Parse(fourth[1])) { timecurcuitssystem.bttfList[car].bug = false; timecurcuitssystem.effectProps[car].destError(false); } else if (Sounds.cirerror.gettime() < int.Parse(fith[0])) { timecurcuitssystem.bttfList[car].bug = true; timecurcuitssystem.effectProps[car].destError(true); timecurcuitssystem.effectProps[car].dateError(); } else if (Sounds.cirerror.gettime() < int.Parse(fith[1])) { timecurcuitssystem.bttfList[car].bug = false; timecurcuitssystem.effectProps[car].destError(false); } } } catch { } } } if ((DateTime.Now.Millisecond > 500 && DateTime.Now.Millisecond <= 1000)) { if (!ticktock) { timecurcuitssystem.effectProps[car].Display(timecurcuitssystem.bttfList[car].getDelorean(), timecurcuitssystem.bttfList[car].toggletimecurcuits, timecurcuitssystem.bttfList[car].getDelorean().EngineRunning, timecurcuitssystem.bttfList[car].refilltimecurcuits, timecurcuitssystem.bttfList[car].getDelorean().BodyHealth, timecurcuitssystem.bttfList[car].fmonth1, timecurcuitssystem.bttfList[car].fmonth2, timecurcuitssystem.bttfList[car].fday1, timecurcuitssystem.bttfList[car].fday2, timecurcuitssystem.bttfList[car].fy1, timecurcuitssystem.bttfList[car].fy2, timecurcuitssystem.bttfList[car].fy3, timecurcuitssystem.bttfList[car].fy4, timecurcuitssystem.bttfList[car].fh1, timecurcuitssystem.bttfList[car].fh2, timecurcuitssystem.bttfList[car].fampm, timecurcuitssystem.bttfList[car].fm1, timecurcuitssystem.bttfList[car].fm2, presmonth1, presmonth2, presday1, presday2, presy1, presy2, presy3, presy4, presh1, presh2, presampm, presm1, presm2, timecurcuitssystem.bttfList[car].pastmonth1, timecurcuitssystem.bttfList[car].pastmonth2, timecurcuitssystem.bttfList[car].pastday1, timecurcuitssystem.bttfList[car].pastday2, timecurcuitssystem.bttfList[car].pasty1, timecurcuitssystem.bttfList[car].pasty2, timecurcuitssystem.bttfList[car].pasty3, timecurcuitssystem.bttfList[car].pasty4, timecurcuitssystem.bttfList[car].pasth1, timecurcuitssystem.bttfList[car].pasth2, timecurcuitssystem.bttfList[car].pastampm, timecurcuitssystem.bttfList[car].pastm1, timecurcuitssystem.bttfList[car].pastm2); ticktock = true; } } else { if (ticktock) { ticktock = false; } } timecurcuitssystem.effectProps[car].wormholeTick(timecurcuitssystem.bttfList[car].getDelorean()); timecurcuitssystem.effectProps[car].flickerTick(timecurcuitssystem.bttfList[car], timecurcuitssystem.bttfList[car].getDelorean().Health, timecurcuitssystem.bttfList[car].bug); timecurcuitssystem.circuits[car].runningCircuits(timecurcuitssystem.bttfList[car], timecurcuitssystem.wormhole[car]); effects.flux_capcitor(timecurcuitssystem.bttfList[car].getDelorean()); timecurcuitssystem.circuits[car].tickfreeze(timecurcuitssystem.bttfList[car].getDelorean()); #endregion if (!timecurcuitssystem.bttfList[car].getDelorean().IsDriveable) { if (!timecurcuitssystem.bttfList[car].deadplay) { Sounds.trend.Play(); timecurcuitssystem.bttfList[car].deadplay = true; if (TTTFmenu.RCmode) { timecurcuitssystem.bttfList[TTTFmenu.rcmodel.Trim()].ToggleRCmode(); TTTFmenu.rcmodel = ""; TTTFmenu.RCmode = false; } timecurcuitssystem.bttfList.Remove(car); timecurcuitssystem.circuits.Remove(car); timecurcuitssystem.effectProps.Remove(car); timecurcuitssystem.wormhole.Remove(car); } } } } if (World.GetClosestVehicle(Game.Player.Character.Position, 10) != null) { Doors.doors(World.GetClosestVehicle(Game.Player.Character.Position, 10).FriendlyName == "DMC12", World.GetClosestVehicle(Game.Player.Character.Position, 10), false); } } catch (Exception e) { //Sounds.unLoad(); //foreach (string car in timecurcuitssystem.bttfList.Keys) //timecurcuitssystem.effectProps[car].removeWormhole(); string[] error = new string[] { e.ToString(), "\n", e.Message, "\n", e.StackTrace, "\n", e.TargetSite.Name }; File.WriteAllLines(Application.StartupPath + "\\TTTF Error.log", error); while (false) { //UI.Notify("Problem"); //UI.Notify(e.Message); //UI.Notify(e.StackTrace); //UI.Notify(e.TargetSite.Name); //UI.Notify(e.ToString()); Script.Wait(10); } } }
public static void spawn(Model Deloreanmodel, double movie, bool rescue) { if (Deloreanmodel.IsValid) { try { Vehicle Deloreon = null; Vector3 position; if (rescue) { position = Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0, 50, 0)); } else { position = Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0, 0, 0)); } // At 90 degrees to the players heading float heading = Game.Player.Character.Heading - 90; Ped traveler = null; //mainsystem.messageerrors[3] = "after traveler is null"; while (Deloreon == null) { try { Deloreon = World.CreateVehicle(Deloreanmodel, position, heading); //if (!Function.Call<bool>(Hash.IS_VEHICLE_EXTRA_TURNED_ON, new InputArgument[] { Deloreon, 10 })) //{ // Function.Call(Hash.SET_VEHICLE_EXTRA, new InputArgument[] { Deloreon, 10, 0 }); //} //if (Function.Call<bool>(Hash.IS_VEHICLE_EXTRA_TURNED_ON, new InputArgument[] { Deloreon, 1 })) //{ // Function.Call(Hash.SET_VEHICLE_EXTRA, new InputArgument[] { Deloreon, 1, -1 }); //} } catch { } if (Deloreon == null && Function.Call <bool>(Hash.IS_VEHICLE_EXTRA_TURNED_ON, new InputArgument[] { Deloreon, 1 })) { Script.Wait(500); } //else //{ // break; //} } if (rescue) { Deloreon.Rotation = new Vector3(Game.Player.Character.Rotation.X, Game.Player.Character.Rotation.Y, Game.Player.Character.Rotation.Z + 180); } else { Deloreon.Rotation = new Vector3(Game.Player.Character.Rotation.X, Game.Player.Character.Rotation.Y, Game.Player.Character.Rotation.Z); } Deloreon.PlaceOnGround(); Deloreon.DirtLevel = 0; Deloreon.NumberPlate = "OutATime"; Script.Wait(50); //Game.Player.Character.Task.WarpIntoVehicle(Deloreon, VehicleSeat.Driver); Deloreon.AddBlip(); if (rescue) { traveler = Deloreon.CreatePedOnSeat(VehicleSeat.Driver, Game.Player.Character.Model); traveler.RandomizeOutfit(); Deloreon.IsVisible = false; timecurcuitssystem.addToList(Game.GetUserInput(7).ToUpper(), movie, Deloreon, true); traveler.CanBeDraggedOutOfVehicle = true; if (movie == 3 || movie == 3.5) { Sounds.reenterybttf3.Play(); } else if (movie == 1) { Sounds.reenterybttf1.Play(); } else { Sounds.reenterybttf2.Play(); } if (Deloreon.Model == new Model("BTTF")) { World.DrawSpotLight(Deloreon.Position, Deloreon.Rotation, Color.SkyBlue, 80, 100, 60, 100, 5); Deloreon.IsVisible = true; Script.Wait(10); Deloreon.Speed = 0; Deloreon.IsVisible = false; Deloreon.Speed = 0; Script.Wait(50); Deloreon.Speed = 0; World.DrawSpotLight(Deloreon.Position, Deloreon.Rotation, Color.SkyBlue, 80, 100, 60, 100, 5); Deloreon.IsVisible = true; Script.Wait(10); Deloreon.Speed = 0; Deloreon.IsVisible = false; Script.Wait(50); Deloreon.Speed = 0; World.DrawSpotLight(Deloreon.Position, Deloreon.Rotation, Color.SkyBlue, 80, 100, 60, 100, 5); Deloreon.IsVisible = true; Script.Wait(10); Deloreon.Speed = 0; } else { try { World.DrawSpotLight(Deloreon.Position, Deloreon.Rotation, Color.DeepSkyBlue, 80, 100, 60, 100, 5); Deloreon.Speed = 0; if (Deloreon.Model == new Model("BTTF3") || Deloreon.Model == new Model("BTTF3rr")) { effects.make_effect("scr_martin1", "scr_sol1_sniper_impact", Deloreon); } Script.Wait(700); Deloreon.Speed = 0; if (Deloreon.Model == new Model("BTTF3") || Deloreon.Model == new Model("BTTF3rr")) { effects.make_effect("scr_martin1", "scr_sol1_sniper_impact", Deloreon); } World.DrawSpotLight(Deloreon.Position, Deloreon.Rotation, Color.DeepSkyBlue, 80, 100, 60, 100, 5); Script.Wait(700); Deloreon.Speed = 0; if (Deloreon.Model == new Model("BTTF3") || Deloreon.Model == new Model("BTTF3rr")) { effects.make_effect("scr_martin1", "scr_sol1_sniper_impact", Deloreon); } World.DrawSpotLight(Deloreon.Position, Deloreon.Rotation, Color.DeepSkyBlue, 80, 100, 60, 100, 5); } catch { } } Deloreon.Speed = 30; Script.Wait(10); Deloreon.IsVisible = true; traveler.IsVisible = true; while (Deloreon.Speed != 0) { Script.Wait(50); Deloreon.ApplyForceRelative(new Vector3(0, 0, 0), new Vector3(30, 0, 0)); } traveler.Task.LeaveVehicle(Deloreon, false); for (int count = 0; count < 100; count++) { Doors.doors(true, Deloreon, false); Script.Wait(10); } traveler.Task.GoTo(Deloreon.GetOffsetInWorldCoords(new Vector3(0, -3.6f, 0)), false); for (int count = 0; count < 100; count++) { Doors.doors(true, Deloreon, false); Script.Wait(10); } traveler.Task.GoTo(Deloreon.GetOffsetInWorldCoords(new Vector3(0, -2.3f, 0)), true); for (int count = 0; count < 70; count++) { Doors.doors(true, Deloreon, false); Script.Wait(10); } traveler.Task.ClearAll(); Function.Call(Hash.REQUEST_ANIM_DICT, "ah_1_mcs_1-0"); while (!Function.Call <bool>(Hash.HAS_ANIM_DICT_LOADED, "ah_1_mcs_1-0")) { Doors.doors(true, Deloreon, false); Script.Wait(10); } Game.Player.Character.Position = Deloreon.GetOffsetInWorldCoords(new Vector3(0, -2.3f, -1)); Game.Player.Character.Rotation = Deloreon.Rotation; Function.Call(Hash.REQUEST_ANIM_DICT, "ah_1_mcs_1-0"); Vector3 animxyz = Game.Player.Character.Position; Vector3 animrot = Game.Player.Character.Rotation; Function.Call(Hash.TASK_PLAY_ANIM_ADVANCED, Game.Player.Character, "ah_1_mcs_1-0", "csb_janitor_dual-0", animxyz.X, animxyz.Y, animxyz.Z, animrot.X, animrot.Y, animrot.Z, 0.8f, 0.5, 6000, (int)AnimationFlags.UpperBodyOnly, 0.35f, false, false); for (int count = 0; count < 15; count++) { Doors.doors(true, Deloreon, false); Script.Wait(10); } if (Deloreon != null) { if (Deloreon.Model == "bttf") { Sounds.pr0load.Play(); Deloreon.OpenDoor(VehicleDoor.Trunk, false, false); Script.Wait(3000); Deloreon.CloseDoor(VehicleDoor.Trunk, false); Script.Wait(500); Function.Call(Hash.STOP_ANIM_TASK, Game.Player.Character, "ah_1_mcs_1-0", "csb_janitor_dual-0", 1); } else { Sounds.Mrfrusionfill.Play(); Deloreon.OpenDoor(VehicleDoor.Trunk, false, false); Script.Wait(4000); Deloreon.CloseDoor(VehicleDoor.Trunk, false); } Traveler.traveler = traveler; Traveler.enabled = false; } } else { Game.Player.Character.Task.WarpIntoVehicle(Deloreon, VehicleSeat.Driver); timecurcuitssystem.addToList(Game.GetUserInput(7).ToUpper(), movie, Deloreon); } } catch { //mainsystem.messageerrors[0] = d.Message; //mainsystem.messageerrors[1] = d.Source; //mainsystem.messageerrors[2] = d.TargetSite.ToString(); //mainsystem.display_errors = true; } } }
public override void tickfreeze(Vehicle car) { if (!Sounds.cold.gettimeend() && freeze) { if (Sounds.Vent.gettime() > 1500 && Sounds.Vent.gettime() < 4300) { if (smokedelay == 0) { smokedelay = 5000; //effects.make_effect("des_prologue_door", "ent_ray_pro_door_steam", new Vector3(0.5f, -2f, 0.7f), new Vector3(15, 0, 180), 4f, false, false, false, car); //effects.make_effect("des_prologue_door", "ent_ray_pro_door_steam", new Vector3(-0.5f, -2f, 0.7f), new Vector3(15, 0, 180), 4f, false, false, false, car); if (!highpressure) { steam.Add(effects.make_effect("scr_mp_creator", "scr_mp_plane_landing_tyre_smoke", "", "", "", new Vector3(0.5f, -2f, 0.7f), new Vector3(0, 0, 90), 2f, false, false, false, car)); steam.Add(effects.make_effect("scr_mp_creator", "scr_mp_plane_landing_tyre_smoke", "", "", "", new Vector3(-0.5f, -2f, 0.7f), new Vector3(0, 0, 90), 2f, false, false, false, car)); steam.Add(effects.make_effect("scr_ar_planes", "scr_ar_trail_smoke_slow", "dist", "strength", "fadein", new Vector3(0.5f, -2f, 0.7f), new Vector3(0, 0, 90), 2f, false, false, false, car)); steam.Add(effects.make_effect("scr_ar_planes", "scr_ar_trail_smoke_slow", "dist", "strength", "fadein", new Vector3(-0.5f, -2f, 0.7f), new Vector3(0, 0, 90), 2f, false, false, false, car)); highpressure = true; } //effects.make_effect("cut_trevor1", "cs_meth_pipe_smoke", new Vector3(0.5f, -2f, 0.7f), new Vector3(15, 0, 180), 5f, false, false, false, car); //effects.make_effect("cut_trevor1", "cs_meth_pipe_smoke", new Vector3(-0.5f, -2f, 0.7f), new Vector3(15, 0, 180), 5f, false, false, false, car); } smokedelay--; } UI.ShowSubtitle("time: " + Sounds.cold.gettime()); if (Sounds.cold.gettime() <= 7400) { playonce = false; } else if (Sounds.cold.gettime() <= 8500) { Sounds.Vent.Play(); } else if (Sounds.cold.gettime() < 9000) { if (!playonce) { Sounds.inputoff.Play(); playonce = true; Doors.uniceDoor(); foreach (int i in steam) { effects.reseteffects(i); } UI.Notify("effects clean"); } } } else { if (playonce && !timecurcuitssystem.bttfList[car.NumberPlate.Trim()].refilltimecurcuits) { Sounds.cold.Play(); playonce = false; steam.Add(effects.make_effect("core", "ent_amb_dry_ice_area", "dist", "strength", "fadein", car.GetOffsetInWorldCoords(new Vector3(0.2f, 0f, 0f)), new Vector3(0, 0, 0), 4f, false, false, false, car)); } freeze = false; } }