void malfunction(Delorean Delorean, bool refilltimecircuits, bool toggle) { if (!Sounds.cirerror.getPlayStateStopped()) { if (Sounds.cirerror.gettime() > 0 && Sounds.cirerror.gettime() < 0.023) { Delorean.bug = false; } else if (Sounds.cirerror.gettime() > 0.189 && Sounds.cirerror.gettime() < 0.858) { Delorean.bug = true; } else if (Sounds.cirerror.gettime() > 1.023 && Sounds.cirerror.gettime() < 1.692) { Delorean.bug = false; } else if (Sounds.cirerror.gettime() > 1.858 && Sounds.cirerror.gettime() < 2.567) { Delorean.bug = true; } else if (Sounds.cirerror.gettime() > 2.733 && Sounds.cirerror.gettime() < 3.624) { Delorean.bug = false; } else if (Sounds.cirerror.gettime() > 2.733 && Sounds.cirerror.gettime() < 3.624) { Delorean.bug = true; } else if (Sounds.cirerror.gettimeend()) { Delorean.bug = false; } } }
public override void runningCircuits(Delorean delorean, effects worm) { if (delorean != null) { Vehicle Deloreancar = delorean.getDelorean(); #region functions #endregion int tempspeed = (int)((Deloreancar.Speed / .27777) / 1.60934); if (delorean.toggletimecurcuits) { worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits); if (tempspeed > 84) { worm.below84 = true; } if (tempspeed >= 88) { to88(tempspeed, delorean, worm); } else if (tempspeed < 84) { errorbool = false; below88(delorean, worm); } } else { resetTravel(tempspeed, delorean, worm); } } }
void insteantTravel(Delorean delorean, effects worm) { Vehicle DMC = delorean.getDelorean(); DMC.DirtLevel = 12; Function.Call(Hash.SET_CLOCK_TIME, ((delorean.fh1 * 10) + delorean.fh2), ((delorean.fm1 * 10) + delorean.fm2), 0); if (delorean.refilltimecurcuits) { Sounds.sparksfeul.Stop(); } Script.Wait(10); delorean.timetravelentry(); Script.Wait(10); Sounds.Timetravelreentery.Play(); Script.Wait(10); if (!delorean.RCmode) { removePedsandVehicles(DMC); } else { TTTFmenu.RCmode = false; TTTFmenu.rcmodel = ""; mainsystem.TTTF.setmenu(true); delorean.ToggleRCmode(); } Script.Wait(10); Game.Player.WantedLevel = 0; Script.Wait(10); delorean.refilltimecurcuits = false; Script.Wait(10); }
void body(int BodyHealth, Delorean delorean) { if (BodyHealth == 0) { malfunction(delorean, delorean.refilltimecurcuits, delorean.toggletimecurcuits); } else if (BodyHealth < 700 && BodyHealth > 0) { int n = 0; if (DateTime.Now.Millisecond % 180 >= 90 && DateTime.Now.Millisecond % 180 <= 180) { if (!tickbool) { n = rand.Next(1, BodyHealth); tickbool = true; } } else { if (!delorean.bug) { tickbool = false; } } if (n == 1) { n++; malfunction(delorean, delorean.refilltimecurcuits, delorean.toggletimecurcuits); } } }
public override void runningCircuits(Delorean delorean, effects worm) { if (delorean != null) { Vehicle Deloreancar = delorean.getDelorean(); int tempspeed = (int)((Deloreancar.Speed / .27777) / 1.60934); #region functions if (Deloreancar.DirtLevel > 0) { Deloreancar.DirtLevel -= 0.001f; } if (Deloreancar.Model == new Model("BTTF3rr")) { if (Game.IsKeyPressed(System.Windows.Forms.Keys.W)) { if (tempspeed < 45) { Deloreancar.ApplyForceRelative(new Vector3(0, 0.5f, 0)); } } if (Game.IsKeyPressed(System.Windows.Forms.Keys.S)) { if (tempspeed < 45) { Deloreancar.ApplyForceRelative(new Vector3(0, -0.5f, 0)); } } Deloreancar.FuelLevel = 0; } #endregion if (delorean.toggletimecurcuits) { displaymodelOnOff(delorean, delorean.toggletimecurcuits); worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits); if (tempspeed > 64) { worm.below84 = true; } if (tempspeed >= 88) { to88(tempspeed, delorean, worm); } else if (tempspeed < 64) { errorbool = false; below88(delorean, worm); } } else { resetTravel(tempspeed, delorean, worm); } } }
void resetTravel(int speed, Delorean delorean, effects worm) { if (speed < 84 && delorean.timeTraveled && !worm.below84) { Sounds.sparksbttf3.Stop(); Sounds.sparksfeul.Stop(); worm.resetwormhole(); delorean.timeTraveled = false; } }
void below88(Delorean delorean, effects worm) { stoponce = false; if (worm.below84) { Sounds.sparksbttf3.Stop(); Sounds.sparksfeul.Stop(); worm.resetwormhole(); } }
void displaymodelOnOff(Delorean delorean, bool on) { if (delorean.refilltimecurcuits) { body((int)delorean.getDelorean().BodyHealth, delorean); } else { } }
public void CharacterTravel(Delorean DMC) { DeloreanManagement.presmonth1 = DMC.presmonth1; DeloreanManagement.presmonth2 = DMC.presmonth2; DeloreanManagement.presday1 = DMC.presday1; DeloreanManagement.presday2 = DMC.presday2; DeloreanManagement.presy1 = DMC.presy1; DeloreanManagement.presy2 = DMC.presy2; DeloreanManagement.presy3 = DMC.presy3; DeloreanManagement.presy4 = DMC.presy4; DeloreanManagement.presampm = DMC.presampm; }
void malfunction(Delorean Delorean, bool refilltimecircuits, bool toggle) { if (!Sounds.cirerrorbttf3.getPlayStateStopped()) { if (Sounds.cirerrorbttf3.gettime() > 0 && Sounds.cirerrorbttf3.gettime() < 0.024) { Delorean.bug = true; } else if (Sounds.cirerrorbttf3.gettime() > 0.276 && Sounds.cirerrorbttf3.gettime() < 0.815) { Delorean.bug = true; } else if (Sounds.cirerrorbttf3.gettime() > 1.074 && Sounds.cirerrorbttf3.gettime() < 1.848) { Delorean.bug = true; } else if (Sounds.cirerrorbttf3.gettimeend()) { Delorean.bug = false; } } }
void cutScene(Delorean delorean, effects worm) { Vehicle DMC = delorean.getDelorean(); DMC.IsInvincible = true; if (delorean.refilltimecurcuits) { Sounds.sparksfeul.Stop(); Sounds.sparksbttf3.Stop(); } effects.make_effect("scr_rcpaparazzo1", "scr_rcpap1_camera", DMC); Sounds.Timetravelreenterycutscene3.Play(); if (!stoponce) { DMC.FreezePosition = true; DMC.HasCollision = false; stoponce = true; } DMC.IsVisible = false; DMC.EngineRunning = false; // TODO - replace flame trail effects for bttf3 and bttf3rr if (Game.Player.Character.IsInVehicle(DMC)) { if (Game.Player.WantedLevel > 0) { Game.Player.WantedLevel = 0; } delorean.timetravelentry(); CharacterTravel(delorean); reentry(DMC); } else { delorean.timetravelentry(); delorean.refilltimecurcuits = false; Script.Wait(10); } }
void to88(int speed, Delorean delorean, effects worm) { if (delorean.refilltimecurcuits) { double time = 0; time = Sounds.sparksfeul.gettime(); if (time < 3000) { worm.wormholeAndTravel(delorean.getDelorean(), speed, delorean.refilltimecurcuits); } else { delorean.timeTraveled = true; if (Function.Call <int>(Hash.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE) == 4) { insteantTravel(delorean, worm); } else { cutScene(delorean, worm); } } } }
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 override void runningCircuits(Delorean delorean, effects worm) { if (delorean != null) { Vehicle Deloreancar = delorean.getDelorean(); #region functions if (timecurcuitssystem.effectProps[Deloreancar.NumberPlate.Trim()].ice.Alpha > 0) { timecurcuitssystem.effectProps[Deloreancar.NumberPlate.Trim()].ice.Alpha -= 1; } if (Deloreancar.Model == new Model("BTTF2") && flyingison) { if (Deloreancar.HeightAboveGround > 1) { Deloreancar.ApplyForce(new Vector3(0, 0, 0.17f)); } else { flyingison = false; } } else if (Deloreancar.Model == new Model("BTTF2F")) { if (Deloreancar.IsDoorBroken(VehicleDoor.BackLeftDoor) && Deloreancar.IsDoorBroken(VehicleDoor.BackRightDoor)) { if (Deloreancar.EngineHealth > 0) { Deloreancar.EngineHealth--; } } else if (Deloreancar.IsDoorBroken(VehicleDoor.BackLeftDoor) || Deloreancar.IsDoorBroken(VehicleDoor.BackRightDoor)) { if (Deloreancar.EngineHealth > 500) { Deloreancar.EngineHealth--; } else { Deloreancar.EngineHealth = 500; } } flyingison = true; } #endregion int tempspeed = (int)((Deloreancar.Speed / .27777) / 1.60934); if (delorean.toggletimecurcuits) { displaymodelOnOff(delorean, delorean.toggletimecurcuits); worm.wormhole(Deloreancar, tempspeed, delorean.refilltimecurcuits); if (tempspeed > 84) { worm.below84 = true; } if (tempspeed >= 88) { to88(tempspeed, delorean, worm); } else if (tempspeed < 84) { errorbool = false; below88(delorean, worm); } } else { resetTravel(tempspeed, delorean, worm); } } }
public virtual void runningCircuits(Delorean delorean, effects worm) { }
public void ItemSelectHandler(UIMenu senderb, UIMenuItem selectedItem, int index) { if (selectedItem.Text == "Connect to Launcher") { try { if (!mainsystem.connection_success) { System.Diagnostics.Process[] temp = System.Diagnostics.Process.GetProcessesByName("TTTF Launcher.exe"); bool running = false; foreach (System.Diagnostics.Process i in temp) { running = true; } if (!running) { // Prepare the process to run System.Diagnostics.ProcessStartInfo start = new System.Diagnostics.ProcessStartInfo(); // Enter in the command line arguments, everything you would enter after the executable name itself start.Arguments = ""; // Enter the executable to run, including the complete path start.FileName = (Application.StartupPath + "\\scripts\\TTTF Launcher.exe"); // Do you want to show a console window? start.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; start.CreateNoWindow = false; // Run the external process & wait for it to finish System.Diagnostics.Process proc = System.Diagnostics.Process.Start(start); Script.Wait(3000); UI.ShowSubtitle("Launcher running: " + proc.ProcessName); } if (!mainsystem.connection_success) { UI.ShowSubtitle("Run Process the Theft To The Future launcher to communicate with the other scripts."); } setmenu(true); } } catch { } } if (selectedItem.Text == "Play with friends") { myMenu.Visible = false; coop.Visible = true; } else if (selectedItem.Text == "Play animation on player") { try { mainsystem.client.WriteLineAndGetReply("send animation (script)", new TimeSpan(0, 0, 10)); } catch { } Script.Wait(2000); Function.Call(Hash.REQUEST_ANIM_DICT, root); DateTime tmpTimeOut = DateTime.Now; if (root != "") { Game.Player.Character.Task.PlayAnimation(root, effect); while (!Function.Call <bool>(Hash.HAS_ANIM_DICT_LOADED, root)) { Script.Wait(10); } if (Function.Call <bool>(Hash.HAS_ANIM_DICT_LOADED, root)) { Function.Call(Hash.TASK_PLAY_ANIM, Game.Player.Character, root, effect, 8, (8 * -1), -1, 0, 0, false, false, false); Script.Wait(50); tmpTimeOut = DateTime.Now; while ((DateTime.Now.Subtract(tmpTimeOut).TotalMilliseconds < 3000)) { UI.ShowSubtitle(("Anim play time: " + Function.Call <double>(Hash.GET_ENTITY_ANIM_CURRENT_TIME, Game.Player.Character, root, effect))); Script.Wait(5); } UI.ShowSubtitle("Reset anim playback time to 0.1 and reduce play speed to 0.25", 5000); Function.Call(Hash.SET_ENTITY_ANIM_CURRENT_TIME, Game.Player.Character, root, effect, 0.1); Function.Call(Hash.SET_ENTITY_ANIM_SPEED, Game.Player.Character, root, effect, 0.25); Script.Wait(5000); UI.ShowSubtitle("End anim playback"); Function.Call(Hash.STOP_ANIM_TASK, Game.Player.Character, root, effect, 1); } else { UI.ShowSubtitle("Animation dictionary does not exist."); } } else { 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); tmpTimeOut = DateTime.Now; while ((DateTime.Now.Subtract(tmpTimeOut).TotalMilliseconds < 8000)) { UI.ShowSubtitle(("Anim play time: " + Function.Call <double>(Hash.GET_ENTITY_ANIM_CURRENT_TIME, Game.Player.Character, "ah_1_mcs_1-0", "csb_janitor_dual-0"))); Script.Wait(5); } /* * UI.ShowSubtitle("Reset anim playback time to 0.1 and reduce play speed to 0.25", 5000); * Function.Call(Hash.SET_ENTITY_ANIM_CURRENT_TIME, Game.Player.Character, root, effect, 0.1); * Function.Call(Hash.SET_ENTITY_ANIM_SPEED, Game.Player.Character, root, effect, 0.25); * Script.Wait(5000); * UI.ShowSubtitle("End anim playback"); * Function.Call(Hash.STOP_ANIM_TASK, Game.Player.Character, root, effect, 1); */ } } else if (selectedItem.Text == "Set Effect") { root = Game.GetUserInput(100); effect = Game.GetUserInput(100); } else if (selectedItem.Text == "Spawn Delorean (DMC 12)") { Model Deloreanmodel = new Model("DMC12"); if (Deloreanmodel.IsValid) { Vehicle Deloreon = null; Vector3 position = Game.Player.Character.Position; // At 90 degrees to the players heading float heading = Game.Player.Character.Heading - 90; while (Deloreon == null) { Deloreon = World.CreateVehicle(Deloreanmodel, position, heading); Script.Wait(500); } Deloreon.Rotation = Game.Player.Character.Rotation; Deloreon.DirtLevel = 0; Deloreon.NumberPlate = "OutATime"; Deloreon.PlaceOnGround(); // Set the vehicle mods Game.Player.Character.Task.WarpIntoVehicle(Deloreon, VehicleSeat.Driver); Deloreon.PrimaryColor = VehicleColor.BrushedAluminium; Deloreon.SecondaryColor = VehicleColor.BrushedAluminium; } } else if (selectedItem.Text == "Spawn Delorean (DMC 12 Gold Edition)") { Model Deloreanmodel = new Model("DMC12"); if (Deloreanmodel.IsValid) { Vehicle Deloreon = null; Vector3 position = Game.Player.Character.Position; // At 90 degrees to the players heading float heading = Game.Player.Character.Heading - 90; while (Deloreon == null) { Deloreon = World.CreateVehicle(Deloreanmodel, position, heading); Script.Wait(500); } Deloreon.Rotation = Game.Player.Character.Rotation; Deloreon.DirtLevel = 0; Deloreon.NumberPlate = "OutATime"; Deloreon.PlaceOnGround(); // Set the vehicle mods Game.Player.Character.Task.WarpIntoVehicle(Deloreon, VehicleSeat.Driver); Deloreon.PrimaryColor = VehicleColor.BrushedGold; Deloreon.SecondaryColor = VehicleColor.BrushedGold; } } else if (selectedItem.Text == "Rescue Cutscene") { spawn_delorean.spawn(new Model(carmodel), movie, true); setmenu(true); Show(); } else if (selectedItem.Text == "Spawn Delorean") { spawn_delorean.spawn(new Model(carmodel), movie, false); setmenu(true); Show(); } else if (selectedItem.Text == "Spawn Delorean (BTTF 1)") { myMenu.Clear(); myMenu.AddItem(new UIMenuItem("Spawn Delorean")); myMenu.AddItem(new UIMenuItem("Rescue Cutscene")); myMenu.RefreshIndex(); carmodel = "bttf_land"; movie = 1; } else if (selectedItem.Text == "Spawn Delorean (BTTF 2)") { myMenu.Clear(); myMenu.AddItem(new UIMenuItem("Spawn Delorean")); myMenu.AddItem(new UIMenuItem("Rescue Cutscene")); myMenu.RefreshIndex(); carmodel = "bttf_air"; movie = 2; } else if (selectedItem.Text == "Spawn Delorean (BTTF 3)") { myMenu.Clear(); myMenu.AddItem(new UIMenuItem("Spawn Delorean")); myMenu.AddItem(new UIMenuItem("Rescue Cutscene")); myMenu.RefreshIndex(); carmodel = "bttf_land"; movie = 3; } else if (selectedItem.Text == "Spawn Delorean (BTTF 3 railroad)") { myMenu.Clear(); myMenu.AddItem(new UIMenuItem("Spawn Delorean")); myMenu.AddItem(new UIMenuItem("Rescue Cutscene")); myMenu.RefreshIndex(); carmodel = "bttf_land"; movie = 3.5; } else if (selectedItem.Text == "Turn current car into a Time Machine") { timecurcuitssystem.addToList(Game.GetUserInput(7).ToUpper(), 0, Game.Player.Character.CurrentVehicle); } else if (selectedItem.Text == "Delete car") { try { Delorean delorea = null; if (timecurcuitssystem.bttfList.TryGetValue(Game.Player.Character.CurrentVehicle.NumberPlate.Trim(), out delorea)) { if (timecurcuitssystem.bttfList[Game.Player.Character.CurrentVehicle.NumberPlate.Trim()].RCmode) { timecurcuitssystem.bttfList[rcmodel.Trim()].ToggleRCmode(); myMenu.Visible = false; timecurcuitssystem.RemoveDelorean(rcmodel.Trim()); rcmodel = ""; RCmode = false; setmenu(true); Script.Wait(1000); } else { timecurcuitssystem.RemoveDelorean(); } } } catch { } } else if (selectedItem.Text == "Remove Time Travel from current car") { try { Delorean delorea = null; if (timecurcuitssystem.bttfList.TryGetValue(Game.Player.Character.CurrentVehicle.NumberPlate.Trim(), out delorea)) { if (timecurcuitssystem.bttfList[Game.Player.Character.CurrentVehicle.NumberPlate.Trim()].RCmode) { timecurcuitssystem.bttfList[rcmodel.Trim()].ToggleRCmode(); myMenu.Visible = false; timecurcuitssystem.RemoveTimeCircuits(rcmodel.Trim()); rcmodel = ""; RCmode = false; setmenu(true); Script.Wait(100); } else { timecurcuitssystem.RemoveTimeCircuits(); } } } catch { } } else if (selectedItem.Text == "Call Doc to repair Delorean") { helpFromDoc.Docs_help(); } else if (selectedItem.Text == "Display Adjustment") { displaysystem.Displayadjustment = true; Show(); } else if (selectedItem.Text == "RC mode") { if (!RCmode) { //TimeTravel.TTTFRC.Show(); myMenu.Clear(); myMenu.Visible = true; foreach (string rcCar in timecurcuitssystem.bttfList.Keys) { myMenu.AddItem(new UIMenuItem("RC: " + rcCar)); } myMenu.AddItem(new UIMenuItem("Back")); myMenu.RefreshIndex(); //myMenu.Visible = false; } else if (RCmode) { Sounds.RCcontrolstop.Play(); setmenu(true); //myMenu.Visible = false; } } else if (selectedItem.Text == "Back") { setmenu(true); } else if (selectedItem.Text.Contains("RC: ")) { rcmodel = selectedItem.Text.Replace("RC: ", "").Trim(); Delorean delorea = null; if (timecurcuitssystem.bttfList.TryGetValue(rcmodel, out delorea)) { timecurcuitssystem.bttfList[rcmodel.Trim()].ToggleRCmode(); myMenu.Visible = false; RCmode = true; setmenu(true); } } else if (selectedItem.Text == ("RC mode: " + rcmodel.Trim())) { timecurcuitssystem.bttfList[rcmodel.Trim()].ToggleRCmode(); myMenu.Visible = false; rcmodel = ""; RCmode = false; myMenu.Clear(); setmenu(true); } else if (selectedItem.Text == "Tutorial mode") { mainsystem.client.WriteLineAndGetReply("Start tutorial (scene)", new TimeSpan(0, 0, 10)); Show(); } else if (selectedItem.Text == "Debugging") { Show(); debuginfo.Visible = !debuginfo.Visible; } else if (selectedItem.Text == "Exit") { myMenu.Visible = false; } }
void cutScene(Delorean delorean, effects worm) { Vehicle DMC = delorean.getDelorean(); DMC.IsInvincible = true; if (delorean.refilltimecurcuits) { Sounds.sparksfeul.Stop(); } int temp = effects.make_effect("core", "veh_exhaust_spacecraft", "", "", "", new Vector3(0f, 0f, 0f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); Sounds.Timetravelreenterycutscene.Play(); if (!stoponce) { DMC.FreezePosition = true; DMC.HasCollision = false; stoponce = true; } DMC.IsVisible = false; DMC.EngineRunning = false; timecurcuitssystem.effectProps[DMC.NumberPlate.Trim()].wormholeHide(DMC); float fireY = -0.1f; flameTrails[0] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[1] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[2] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 1.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[3] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 1.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[4] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 3f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[5] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 3f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[6] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 4.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[7] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 4.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[8] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 6f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[9] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 6f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[10] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 7.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[11] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 7.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[12] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 9f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[13] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 9f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[14] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(1f, fireY + 10.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); flameTrails[15] = effects.make_effect("core", "fire_petrol_two", "dist", "strength", "fadein", new Vector3(-1f, fireY + 10.5f, 0.2f), new Vector3(0, 0, 0), 1f, false, false, false, DMC); //if (Function.Call<bool>(Hash.IS_VEHICLE_EXTRA_TURNED_ON, new InputArgument[] { DMC, 10 })) //{ // Function.Call(Hash.SET_VEHICLE_EXTRA, new InputArgument[] { DMC, 10, -1 }); //} effects.reseteffects(temp); if (Game.Player.Character.IsInVehicle(DMC)) { if (Game.Player.WantedLevel > 0) { Game.Player.WantedLevel = 0; } delorean.timetravelentry(); CharacterTravel(delorean); reentry(DMC); } else { delorean.timetravelentry(); delorean.refilltimecurcuits = false; Script.Wait(10); } }