public virtual void Draw() { if (button == null || text == null) { return; } button.Draw(); text.Draw(); }
void ShowStats() { int x = (int)Math.Round((double)UI.WIDTH / 2); int y = (int)Math.Round((double)UI.HEIGHT / 9.5); UIText text; text = new UIText( "Friendly:" + team0.members.Count + " Enemy:" + team1.members.Count + " Kills:" + team0.kills + " Deaths:" + team1.kills, //"\n" + //" Guntruck:" + team1.isGuntruckInField + //" Tank:" + team1.isTankInField + //" Chopper:" + team1.isChopperInField + //" Juggernaut:" + team1.isJuggernautInField + //"\n" + //" Guntruck:" + team0.isGuntruckInField + //" Tank:" + team0.isTankInField + //" Chopper:" + team0.isChopperInField + //" Juggernaut:" + team0.isJuggernautInField + //"\n" + //" InWave:" + isInWave + //" Wave:" + wave, new Point(x, y), 1f, Color.White, GTA.Font.ChaletComprimeCologne, true); text.Draw(); }
/// <summary> /// Draw entity heads up display. /// </summary> /// <param name="location"></param> /// <param name="color"></param> /// <param name="subText"></param> /// <param name="sizeMultiplier"></param> /// <param name="withText"></param> /// <param name="drawRect"></param> private static void DrawSquare(Point location, Color color, string subText, float sizeMultiplier, bool withText, bool drawRect = true) { if (drawRect) { UIRectangle rect; rect = new UIRectangle(new Point((int)((location.X - 25) * sizeMultiplier), (int)(location.Y * sizeMultiplier)), new Size((int)(4 * sizeMultiplier), (int)(54 * sizeMultiplier))); rect.Color = color; rect.Draw(); rect = new UIRectangle(new Point((int)((location.X + 25) * sizeMultiplier), (int)(location.Y * sizeMultiplier)), new Size((int)(4 * sizeMultiplier), (int)(54 * sizeMultiplier))); rect.Color = color; rect.Draw(); rect = new UIRectangle(new Point((int)((location.X - 25) * sizeMultiplier), (int)((location.Y + 54) * sizeMultiplier)), new Size((int)(52 * sizeMultiplier), (int)(4 * sizeMultiplier))); rect.Color = color; rect.Draw(); rect = new UIRectangle(new Point((int)((location.X - 25) * sizeMultiplier), (int)(location.Y * sizeMultiplier)), new Size((int)(52 * sizeMultiplier), (int)(4 * sizeMultiplier))); rect.Color = color; rect.Draw(); } if (withText) { var text = new UIText(subText, new Point((int)((location.X - 5) * sizeMultiplier), (int)((location.Y + 60) * sizeMultiplier)), 0.3f, Color.White, GTA.Font.ChaletComprimeCologne, false); text.Draw(); } }
public TimeTravel() { try { instantDelorean = new Delorean_class(); Interval = 1; Tick += onTick; KeyUp += onKeyUp; KeyDown += onKeyDown; //loadscriptsettings(); Game.Player.CanControlCharacter = true; if (Game.Player.Character.IsInVehicle()) { Game.Player.Character.CurrentVehicle.IsVisible = true; } } catch (Exception e) { while(true) { UIText debug2 = new UIText(e.Message, new Point(200, 100), (float)0.6); debug2.Draw(); Application.DoEvents(); } } }
internal override void update() { base.update(); Ped playerPed = Game.Player.Character; if (playerPed.IsInVehicle() && playerVehicle != null) { if (menu_speed.Checked) { bool isMPH = speedTypes[menu_speed_type.Index] == "MPH"; int speed = isMPH ? (int)(playerVehicle.Speed * 2.236936f) : (int)(playerVehicle.Speed * 3.6f); string type = isMPH ? "mph" : "kph"; UIText speedText = new UIText($"{speed} {type}", SPEED_POINT, .5f); speedText.Draw(); } if (playerVehicle.CanTiresBurst == menu_bullet_proof_tires.Checked) { playerVehicle.CanTiresBurst = !menu_bullet_proof_tires.Checked; } } if (menu_show_health.Checked) { Vehicle veh = playerPed.IsInVehicle() ? playerPed.CurrentVehicle : playerPed.LastVehicle; if (veh != null) { var text = String.Format("General HP: ~o~{0}~w~\nEngine HP: ~o~{1}~w~\nBody HP: ~o~{2}~w~\nPetrol HP: ~o~{3}~w~", (int)veh.Health, (int)veh.EngineHealth, (int)veh.BodyHealth, (int)veh.PetrolTankHealth ); Util.DrawSimpleText(text, UI.WIDTH, UI.HEIGHT, .3f); } } }
/// <summary> /// Draws the complete information of a ped. That includes name and health. /// </summary> /// <param name="Character">The ped to get the information.</param> /// <param name="Position">The position on the screen.</param> /// <param name="TotalSize">The full size of the information field.</param> public static void PedInfo(Configuration Config, Ped Character, Point Position) { // First, draw the black background UIRectangle Background = new UIRectangle(Position, Config.SquadInfoSize, CBackground); Background.Draw(); // Then, calculate the health bar: (Percentage / 100) * DefaultWidth float Width = (Character.HealthPercentage() / 100) * Config.SquadHealthSize.Width; // Create a Size with the required size Size NewHealthSize = new Size(Convert.ToInt32(Width), Config.SquadHealthSize.Height); // For the dividers, get the distance between each one of them int HealthSep = Config.SquadHealthSize.Width / 4; // Prior to drawing the health bar we need the separators for (int Count = 0; Count < 5; Count++) { // Calculate the position of the separator Point Pos = (Position + Config.SquadHealthPos) + new Size(HealthSep * Count, 0) + Config.DividerPosition; // And draw it on screen UIRectangle Divider = new UIRectangle(Pos, Config.DividerSize, CDivider); Divider.Draw(); } // After the separators are there, draw the health bar on the top UIRectangle HealthBar = new UIRectangle(Position + Config.SquadHealthPos, NewHealthSize, Character.HealthColor()); HealthBar.Draw(); // And finally, draw the ped name UIText Name = new UIText(Character.Name(Config), Position + Config.NamePosition, 0.3f); Name.Draw(); }
//Happens every 10 ms void OnTick(object sender, EventArgs e) { //I build here a Frequenzy divisor for things that do not have to happen so often int TickDivisor = 50; TickCnt++; if (TickCnt > TickDivisor) { TickCnt = 0; DividedTick(sender, e);//Happens every 500 ms } //HUD UIText txtA = new UIText( PointsTeamA.ToString(), new System.Drawing.Point(0, 0), 1, System.Drawing.Color.Red); txtA.Draw(); UIText txtB = new UIText( PointsTeamB.ToString(), new System.Drawing.Point(100, 0), 1, System.Drawing.Color.Yellow); txtB.Draw(); }
private void onTick(object sender, EventArgs eventArgs) { // this function will execute on every frame! // Note - you can change the inverval time // Use examples: Checking player wanted level, getting all nearby NPCs Player = Game.Player.Character; if (Player.IsInVehicle()) { speedKph = Player.CurrentVehicle.Speed * 3600 / 1000; if (speedKph > highestSpeedKph) { highestSpeedKph = speedKph; } } else { speedKph = 0; // reset speed when not in vehicle } textSpeedCurr.Caption = "Speed: " + Math.Round(speedKph).ToString() + "km"; textSpeedMax.Caption = "Max: " + Math.Round(highestSpeedKph).ToString() + "km"; textSpeedCurr.Enabled = true; textSpeedMax.Enabled = true; textSpeedCurr.Draw(); textSpeedMax.Draw(); UpdateDeadPeds(); }
public void Draw() { if (infoContainer != null) { for (int i = 0; i < numAvailableSlots; i++) // hud progression bars are in first part { if (infoContainer.Items[i] != null) { //update progress bar. infoContainer.Items[i] = new UIRectangle(new Point(ProgressionBarXOffset, 12 + (30 * i)), new Size(entries[i].ScoreValue, 11), Color.Orange); if (entries[i].SpritePath != null && File.Exists(Resources.BaseDirectory + entries[i].SpritePath)) { UI.DrawTexture(Resources.BaseDirectory + entries[i].SpritePath, 0, 0, 100, new Point(infoContainer.Position.X + TeamImageXOffset, infoContainer.Position.Y + 2 + 30 * i), new Size(24, 24)); } else { if (entries[i].TeamName != null) { var text = new UIText(entries[i].TeamName + ":", new Point(infoContainer.Position.X + 10, infoContainer.Position.Y + 2 + 30 * i), 0.4f, Color.White, GTA.Font.Monospace, false); text.Draw(); } } } } infoContainer.Draw(); } }
void OnTick(object sender, EventArgs e) { if (enable) { Player player = Game.Player; if (player != null && player.CanControlCharacter && player.IsAlive && player.Character != null) { // get coords Vector3 pos = player.Character.Position; float heading = player.Character.Heading; text.Caption = String.Format("x:{0} y:{1} z:{2} angle:{3}", pos.X.ToString("0.000"), pos.Y.ToString("0.000"), pos.Z.ToString("0.000"), heading.ToString("0.000")); // draw container.Draw(); } } if (enteringText) { //nameText.Position = new Point(UI.WIDTH / 2, UI.HEIGHT / 2); //nameText.Centered = true; nameText.Caption = "Enter a name for " + coordStr + "\n" + nameStr; nameText.Draw(); Function.Call(Hash.DISABLE_ALL_CONTROL_ACTIONS, controlIndex); } else { //Function.Call(Hash.ENABLE_ALL_CONTROL_ACTIONS, controlIndex); } }
public void Tick() { if (on) { timeText.Caption = DateTime.Now.ToString(); timeText.Draw(); } }
private void DrawMoveSpeedText() { if (!HideHud) { var text = new UIText("Speed: " + movementSpeed.ToString("N0") + " m/s", new Point(UI.WIDTH / 2, 0), 0.5f, Color.White, GTA.Font.ChaletLondon, true, false, true); text.Draw(); } }
public void Draw(bool useMph) { if (State == MaxSpeedState.Counting) { float speedKph = Utils.MsToKmh(maxSpeed); maxSpeedText.Caption = "Max: " + (useMph ? Utils.KmToMiles(speedKph).ToString("0.0 mph") : speedKph.ToString("0.0 km/h")); maxSpeedText.Draw(); } }
/// <summary> /// Draw the console /// </summary> public void Draw() { consoleHeaderText.Draw(); input.Draw(); consoleInputText.Draw(); log.DrawLogs(); consoleInputContainer.Draw(); DrawFrame(); consoleContainer.Draw(); }
public override void ShowInfo3D() { UIText info = new UIText("DecalType: " + (DecalTypeIndexIsValid() ? GraffitiMethods.UsableDecalTypes[GraffitiOG.DecalTypeIndex].DecalTypeID.ToString() : "None") + "\nCount: " + GraffitiOG.LoadedCount /*"\nAvailable: " + GraffitiMethods.UsableDecalTypes[GraffitiOG.DecalTypeIndex].Available*/, UI.WorldToScreen(Location), 0.40f, System.Drawing.Color.White, Font.ChaletComprimeCologne, true); info.Enabled = true; info.Draw(); }
public virtual void Draw() { if (button == null || text == null) { return; } button.Draw(); text.Draw(); if (UnderlinedAbove && underlineAbove != null) { underlineAbove.Draw(); } if (UnderlinedBelow && underlineBelow != null) { underlineBelow.Draw(); } }
public override void ShowInfo3D() { UIText info = new UIText(Graffiti.TextureName /*+ "\nDecalType: " + GraffitiMethods.UsableDecalTypes[AvailableDecalTypeIndex].DecalTypeID + "\nAvailable: " + GraffitiMethods.UsableDecalTypes[AvailableDecalTypeIndex].Available */ + "\n" + GTAVFunctions.GTAFunction.RoundVector3D(this.Location, 3), UI.WorldToScreen(TaggedVehicle.GetOffsetInWorldCoords(Location)), 0.40f, System.Drawing.Color.FromArgb(180, System.Drawing.Color.White), Font.ChaletComprimeCologne, true); info.Enabled = true; info.Draw(); }
public void ShowOutfitInfo3D() { if (CurrentVehicle == null || !CurrentVehicle.Exists()) { return; } UIText info = new UIText("Outfit Name: " + OutfitName + "\nVehicle Name: " + (FriendlyName == null || FriendlyName == "NULL" ? DisplayName : FriendlyName), UI.WorldToScreen(CurrentVehicle.Position), 0.40f, System.Drawing.Color.FromArgb(180, System.Drawing.Color.Red), Font.ChaletComprimeCologne, true); info.Enabled = true; info.Draw(); }
private void vehicleDetection(object sender, EventArgs e) { if (modActive) { try { if (cameraToggle) { Game.DisableControlThisFrame(1, GTA.Control.Attack); vehicles = World.GetNearbyVehicles(World.RenderingCamera.Position, 80f); RaycastResult ray = World.RaycastCapsule(World.RenderingCamera.Position + new Vector3(0, 0, 1.5f), World.RenderingCamera.Direction, 100f, 1.0f, IntersectOptions.Mission_Entities); foreach (Vehicle v in vehicles) { UIText vehicleName = new UIText(v.FriendlyName + ", " + v.ClassType.ToString(), new Point(110, 540), 0.63f, Color.White, GTA.Font.HouseScript, true); if (ray.HitEntity == v) { vehicleName.Draw(); if (Game.IsDisabledControlJustPressed(1, GTA.Control.Attack)) { v.Driver.Delete(); Player.SetIntoVehicle(v, VehicleSeat.Driver); Player.CurrentVehicle.MaxHealth = 901; cameraToggle = false; } World.DrawMarker(MarkerType.UpsideDownCone, (v.Position + new Vector3(0f, 0f, v.Model.GetDimensions().Z + 1)), new Vector3(0f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0.4f, 0.4f, 0.4f), Color.Orange, false, false, 0, false, "", "", false); } } } foreach (Vehicle s in vehicles) { if (!Player.IsInVehicle() || Game.IsEnabledControlJustPressed(1, GTA.Control.VehicleExit)) { s.MaxHealth = 900; } if (s.IsSeatFree(VehicleSeat.Driver) && s.MaxHealth == 901) { s.MaxHealth = 900; s.CreateRandomPedOnSeat(VehicleSeat.Driver); if (s.Driver != Player) { s.Driver.Task.ReactAndFlee(Player); } } } } catch { Exception why; } } }
private void drawString( string str, float xpos, float ypos, float scale, Color color, bool centered) { UIText uiText = new UIText(str, new Point((int)((double)(float)UI.WIDTH * (double)xpos), (int)((double)(float)UI.HEIGHT * (double)ypos)), scale, color, (Font)2, centered); uiText.set_Enabled(true); uiText.Draw(); }
void OnTick(object sender, EventArgs e) { if (firstrun && asd.IsOnMinimap) { firstrun = false; UI.Notify("Don't mind the loading online screen if you're seeing it, it just loads the map."); // KUDOS TO ISOFX FOR THE NATIVE \/ Function.Call(Hash._LOAD_MP_DLC_MAPS); // KUDOS TO ISOFX FOR THE IPL \/ Function.Call(Hash.REQUEST_IPL, "hei_sm_16_interior_v_bahama_milo_"); UI.Notify("After it loads, just walk to the door of Bahama Mamas to be teleported inside."); } bool xf = Game.Player.Character.Position.X < -1386.75f && Game.Player.Character.Position.X > -1389f; bool yf = Game.Player.Character.Position.Y > -589.1f && Game.Player.Character.Position.Y < -587.35f; bool zf = Game.Player.Character.Position.Z > 29f && Game.Player.Character.Position.Z < 35f; if (xf && yf && zf) { if (Game.Player.Character.IsInVehicle()) { Game.Player.Character.CurrentVehicle.Position = new Vector3(-1387.975f, -584.7377f, 30.35f); } else { Game.Player.Character.Position = new Vector3(-1387.975f, -584.7377f, 30.35f); } UI.Notify("Teleported you outside, walk to the door to be teleported inside."); } bool xf2 = Game.Player.Character.Position.X < -1387.7f && Game.Player.Character.Position.X > -1389f; bool yf2 = Game.Player.Character.Position.Y > -586.9f && Game.Player.Character.Position.Y < -585.35f; if (xf2 && yf2 && zf) { if (Game.Player.Character.IsInVehicle()) { Game.Player.Character.CurrentVehicle.Position = new Vector3(-1391f, -591.54f, 30.35f); } else { Game.Player.Character.Position = new Vector3(-1391f, -591.54f, 30.35f); } UI.Notify("Teleported you inside, walk to the door to be teleported outside."); } if (debugmode) { UIText uIText = new UIText(xf2.ToString() + yf2.ToString() + " - " +xf.ToString() + yf.ToString() + zf.ToString() + " - " + Game.FPS.ToString() + " - " + (Game.Player.Character.Position.ToString()), new Point(10, 10), 0.4f, Color.Red); uIText.Draw(); } }
private void OnTick(object sender, EventArgs e) { _statusText.Draw(); if (!Enabled) { return; } foreach (var module in _activatedModules) { module.OnTick(sender, e); } }
public override void Draw() { base.Draw(); if (m_State == State.Normal) { m_Text.SetColor(m_NormalColor); } else if (m_State == State.Pressed) { m_Text.SetColor(m_PressedColor); } m_Text.Draw(); }
public static void ShowMessages() { for (int i = 0; i < messages.Length; i++) { String message = messages[i]; if (!string.IsNullOrEmpty(message)) { UIText messageHandle = GetMessageHandle(i); messageHandle.Caption = message; messageHandle.Draw(); } } }
void Draw(Entity[] es, Vector3 p) { foreach (Entity e in es) { float x; float y; x = 0; y = 0; if (getScreenPoint(e.Position, ref x, ref y)) { int health = e.Health; float dist = World.GetDistance(e.Position, p); Type tp = e.GetType(); if (tp.Equals(typeof(Vehicle))) { DrawEntBox(e, Color.AliceBlue); UIText statusText = new UIText(string.Format("{0:F2}\n{1:F2} \n{2:F2} \n{3}\n", dist, ((Vehicle)e).Acceleration, ((Vehicle)e).Speed, ((Vehicle)e).ClassType.ToString()), new Point((int)Math.Round(x * UI.WIDTH), (int)Math.Round(y * UI.HEIGHT)), 0.2f, Color.AliceBlue, GTA.Font.ChaletLondon, false, true, false); statusText.Draw(); } else if (tp.Equals(typeof(Ped))) { DrawEntBox(e, Color.ForestGreen); UIText statusText = new UIText(string.Format("{0:F2}", dist), new Point((int)Math.Round(x * UI.WIDTH), (int)Math.Round(y * UI.HEIGHT)), 0.2f, Color.ForestGreen, GTA.Font.ChaletLondon, false, true, false); statusText.Draw(); } else if (tp.Equals(typeof(Prop))) { switch ((uint)e.Model.Hash) { case 0x3E2B73A4: // prop_traffic_01a case 0x336E5E2A: // prop_traffic_01b case 0xD8EBA922: // prop_traffic_01d case 0xD4729F50: // prop_traffic_02a case 0x272244B2: // prop_traffic_02b case 0x33986EAE: // prop_traffic_03a case 0x2323CDC5: // prop_traffic_03b // Function.Call<bool>(Hash.SET_ENTITY_TRAFFICLIGHT_OVERRIDE, e, 0); DrawEntBox(e, Color.Red); DrawLightBox(e); UIText statusText = new UIText(string.Format("{0}\n{1}\n{2}\n{3}", dist, formatVector(offset), formatVector(e.ForwardVector), formatVector(e.UpVector)), new Point((int)Math.Round(x), (int)Math.Round(y)), 0.4f, Color.MediumBlue, GTA.Font.ChaletLondon, false, true, false); statusText.Draw(); break; } } } } }
private void OnTickDraw(object Sender, EventArgs Args) { // If there is a frequency, add it at the end like every normal radio ad string RadioName = Selected.Frequency == 0 ? Selected.Name : Selected.Name + " " + Selected.Frequency.ToString(); // Draw the previous, current and next radio name UIText PreviousUI = new UIText(Previous.Name, new Point((int)(UI.WIDTH * .5f), (int)(UI.HEIGHT * .025f)), .5f, Color.LightGray, GTA.Font.ChaletLondon, true, true, false); PreviousUI.Draw(); UIText CurrentUI = new UIText(RadioName, new Point((int)(UI.WIDTH * .5f), (int)(UI.HEIGHT * .055f)), .6f, Color.White, GTA.Font.ChaletLondon, true, true, false); CurrentUI.Draw(); UIText NextUI = new UIText(Next.Name, new Point((int)(UI.WIDTH * .5f), (int)(UI.HEIGHT * .09f)), .5f, Color.LightGray, GTA.Font.ChaletLondon, true, true, false); NextUI.Draw(); }
public void Draw() { if (State != AccelerationTimerState.Off) { timerText.Caption = watchTime.ToString("0.000s"); if (State == AccelerationTimerState.WaitingForStop) { timerText.Caption += "\nPlease stop your vehicle"; } else if (State == AccelerationTimerState.Ready) { timerText.Caption += "\nReady"; } timerText.Draw(); } }
public void OnTick() { _myMenuPool.ProcessMenus(); if (Game.CurrentInputMode == InputMode.GamePad) { if (Game.IsControlJustReleased(0, GTA.Control.LookBehind)) { Show(); } } if (Sounds.testSound != null) { UIText Instruct = new UIText("PlayState: " + Sounds.testSound.getPlayState() + "\n PlayStatePaused: " + Sounds.testSound.getPlayStatePaused() + "\n PlayStateStopped: " + Sounds.testSound.getPlayStateStopped(), new Point(400, 300), (float)0.9); Instruct.Draw(); } }
private void CarInfo() { if (playerPed.IsInVehicle() == true) { if (showCarInfo.Checked == true) { float speedKph = playerPed.CurrentVehicle.Speed * 3600 / 1000; string speedConv = speedKph.ToString("0"); float gear = playerPed.CurrentVehicle.CurrentGear; string gearConv = gear.ToString(); float engineHealth = playerPed.CurrentVehicle.EngineHealth / 10; int engineHealthInt = Convert.ToInt32(engineHealth); string engineHealthConv = engineHealthInt.ToString(); speedText.Caption = speedConv + " KM"; gearText.Caption = "Gear " + gearConv; rpmText.Caption = "Engine Health " + engineHealthConv; if (engineHealth >= 100) { rpmText.Color = Color.White; } if (engineHealth < 50) { rpmText.Color = Color.Yellow; } if (engineHealth < 25) { rpmText.Color = Color.Red; } speedText.Enabled = true; speedText.Draw(); gearText.Enabled = true; gearText.Draw(); rpmText.Enabled = true; rpmText.Draw(); } } }
private static void DrawSquare(Point location, Color color, string subText) { rect = new UIRectangle(new Point(location.X - 25, location.Y), new Size(4, 52)); rect.Color = color; rect.Draw(); rect = new UIRectangle(new Point(location.X + 25, location.Y), new Size(4, 52)); rect.Color = color; rect.Draw(); rect = new UIRectangle(new Point(location.X - 25, location.Y + 50), new Size(52, 4)); rect.Color = color; rect.Draw(); rect = new UIRectangle(new Point(location.X - 25, location.Y), new Size(52, 4)); rect.Color = color; rect.Draw(); entityText = new UIText(subText, new Point(location.X - 5, location.Y + 70), 0.3f, Color.White, Font.ChaletComprimeCologne, false); entityText.Draw(); // entityText = new UIText(subText1, new Point(location.X - 30, location.Y + 70), 0.22f); // entityText.Draw(); }
public override void Draw(Size offset) { if (rectHeader == null || textHeader == null || (HasFooter && (rectFooter == null || textFooter == null))) { return; } if (HasFooter) { rectFooter.Draw(offset); textFooter.Draw(offset); } rectHeader.Draw(offset); textHeader.Draw(offset); for (int i = 0; i < ItemDrawCount; i++) { Items[i + CurrentScrollOffset].Draw(offset); } //DrawScrollArrows(CurrentScrollOffset > 0, CurrentScrollOffset < MaxScrollOffset, offset); }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.Black); if (!menu.IsActive) { DrawGame(gameTime); } // spriteBatch for UI what you draw here will not be affected by the camera spriteBatch.Begin(samplerState: SamplerState.PointClamp); if (!menu.IsActive) { foreach (var item in uiItems) { if (item.IsActive) { item.Draw(spriteBatch); } } if (dialogueUIText.IsActive) { dialogueUIText.Draw(spriteBatch); } else if (victoryText.IsActive) { victoryText.Draw(spriteBatch); } } else { menu.Draw(spriteBatch); } spriteBatch.End(); base.Draw(gameTime); }
public void display_menu(string file, string extention) { string img = file; if (File.Exists(Application.StartupPath + "\\scripts\\menu images\\" + img + extention)) { Sprite.DrawTexture(Application.StartupPath + "\\scripts\\menu images\\" + img + extention, new Point(50,50), new Size(1920, 1080)); } else { if (img == "time-circuits") { UIText menu = new UIText("Theft to the Future Mod menu", new Point(100, 100), (float)0.6, Color.Yellow); menu.Draw(); UIText menu1 = new UIText("Activate Time Circuits", new Point(100, 150), (float)0.6, Color.LightGreen); menu1.Draw(); UIText menu2 = new UIText("Spawn Delorean", new Point(100, 200), (float)0.6); menu2.Draw(); UIText menu3 = new UIText("Play as Marty Mcfly", new Point(100, 250), (float)0.6); menu3.Draw(); UIText menu4 = new UIText("Play as Doc Brown", new Point(100, 300), (float)0.6); menu4.Draw(); UIText menu5 = new UIText("Exit", new Point(100, 350), (float)0.6); menu5.Draw(); } else if (img == "delorean") { UIText menu = new UIText("Theft to the Future Mod menu", new Point(100, 100), (float)0.6, Color.Yellow); menu.Draw(); UIText menu1 = new UIText("Activate Time Circuits", new Point(100, 150), (float)0.6); menu1.Draw(); UIText menu2 = new UIText("Spawn Delorean", new Point(100, 200), (float)0.6, Color.LightGreen); menu2.Draw(); UIText menu3 = new UIText("Play as Marty Mcfly", new Point(100, 250), (float)0.6); menu3.Draw(); UIText menu4 = new UIText("Play as Doc Brown", new Point(100, 300), (float)0.6); menu4.Draw(); UIText menu5 = new UIText("Exit", new Point(100, 350), (float)0.6); menu5.Draw(); } else if (img == "marty-mcfly") { UIText menu = new UIText("Theft to the Future Mod menu", new Point(100, 100), (float)0.6, Color.Yellow); menu.Draw(); UIText menu1 = new UIText("Activate Time Circuits", new Point(100, 150), (float)0.6); menu1.Draw(); UIText menu2 = new UIText("Spawn Delorean", new Point(100, 200), (float)0.6); menu2.Draw(); UIText menu3 = new UIText("Play as Marty Mcfly", new Point(100, 250), (float)0.6, Color.LightGreen); menu3.Draw(); UIText menu4 = new UIText("Play as Doc Brown", new Point(100, 300), (float)0.6); menu4.Draw(); UIText menu5 = new UIText("Exit", new Point(100, 350), (float)0.6); menu5.Draw(); } else if (img == "DOC-BROWN") { UIText menu = new UIText("Theft to the Future Mod menu", new Point(100, 100), (float)0.6, Color.Yellow); menu.Draw(); UIText menu1 = new UIText("Activate Time Circuits", new Point(100, 150), (float)0.6); menu1.Draw(); UIText menu2 = new UIText("Spawn Delorean", new Point(100, 200), (float)0.6); menu2.Draw(); UIText menu3 = new UIText("Play as Marty Mcfly", new Point(100, 250), (float)0.6); menu3.Draw(); UIText menu4 = new UIText("Play as Doc Brown", new Point(100, 300), (float)0.6, Color.LightGreen); menu4.Draw(); UIText menu5 = new UIText("Exit", new Point(100, 350), (float)0.6); menu5.Draw(); } else if (img == "exit") { UIText menu = new UIText("Theft to the Future Mod menu", new Point(100, 100), (float)0.6, Color.Yellow); menu.Draw(); UIText menu1 = new UIText("Activate Time Circuits", new Point(100, 150), (float)0.6); menu1.Draw(); UIText menu2 = new UIText("Spawn Delorean", new Point(100, 200), (float)0.6); menu2.Draw(); UIText menu3 = new UIText("Play as Marty Mcfly", new Point(100, 250), (float)0.6); menu3.Draw(); UIText menu4 = new UIText("Play as Doc Brown", new Point(100, 300), (float)0.6); menu4.Draw(); UIText menu5 = new UIText("Exit", new Point(100, 350), (float)0.6, Color.LightGreen); menu5.Draw(); } } }
public void prison_controle_Tick() { if (arrested) { stop_scripts(); } if (inprison) { stop_scripts(); if (Game.Player.Character.Position.DistanceTo(new Vector3(1752.894f, 2592.242f, 45.56502f)) < 1f) { arrested = true; escape = false; Function.Call(Hash.ENABLE_ALL_CONTROL_ACTIONS, new InputArgument[] { 1 }); Game.FadeScreenOut(0x9c4); Game.Player.Character.Weapons.RemoveAll(); while (!Function.Call<bool>(Hash.IS_SCREEN_FADED_OUT, new InputArgument[0])) { stop_scripts(); Script.Wait(0); } Game.Player.Character.Position = new Vector3(1617.643f, 2523.981f, 45.56489f); Game.Player.Character.Heading = 264.718f; clothes_changer(); Game.FadeScreenIn(0x9c4); Game.Player.CanControlCharacter = true; Function.Call(Hash.SET_ENABLE_HANDCUFFS, new InputArgument[] { Game.Player.Character, 0 }); Function.Call(Hash.SET_ENABLE_BOUND_ANKLES, new InputArgument[] { Game.Player.Character, 0 }); int num = 0x7ea26372; int num2 = Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, new InputArgument[] { Game.Player.Character }); Function.Call(Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, new InputArgument[] { 0xff, num, num2 }); Function.Call(Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, new InputArgument[] { 0xff, num2, num }); Function.Call(Hash.SET_RELATIONSHIP_BETWEEN_GROUPS, new InputArgument[] { 1, num, num2 }); bail = World.CreateBlip(new Vector3(1691.709f, 2565.036f, 45.56487f)); bail.Color = BlipColor.White; Function.Call(Hash.SET_CLOCK_TIME, new InputArgument[] { 13, 0, 0 }); roit = World.CreateBlip(escape_Ped.Position); roit.Sprite = BlipSprite.DollarSign; _headsup = new UIText(string.Concat(new object[] { "Time: ~b~", hours, ":", minit }), new Point(2, 520), 0.7f, Color.WhiteSmoke, GTA.Font.HouseScript, false); _headsupRectangle = new UIRectangle(new Point(0, 520), new Size(0xd7, 0x41), Color.FromArgb(100, 0, 0, 0)); if (police != null) { police.Delete(); } if (policecar != null) { policecar.Delete(); } inprison = false; } if ((Game.Player.Character.Position.DistanceTo(new Vector3(1764.323f, 2604.595f, 45.56498f)) < 5f) && (Game.Player.Character.CurrentVehicle == policecar)) { Game.Player.Character.Task.GoTo(new Vector3(1752.894f, 2592.242f, 45.56502f)); } } if (arrested) { if (Game.Player.Character.IsDead) { respawn.RespawnPlayer(new Vector3(1617.643f, 2523.981f, 45.56489f), 264.718f); } if (player_status == status.In_roit && Game.GameTime > time +1000) { Model mod = new Model(PedHash.Prisoner01); mod.Request(); while (!mod.IsLoaded) { stop_scripts(); Script.Wait(0); } Ped[] allped = World.GetAllPeds(mod); for (int i = 0; i < allped.Length; i++) { bool find = false; for (int j = 0; j < prisoner.Count; j++) if (prisoner[j] == allped[i]) find = true; if (!find) prisoner.Add(allped[i]); } mod.MarkAsNoLongerNeeded(); //=================================================== mod = new Model(PedHash.Prisoner01SMY); mod.Request(); while (!mod.IsLoaded) { stop_scripts(); Script.Wait(0); } allped = World.GetAllPeds(mod); for (int i = 0; i < allped.Length; i++) { bool find = false; for (int j = 0; j < prisoner.Count; j++) if (prisoner[j] == allped[i]) find = true; if (!find) prisoner.Add(allped[i]); } mod.MarkAsNoLongerNeeded(); //=================================================== mod = new Model(PedHash.Prisguard01SMM); mod.Request(); while (!mod.IsLoaded) { stop_scripts(); Script.Wait(0); } allped = World.GetAllPeds(mod); for (int i = 0; i < allped.Length; i++) { bool find = false; for (int j = 0; j < garde.Count; j++) if (garde[j] == allped[i]) find = true; if (!find) garde.Add(allped[i]); } mod.MarkAsNoLongerNeeded(); for (int j = 0; j < prisoner.Count; j++) { GiveWeapons_prisoner(prisoner[j]); prisoner[j].CanSwitchWeapons = true; //Function.Call(Hash.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS, prisoner[j], true); } for (int j = 0; j < garde.Count; j++) { GiveWeapons_Garde(garde[j]); garde[j].CanSwitchWeapons = true; // Function.Call(Hash.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS, garde[j], true); } time = Game.GameTime; } Function.Call(Hash.SET_MAX_WANTED_LEVEL, new InputArgument[] { 0 }); stop_scripts(); int hh = Function.Call<int>(Hash.GET_CLOCK_HOURS, new InputArgument[0]); int mm = Function.Call<int>(Hash.GET_CLOCK_MINUTES, new InputArgument[0]); if ((hh == 14) && (mm == 0)) { Function.Call(Hash.SET_CLOCK_TIME, new InputArgument[] { 13, 0, 0 }); time = Game.GameTime; } if (!((mm != 0) || hhh)) { minit = 0; hours--; hhh = true; } else if (mm > 0) { minit = 60 - mm; hhh = false; } if ((mm == 0 || mm == 5 || mm == 10 || mm == 15 || mm == 20 || mm == 25 || mm == 30 || mm == 35 || mm == 40 || mm == 45 || mm == 50 || mm == 55 || mm == 60) && !doit) { Model mod = new Model(PedHash.Prisoner01); mod.Request(); while (!mod.IsLoaded) { stop_scripts(); Script.Wait(0); } Ped[] allped = World.GetAllPeds(mod); for (int i = 0; i < allped.Length;i++ ) { bool find = false; for (int j = 0; j < prisoner.Count; j++) if (prisoner[j] == allped[i]) find = true; if (!find) prisoner.Add(allped[i]); } mod.MarkAsNoLongerNeeded(); //=================================================== mod = new Model(PedHash.Prisoner01SMY); mod.Request(); while (!mod.IsLoaded) { stop_scripts(); Script.Wait(0); } allped = World.GetAllPeds(mod); for (int i = 0; i < allped.Length; i++) { bool find = false; for (int j = 0; j < prisoner.Count; j++) if (prisoner[j] == allped[i]) find = true; if (!find) prisoner.Add(allped[i]); } mod.MarkAsNoLongerNeeded(); //=================================================== mod = new Model(PedHash.Prisguard01SMM); mod.Request(); while (!mod.IsLoaded) { stop_scripts(); Script.Wait(0); } allped = World.GetAllPeds(mod); for (int i = 0; i < allped.Length; i++) { bool find = false; for (int j = 0; j < garde.Count; j++) if (garde[j] == allped[i]) find = true; if (!find) garde.Add(allped[i]); } mod.MarkAsNoLongerNeeded(); doit = true; } else if ((mm != 0 && mm != 5 && mm != 10 && mm != 15 && mm != 20 && mm != 25 && mm != 30 && mm != 35 && mm != 40 && mm != 45 && mm != 50 && mm != 55 && mm != 60) && doit) { doit = false; } stop_scripts(); _headsup = new UIText(string.Concat(new object[] { "Time: ~b~", hours, ":", minit }), new Point(2, 520), 0.7f, Color.WhiteSmoke, GTA.Font.ChaletComprimeCologne, false); _headsupRectangle = new UIRectangle(new Point(0, 520), new Size(0xd7, 0x41), Color.FromArgb(100, 0, 0, 0)); _headsup.Draw(); _headsupRectangle.Draw(); if (Game.Player.Character.Position.DistanceTo(new Vector3(1691.709f, 2565.036f, 45.56487f)) < 2f) { UI.Notify("press [E] to bail : ~g~ " + 0x4c4b40 + "~w~$"); } else if (Game.Player.Character.Position.DistanceTo(new Vector3(1625.474f, 2491.485f, 45.62026f)) < 4f) { UI.Notify("press [E] to escape for : ~g~ " + 0x4c4b40 + "~w~$"); UI.Notify("press [Y] to make roit for : ~g~ " + 0x4c4b40 + "~w~$"); } if ((hours == 0) && (minit == 0)) { bail.Remove(); roit.Remove(); escape_Ped.MarkAsNoLongerNeeded(); Game.Player.Character.Position = new Vector3(1849.555f, 2586.085f, 45.67202f); Game.Player.Character.Heading = 258.4564f; Function.Call(Hash.SET_MAX_WANTED_LEVEL, new InputArgument[] { 5 }); Function.Call(Hash.PAUSE_CLOCK, new InputArgument[] { 0 }); arrested = false; _headsup = null; _headsupRectangle = null; } } }
public void Draw() { if (startOffset != null) position += startOffset.Value; Function.Call(Hash.SET_DRAW_ORIGIN, position.X, position.Y, position.Z, 0); var uiText = new UIText(string.Format("x{0}", value), Point.Empty, 0.8f, mainColor, font, false); uiText.Draw(); if (text != null) { uiText = new UIText(text, new Point(0, 29), 0.66F, textColor, Font.ChaletComprimeCologne, false); uiText.Draw(); } Function.Call(Hash.CLEAR_DRAW_ORIGIN); }
static public void tick() { UIText Instruct = new UIText("delay: " + delay.getdelay(), new Point(400, 300), (float)0.9); //Instruct.Draw(); try { if (isintruck) { if (TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.IsInRangeOf(Docstruck.GetOffsetInWorldCoords(new Vector3(0, 0, 0)), (float)2.6)) { Docstruck.CloseDoor(VehicleDoor.Trunk, true); isintruck = false; DocsExparamentstart = true; delay.Reset(); } else { if (!driveonce) { Doc.Task.DriveTo(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon, Docstruck.GetOffsetInWorldCoords(new Vector3(0, 0, 0)), 1, 10); driveonce = true; } } } } catch { } if (DocsExparamentstart) { if (!tasksent) { if (Game.Player.Character.IsInRangeOf(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.GetOffsetInWorldCoords(new Vector3(0, 0, 0)), (float)20.8)) { if (!runonce) { loction.Remove(); loction = null; tasksent = true; runonce = true; delay.Start(); DeloreonEnter.Play(); } } if (Game.Player.Character.IsInRangeOf(Doc.GetOffsetInWorldCoords(new Vector3(0, 0, 0)), (float)24.8)) { Einstein.Task.RunTo(Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0, 2, 0))); } } else if (tasksent) { tasksent = false; TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Repair(); } if (delay.getdelay() == 24.5) { Docstruck.OpenDoor(VehicleDoor.Trunk, false, false); } else if (delay.getdelay() >= 74) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.EngineRunning = false; if (delay.getdelay() >= 68) { Doc.Task.LeaveVehicle(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon, false); DocsExparamentstart = false; runonce = false; //sayshi = true; delay.Stop(); delay.Reset(); } } else if (delay.getdelay() >= 38 && delay.getdelay() <= 60) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Speed = (float)-0.9; } } else if (sayshi) { if (Game.Player.Character.IsInRangeOf(Doc.GetOffsetInWorldCoords(new Vector3(0, 0, 0)), (float)3.8)) { Doc.Task.LookAt(Game.Player.Character); if (!runonce) { Experimentstart.Play(); runonce = true; delay.Start(); } } if (delay.getdelay() >= 7) { delay.Stop(); delay.Reset(); runonce = false; ExperimentwithEinstein = true; sayshi = false; } } else if (ExperimentwithEinstein) { UI.ShowSubtitle("Experiment with Einstein is on"); if (Game.IsKeyPressed(Keys.Up)) { Doc.Task.LookAt(Game.Player.Character); if (!runonce) { runonce = true; delay.Start(); } } if (delay.getdelay() == 0) { UIText Instruct2 = new UIText("Take out phone and open the camera app", new Point(400, 300), (float)0.9); Instruct2.Draw(); } else if (delay.getdelay() == 5) { Experimentstartintro.Play(); } else if (delay.getdelay() < 35) { if (delay.getdelay() == 18) { Einstein.Task.RunTo(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.GetOffsetInWorldCoords(new Vector3(-5, -4, 0)), true, 10); Einstein.Task.RunTo(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.GetOffsetInWorldCoords(new Vector3(-3, 0, 0)), true, 10); } else if (delay.getdelay() == 24) { if (Einstein.IsInVehicle(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon)) { delay.Resume(); Einstein.Task.ClearAll(); } else { delay.Pause(); Einstein.Task.ClearAll(); Einstein.Task.WarpIntoVehicle(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon, VehicleSeat.Driver); } } } else if (delay.getdelay() >= 36) { delay.Stop(); delay.Reset(); runonce = false; //Docwithremote = true; ExperimentwithEinstein = false; Einstein.Task.ClearAll(); TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.EngineRunning = true; } } else if (Docwithremote) { UI.ShowSubtitle("Remote with doc is on"); try { if (!pressede) if (!TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].RCmode) { UIText Instruct2 = new UIText("Switch to Remote Control Mode in the menu. Have it set the Car " + TimeTravel.instantDelorean.Deloreanlist.Count, new Point(400, 300), (float)0.9); Instruct2.Draw(); } else if (TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].RCmode) { if (!runonce) { posblip = World.CreateBlip(Docstruck.GetOffsetInWorldCoords(new Vector3(0, -250, 0)), 5); posblip.Color = BlipColor.Yellow; runonce = true; } UIText Instruct2 = new UIText("Press E when Ready", new Point(400, 300), (float)0.9); Instruct2.Draw(); } if (Game.IsKeyPressed(Keys.E)) { if (runonce) { runonce = false; Experimentstartwithremote.Play(); delay.Start(); } } else if (delay.getdelay() >= 10 && delay.getdelay() <= 24) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Speed = 0; } else if (delay.getdelay() >= 25 && delay.getdelay() <= 62) { if (TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Speed < 46) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.PlaceOnGround(); TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Speed += (float)0.1; } } else if (delay.getdelay() == 58) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.IsVisible = false; } else if (delay.getdelay() == 59) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Speed = 0; TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].ifwentoutoffcar = true; TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].RCmode = false; } else if (delay.getdelay() == 60) { Experimentsuccess.Play(); } else if (delay.getdelay() == 62) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].RCmodeenabled = true; } else if (delay.getdelay() == 114) { Einstein = TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.CreatePedOnSeat(VehicleSeat.Driver, PedHash.Chop); delay.Stop(); delay.Reset(); Experimentstartwithreentry.Play(); Docwithremote = false; reentry = true; } } catch (Exception e) { UI.ShowSubtitle(e.Message + " " + e.Source); } } else if (reentry) { if (delay.getdelay() == 0) { delay.Start(); } else if (delay.getdelay() == 3) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Position = Doc.GetOffsetInWorldCoords(new Vector3(3, -18, 0)); TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Rotation = Docstruck.Rotation; TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Speed = 30; TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.IsVisible = true; } else if (delay.getdelay() < 4 && delay.getdelay() > 26) { if (TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Speed > 0) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.Speed -= (float)0.1; } World.AddExplosion(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.GetOffsetInWorldCoords(new Vector3(-1, -2, 0)), ExplosionType.Car, 10, 0); } else if (delay.getdelay() == 26) { World.AddExplosion(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.GetOffsetInWorldCoords(new Vector3(-1, -2, 0)), ExplosionType.Car, 14, 0); World.AddExplosion(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.GetOffsetInWorldCoords(new Vector3(1, -2, 0)), ExplosionType.Car, 14, 0); } else if (delay.getdelay() < 40) { World.AddExplosion(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.GetOffsetInWorldCoords(new Vector3(-1, -2, 0)), ExplosionType.Car, 10, 0); } else if (delay.getdelay() == 40) { Doc.Task.RunTo(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon.GetOffsetInWorldCoords(new Vector3((float)-2.5, 0, 0))); } else if (delay.getdelay() == 51) { Doc.Task.EnterVehicle(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon, VehicleSeat.Driver); } else if (delay.getdelay() == 52) { Doc.Task.ClearAll(); } else if (delay.getdelay() == 58) { Einstein.Task.LeaveVehicle(); } else if (delay.getdelay() == 80) { Doc.Task.EnterVehicle(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon, VehicleSeat.Driver); } else if (delay.getdelay() >= 84 && delay.getdelay() < 124) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].toggletimecurcuits = true; if (delay.getdelay() >= 98) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Settime(0, 4, 0, 7, 1, 7, 7, 6, 0, 8, 1, 2, "am"); } if (delay.getdelay() >= 103) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Settime(2, 5, 1, 2, 0, 0, 0, 0, 1, 1, 1, 2, "am"); } if (delay.getdelay() >= 110) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Settime(0, 5, 0, 9, 1, 9, 5, 5, 1, 1, 1, 2, "am"); } } else if (delay.getdelay() == 124) { TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].toggletimecurcuits = false; delay.Stop(); delay.Reset(); reentry = false; Libeadsappear = true; Doc.Task.LeaveVehicle(TimeTravel.instantDelorean.Deloreanlist[TimeTravel.instantDelorean.Deloreanlist.Count - 1].Deloreon, true); } } else if (Libeadsappear) { } delay.Delay_changer(); }
public void keyset(Keys key) { UIText debug = new UIText("datecount: " + datecount , new Point(400, 300), (float)0.6); debug.Draw(); switch (key) { case Keys.NumPad0: num0.Play(); timeinput(0, datecount); break; case Keys.D0: num0.Play(); timeinput(0, datecount); break; case Keys.NumPad1: num1.Play(); timeinput(1, datecount); break; case Keys.D1: num1.Play(); timeinput(1, datecount); break; case Keys.NumPad2: num2.Play(); timeinput(2, datecount); break; case Keys.D2: num2.Play(); timeinput(2, datecount); break; case Keys.NumPad3: num3.Play(); timeinput(3, datecount); break; case Keys.D3: num3.Play(); timeinput(3, datecount); break; case Keys.NumPad4: num4.Play(); timeinput(4, datecount); break; case Keys.D4: num4.Play(); timeinput(4, datecount); break; case Keys.NumPad5: num5.Play(); timeinput(5, datecount); break; case Keys.D5: num5.Play(); timeinput(5, datecount); break; case Keys.NumPad6: num6.Play(); timeinput(6, datecount); break; case Keys.D6: num6.Play(); timeinput(6, datecount); break; case Keys.NumPad7: num7.Play(); timeinput(7, datecount); break; case Keys.D7: num7.Play(); timeinput(7, datecount); break; case Keys.NumPad8: num8.Play(); timeinput(8, datecount); break; case Keys.D8: num8.Play(); timeinput(8, datecount); break; case Keys.NumPad9: num9.Play(); timeinput(9, datecount); break; case Keys.D9: num9.Play(); timeinput(9, datecount); break; case Keys.Enter: timeinputstring = ""; if (datecount == 12) { inputenter.Play(); Settime(tday1, tday2, tmonth1, tmonth2, ty1, ty2, ty3, ty4, th1, th2, tm1, tm2, tampm); datecount = 0; tday1 = 0; tday2 = 0; tmonth1 = 0; tmonth2 = 0; ty1 = 0; ty2 = 0; ty3 = 0; ty4 = 0; th1 = 0; th2 = 0; tm1 = 0; tm2 = 0; tampm = "am"; datecount = 0; } else if (datecount == 8) { inputenter.Play(); Settime(tday1, tday2, tmonth1, tmonth2, ty1, ty2, ty3, ty4, fh1, fh2, fm1, fm2, fampm); datecount = 0; tday1 = 0; tday2 = 0; tmonth1 = 0; tmonth2 = 0; ty1 = 0; ty2 = 0; ty3 = 0; ty4 = 0; th1 = 0; th2 = 0; tm1 = 0; tm2 = 0; tampm = "am"; datecount = 0; } else if (datecount == 4) { inputenter.Play(); Settime(fday1, fday2, fmonth1, fmonth2, fy1, fy2, fy3, fy4, tmonth1, tmonth2, tday1, tday2, tampm); datecount = 0; tday1 = 0; tday2 = 0; tmonth1 = 0; tmonth2 = 0; ty1 = 0; ty2 = 0; ty3 = 0; ty4 = 0; th1 = 0; th2 = 0; tm1 = 0; tm2 = 0; tampm = "am"; datecount = 0; } else { inputerror.Play(); datecount = 0; } break; } }
static public void scene(Model character) { if (startscene) { if (character == PedHash.Michael) { if (delay.getdelay() == 0) { if (!runonce) { delay.Start(); SoundPlayer Intro = new SoundPlayer(Properties.Resources.Intro); Intro.Play(); runonce = true; } } else if (delay.getdelay() <= 28) { if (delay.getdelay() > 4 && delay.getdelay() < 7) { UIText debug = new UIText("Joshua Vanderzee" + Environment.NewLine + " Presents", new Point(280, 300), (float)1.5); debug.Draw(); } else if (delay.getdelay() > 12 && delay.getdelay() < 16) { UIText debug = new UIText(" A" + Environment.NewLine + "Grand Theft Auto V BTTF" + Environment.NewLine + " Mod", new Point(280, 200), (float)1.5); debug.Draw(); } else if (delay.getdelay() > 22 && delay.getdelay() < 28) { UIText debug = new UIText("Go to the Desert air feild", new Point(280, 200), (float)1.5); debug.Draw(); } else if (delay.getdelay() == 28) { if (!makeoneblip) { if (loction == null) { loction = World.CreateBlip(new Vector3(1264, 3141, 40)); loction.Color = BlipColor.Green; makeoneblip = true; } } } } else if (delay.getdelay() == 29) { if (Game.Player.Character.IsInRangeOf(new Vector3(1264, 3141, 40), 220)) { startscene = false; ExperimentScene.CreateDeloreonintruck(new Vector3(1294, 3141, 40)); } delay.Stop(); } } else if (character == PedHash.Franklin) { if (delay.getdelay() == 0) { delay.Start(); } else if (delay.getdelay() < 3) { UIText debug = new UIText("Please switch to Michael to start the cutscene", new Point(400, 300), (float)0.6); debug.Draw(); } else if (delay.getdelay() >= 3) { startscene = false; delay.Stop(); } } else if (character == PedHash.Trevor) { if (delay.getdelay() == 0) { delay.Start(); } else if (delay.getdelay() < 3) { UIText debug = new UIText("Please switch to Michael to start the cutscene", new Point(400, 300), (float)0.6); debug.Draw(); } else if (delay.getdelay() >= 3) { startscene = false; delay.Stop(); } } delay.Delay_changer(); } }
void Ontick(object sender, EventArgs e) { // prisoner groupe 2124571506 // garde groupe -183807561 // police groupe -1533126372 // SOLARITe 1651,726 : 2568,254 : 51,51672 :=> 348,7881 // 1 1858,746 : 2609,113 : 45,29342 // 2 1831,064 : 2607,884 : 45,20006 // 3 1754,864 : 2605,129 : 45,18484 if (Function.Call<bool>(Hash.IS_PLAYER_BEING_ARRESTED, Game.Player, true)) { hours = 20; intial1(); } #region escape if (escape) { roit.Remove(); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); if (Game.Player.Character.IsInVehicle()) { if (Game.Player.Character.CurrentVehicle == help_veh) { bail.Remove(); if (Game.Player.WantedLevel == 0) { GTA.UI.ShowSubtitle("you have escape", 1000); escape = false; escape_Ped.MarkAsNoLongerNeeded(); help_veh.MarkAsNoLongerNeeded(); arrested = false; } else GTA.UI.ShowSubtitle("escape the police", 10); } else { GTA.UI.ShowSubtitle("get to the ~b~ MAVERICK", 10); bail.Remove(); bail = World.CreateBlip(help_veh.Position); bail.Color = BlipColor.Blue; bail.ShowRoute = true; } } else { GTA.UI.ShowSubtitle("get to the ~b~ MAVERICK", 10); bail.Remove(); bail = World.CreateBlip(help_veh.Position); bail.Color = BlipColor.Blue; bail.ShowRoute = true; } if (Game.Player.IsDead) { escape = false; arrested = false; bail.Remove(); help_veh.MarkAsNoLongerNeeded(); } } #endregion //================================================================================================================================================= if (arrested) { Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); } if (inprison) { Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); if (Game.Player.Character.Position.DistanceTo(new Vector3(1752.894f, 2592.242f, 45.56502f)) < 1f) { arrested = true; escape = false; Function.Call(Hash.ENABLE_ALL_CONTROL_ACTIONS, 1); Game.FadeScreenOut(2500); Game.Player.Character.Position = new Vector3(1617.643f, 2523.981f, 45.56489f); clothes_changer(); Game.Player.CanControlCharacter = true; Function.Call(Hash.SET_ENABLE_HANDCUFFS, Game.Player.Character, false); Function.Call(Hash.SET_ENABLE_BOUND_ANKLES, Game.Player.Character, false); Game.FadeScreenIn(2500); int group = 2124571506; int player_group = Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, Game.Player.Character); Function.Call(Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, (int)Relationship.Pedestrians, group, player_group); Function.Call(Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, (int)Relationship.Pedestrians, player_group, group); Function.Call(Hash.SET_RELATIONSHIP_BETWEEN_GROUPS, 1, group, player_group); bail = World.CreateBlip(new Vector3(1691.709f, 2565.036f, 45.56487f)); bail.Color = BlipColor.White; Function.Call(Hash.SET_CLOCK_TIME, 13, 00, 0); roit = World.CreateBlip(escape_Ped.Position); roit.Sprite = BlipSprite.DollarSign; _headsup = new UIText("Time: ~b~" + hours + ":" + minit, new Point(2, 520), 0.7f, Color.WhiteSmoke, GTA.Font.HouseScript, false); _headsupRectangle = new UIRectangle(new Point(0, 520), new Size(215, 65), Color.FromArgb(100, 0, 0, 0)); inprison = false; } if (Game.Player.Character.Position.DistanceTo(new Vector3(1754.864f, 2605.129f, 45.18484f)) < 5f) { Game.Player.Character.Task.GoTo(new Vector3(1752.894f, 2592.242f, 45.56502f)); } } if (testt) { Function.Call(Hash.DISABLE_ALL_CONTROL_ACTIONS, 1); if (open1) { int t = Function.Call<int>(Hash.GET_HASH_KEY, "prop_gate_prison_01"); Function.Call(Hash._0x9B12F9A24FABEDB0, t, 1845.0f, 2605.0f, 45.0f, 0, 0.0f, 50.0f, 0f); } else { int t = Function.Call<int>(Hash.GET_HASH_KEY, "prop_gate_prison_01"); Function.Call(Hash._0x9B12F9A24FABEDB0, t, 1845.0f, 2605.0f, 45.0f, 1, 0.0f, 50.0f, 0f); } if (open2) { int t = Function.Call<int>(Hash.GET_HASH_KEY, "prop_gate_prison_01"); Function.Call(Hash._0x9B12F9A24FABEDB0, t, 1819.27f, 2608.53f, 44.61f, 0, 0.0f, 50.0f, 0f); } else { int t = Function.Call<int>(Hash.GET_HASH_KEY, "prop_gate_prison_01"); Function.Call(Hash._0x9B12F9A24FABEDB0, t, 1819.27f, 2608.53f, 44.61f, 1, 0.0f, 50.0f, 0f); } if (Game.Player.Character.Position.DistanceTo(new Vector3(1855.855f, 2606.756f, 45.9304f)) < 4f) { open1 = true; open2 = false; } if (Game.Player.Character.Position.DistanceTo(new Vector3(1831.152f, 2606.738f, 45.83254f)) < 3f && open1) { open1 = false; open2 = true; Game.Player.WantedLevel = 0; Function.Call(Hash.SET_MAX_WANTED_LEVEL, 0); } if (Game.Player.Character.Position.DistanceTo(new Vector3(1754.018f, 2604.271f, 45.82404f)) < 4f && open2) { open1 = false; open2 = false; testt = false; Game.Player.WantedLevel = 0; Function.Call(Hash.SET_MAX_WANTED_LEVEL, 0); inprison = true; } Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); } if (arrested) { if (Game.Player.Character.IsDead) Function.Call(Hash.SET_MAX_WANTED_LEVEL, 5); Function.Call(Hash.SET_MAX_WANTED_LEVEL, 0); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); Function.Call(Hash.STOP_ALARM, "PRISON_ALARMS", 0); Function.Call(Hash.CLEAR_AMBIENT_ZONE_STATE, "AZ_COUNTRYSIDE_PRISON_01_ANNOUNCER_GENERAL", 0); Function.Call(Hash.CLEAR_AMBIENT_ZONE_STATE, "AZ_COUNTRYSIDE_PRISON_01_ANNOUNCER_WARNING", 0); int hh = Function.Call<int>(Hash.GET_CLOCK_HOURS); int mm = Function.Call<int>(Hash.GET_CLOCK_MINUTES); if (hh == 14 && mm == 0) { Function.Call(Hash.SET_CLOCK_TIME, 13, 00, 0); } if (mm == 0 && !hhh ) { minit = 00; hours -= 1; hhh = true; } else if (mm>0) { minit = 60 - mm; hhh = false; } test = World.GetNearbyPeds(Game.Player.Character,150f); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); for (int i = 0; i < test.Length; i++) { Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); if (Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, test[i]) == 2124571506 || Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, test[i]) == -86095805) { bool trouve = false; for (int m = 0; m < prisoner.Count; m++) if (prisoner[m] == test[i]) { trouve = true; break; } if (!trouve) prisoner.Add(test[i]); } else if (Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, test[i]) == -183807561) { bool trouve = false; for (int m = 0; m < garde.Count; m++) if (garde[m] == test[i]) { trouve = true; break; } if (!trouve) garde.Add(test[i]); } Ped[] test2 = World.GetNearbyPeds(test[i], 150f); for (int j = 0 ;j<test2.Length;j++) { Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); if (Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, test2[j]) == 2124571506 || Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, test2[j]) == -86095805) { bool trouve = false; for (int m = 0; m < prisoner.Count; m++) if (prisoner[m] == test2[j]) { trouve = true; break; } if (!trouve) prisoner.Add(test2[j]); } else if (Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, test2[j]) == -183807561) { bool trouve = false; for (int m = 0; m < garde.Count; m++) if (garde[m] == test2[j]) { trouve = true; break; } if (!trouve) garde.Add(test2[j]); } } } //=================================================================================================== Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); _headsup = new UIText("Time: ~b~" + hours + ":" + minit, new Point(2, 520), 0.7f, Color.WhiteSmoke, GTA.Font.ChaletComprimeCologne, false); _headsupRectangle = new UIRectangle(new Point(0, 520), new Size(215, 65), Color.FromArgb(100, 0, 0, 0)); _headsup.Draw(); _headsupRectangle.Draw(); if (Game.Player.Character.Position.DistanceTo(new Vector3(1691.709f, 2565.036f, 45.56487f)) < 2f) { GTA.UI.Notify("press [E] to bail : ~g~ " + 5000000 + "~w~$"); } else if (Game.Player.Character.Position.DistanceTo(new Vector3(1625.474f, 2491.485f, 45.62026f)) < 4f) { GTA.UI.Notify("press [E] to escape for : ~g~ " + 5000000 + "~w~$"); GTA.UI.Notify("press [Y] to make roit for : ~g~ " + 5000000 + "~w~$"); } if( hours == 0 && minit == 0) { bail.Remove(); Game.Player.Character.Position = new Vector3(1849.555f, 2586.085f, 45.67202f); Game.Player.Character.Heading = 258.4564f; Function.Call(Hash.SET_MAX_WANTED_LEVEL, 5); Function.Call(Hash.PAUSE_CLOCK, false); arrested = false; _headsup = null; _headsupRectangle = null; } } }
public void tick(int X, int Y, int index) { int tick = DateTime.Now.Second; Application.DoEvents(); if (Directory.Exists(image)) { #region future //month display img = displaymonth((Deloreanlist[index].fmonth1 * 10) + Deloreanlist[index].fmonth2, time.Future); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X, loc.Y + Y), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].fday1, time.Future); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + X + 90, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fday2, time.Future); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + X + 110, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].fy1, time.Future); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + X + 140, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy2, time.Future); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + X + 160, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy3, time.Future); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + X + 180, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy4, time.Future); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + X + 200, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #region ampm int h1 = 1, h2 = 2; if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 0) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 1) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 2) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 3) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 4) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 5) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 6) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 7) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 8) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 9) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 10) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 11) { h1 = 1; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 12) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 13) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 14) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 15) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 16) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 17) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 18) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 19) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 20) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 21) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 22) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 23) { h1 = 1; h2 = 1; } #endregion Application.DoEvents(); //hour display img = displaymunber(h1, time.Future); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + X + 250, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Future); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + X + 270, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } UIResText Timedisplayf = new UIResText(Deloreanlist[index].timedisplayfuture(), new Point(1100, 570), (float)0.6, Color.Red); Timedisplayf.DropShadow = true; Timedisplayf.Draw(); //ampm img = "\\red " + Deloreanlist[index].fampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 220, loc.Y + Y + 2), new Size(20, 28)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(loc.X + X, loc.Y + Y), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { Application.DoEvents(); if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { Application.DoEvents(); if (ticktock) { img = "\\red colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 10), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\red colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 10), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display img = displaymunber(Deloreanlist[index].fm1, time.Future); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + X + 300, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fm2, time.Future); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + X + 320, loc.Y + Y), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion #region Present //month display img = displaymonth((Deloreanlist[index].presmonth1 * 10) + Deloreanlist[index].presmonth2, time.Present); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X, loc.Y + Y + 30), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].presday1, time.Present); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + X + 90, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presday2, time.Present); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + X + 110, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].presy1, time.Present); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + X + 140, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy2, time.Present); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + X + 160, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy3, time.Present); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + X + 180, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy4, time.Present); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + X + 200, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #region ampm Deloreanlist[index].presampm = "am"; int hour = World.CurrentDayTime.Hours; if (hour == 0) { h1 = 1; h2 = 2; } else if (hour == 1) { h1 = 0; h2 = 1; } else if (hour == 2) { h1 = 0; h2 = 2; } else if (hour == 3) { h1 = 0; h2 = 3; } else if (hour == 4) { h1 = 0; h2 = 4; } else if (hour == 5) { h1 = 0; h2 = 5; } else if (hour == 6) { h1 = 0; h2 = 6; } else if (hour == 7) { h1 = 0; h2 = 7; } else if (hour == 8) { h1 = 0; h2 = 8; } else if (hour == 9) { h1 = 0; h2 = 9; } else if (hour == 10) { h1 = 1; h2 = 0; } else if (hour == 11) { h1 = 1; h2 = 1; } else if (hour == 12) { h1 = 1; h2 = 2; } else if (hour == 13) { h1 = 0; h2 = 1; } else if (hour == 14) { h1 = 0; h2 = 2; } else if (hour == 15) { h1 = 0; h2 = 3; } else if (hour == 16) { h1 = 0; h2 = 4; } else if (hour == 17) { h1 = 0; h2 = 5; } else if (hour == 18) { h1 = 0; h2 = 6; } else if (hour == 19) { h1 = 0; h2 = 7; } else if (hour == 20) { h1 = 0; h2 = 8; } else if (hour == 21) { h1 = 0; h2 = 9; } else if (hour == 22) { h1 = 1; h2 = 0; } else if (hour == 23) { h1 = 1; h2 = 1; } Application.DoEvents(); if (hour > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } //ampm img = "\\green " + Deloreanlist[index].fampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 220, loc.Y + Y + 32), new Size(20, 28)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(loc.X + X, loc.Y + Y), (float)0.6); debug2.Draw(); } #endregion //hour display img = displaymunber(h1, time.Present); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + X + 250, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Present); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + X + 270, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\green colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 40), new Size(10, 14)); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, 0, true); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\green colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 40), new Size(10, 14)); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, -1, true); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display int presmin = World.CurrentDayTime.Minutes; if (presmin < 10) { Deloreanlist[index].presm1 = 0; Deloreanlist[index].presm2 = presmin; } else { if (presmin < 20) { Deloreanlist[index].presm1 = 1; Deloreanlist[index].presm2 = presmin - 10; } else if (presmin < 30) { Deloreanlist[index].presm1 = 2; Deloreanlist[index].presm2 = presmin - 20; } else if (presmin < 40) { Deloreanlist[index].presm1 = 3; Deloreanlist[index].presm2 = presmin - 30; } else if (presmin < 50) { Deloreanlist[index].presm1 = 4; Deloreanlist[index].presm2 = presmin - 40; } else if (presmin < 60) { Deloreanlist[index].presm1 = 5; Deloreanlist[index].presm2 = presmin - 50; } } //minute display img = displaymunber(Deloreanlist[index].presm1, time.Present); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + X + 300, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presm2, time.Present); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + X + 320, loc.Y + Y + 30), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion #region Past //month display img = displaymonth((Deloreanlist[index].pastmonth1 * 10) + Deloreanlist[index].pastmonth2, time.Past); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X, loc.Y + Y + 60), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].pastday1, time.Past); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + X + 90, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pastday2, time.Past); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + X + 110, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].pasty1, time.Past); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + X + 140, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty2, time.Past); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + X + 160, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty3, time.Past); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + X + 180, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty4, time.Past); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + X + 200, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #region ampm h1 = 1; h2 = 2; if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 0) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 1) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 2) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 3) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 4) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 5) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 6) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 7) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 8) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 9) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 10) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 11) { h1 = 1; h2 = 1; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 12) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 13) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 14) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 15) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 16) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 17) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 18) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 19) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 20) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 21) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 22) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].pasth1 * 10) + Deloreanlist[index].pasth2) == 23) { h1 = 1; h2 = 1; } #endregion //hour display img = displaymunber(h1, time.Past); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + X + 250, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Past); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + X + 270, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } //ampm img = "\\amber " + Deloreanlist[index].pastampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 220, loc.Y + Y + 62), new Size(20, 28)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(loc.X + X, loc.Y + Y + 50), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\amber colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 70), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\amber colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + X + 287, loc.Y + Y + 70), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display img = displaymunber(Deloreanlist[index].pastm1, time.Past); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + X + 300, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pastm2, time.Past); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + X + 320, loc.Y + Y + 60), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion } else { UIText debug2 = new UIText("images folder not present. Please place images folder in the scripts folder" + image, new Point(400, 100), (float)0.6); debug2.Draw(); } }
public void tick(int index) { int tick = DateTime.Now.Second; if (Directory.Exists(image)) { #region future //month display img = displaymonth((Deloreanlist[index].fmonth1 * 10) + Deloreanlist[index].fmonth2, time.Future); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 27, loc.Y + 65), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].fday1, time.Future); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + 140, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fday2, time.Future); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + 166, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].fy1, time.Future); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + 220, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy2, time.Future); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + 249, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy3, time.Future); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + 278, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fy4, time.Future); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + 307, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } int h1 = 1, h2 = 2; if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 0) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 1) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 2) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 3) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 4) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 5) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 6) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 7) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 8) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 9) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 10) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 11) { h1 = 1; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 12) { h1 = 1; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 13) { h1 = 0; h2 = 1; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 14) { h1 = 0; h2 = 2; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 15) { h1 = 0; h2 = 3; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 16) { h1 = 0; h2 = 4; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 17) { h1 = 0; h2 = 5; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 18) { h1 = 0; h2 = 6; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 19) { h1 = 0; h2 = 7; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 20) { h1 = 0; h2 = 8; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 21) { h1 = 0; h2 = 9; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 22) { h1 = 1; h2 = 0; } else if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) == 23) { h1 = 1; h2 = 1; } //hour display img = displaymunber(h1, time.Future); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + 366, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Future); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + 388, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } if (((Deloreanlist[index].fh1 * 10) + Deloreanlist[index].fh2) > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } //ampm img = "\\red " + Deloreanlist[index].fampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 340, loc.Y + 36), new Size(20, 28)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\red colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 65), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\red colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 65), new Size(10, 14)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display img = displaymunber(Deloreanlist[index].fm1, time.Future); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + 447, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].fm2, time.Future); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + 474, loc.Y + 65), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion #region present img = displaymonth((Deloreanlist[index].presmonth1 * 10) + Deloreanlist[index].presmonth2, time.Present); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 27, loc.Y + 157), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].presday1, time.Present); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + 140, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presday2, time.Present); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + 166, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].presy1, time.Present); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + 220, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy2, time.Present); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + 249, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy3, time.Present); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + 278, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presy4, time.Present); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + 307, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } Deloreanlist[index].presampm = "am"; int hour = World.CurrentDayTime.Hours; if (hour == 0) { h1 = 1; h2 = 2; } else if (hour == 1) { h1 = 0; h2 = 1; } else if (hour == 2) { h1 = 0; h2 = 2; } else if (hour == 3) { h1 = 0; h2 = 3; } else if (hour == 4) { h1 = 0; h2 = 4; } else if (hour == 5) { h1 = 0; h2 = 5; } else if (hour == 6) { h1 = 0; h2 = 6; } else if (hour == 7) { h1 = 0; h2 = 7; } else if (hour == 8) { h1 = 0; h2 = 8; } else if (hour == 9) { h1 = 0; h2 = 9; } else if (hour == 10) { h1 = 1; h2 = 0; } else if (hour == 11) { h1 = 1; h2 = 1; } else if (hour == 12) { h1 = 1; h2 = 2; } else if (hour == 13) { h1 = 0; h2 = 1; } else if (hour == 14) { h1 = 0; h2 = 2; } else if (hour == 15) { h1 = 0; h2 = 3; } else if (hour == 16) { h1 = 0; h2 = 4; } else if (hour == 17) { h1 = 0; h2 = 5; } else if (hour == 18) { h1 = 0; h2 = 6; } else if (hour == 19) { h1 = 0; h2 = 7; } else if (hour == 20) { h1 = 0; h2 = 8; } else if (hour == 21) { h1 = 0; h2 = 9; } else if (hour == 22) { h1 = 1; h2 = 0; } else if (hour == 23) { h1 = 1; h2 = 1; } if (hour > 12) { Deloreanlist[index].fampm = "pm"; } else { Deloreanlist[index].fampm = "am"; } //ampm img = "\\green " + Deloreanlist[index].presampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 340, loc.Y + 157), new Size(20, 32)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //hour display img = displaymunber(h1, time.Present); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + 366, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(h2, time.Present); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + 388, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\green colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 157), new Size(10, 14)); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, 0, true); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\green colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 157), new Size(10, 14)); Deloreanlist[index].Deloreon.SetMod(VehicleMod.Grille, -1, true); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display int presmin = World.CurrentDayTime.Minutes; if (presmin < 10) { Deloreanlist[index].presm1 = 0; Deloreanlist[index].presm2 = presmin; } else { if (presmin < 20) { Deloreanlist[index].presm1 = 1; Deloreanlist[index].presm2 = presmin - 10; } else if (presmin < 30) { Deloreanlist[index].presm1 = 2; Deloreanlist[index].presm2 = presmin - 20; } else if (presmin < 40) { Deloreanlist[index].presm1 = 3; Deloreanlist[index].presm2 = presmin - 30; } else if (presmin < 50) { Deloreanlist[index].presm1 = 4; Deloreanlist[index].presm2 = presmin - 40; } else if (presmin < 60) { Deloreanlist[index].presm1 = 5; Deloreanlist[index].presm2 = presmin - 50; } } img = displaymunber(Deloreanlist[index].presm1, time.Present); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + 447, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].presm2, time.Present); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + 474, loc.Y + 157), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion #region past //month display img = displaymonth((Deloreanlist[index].pastmonth1 * 10) + Deloreanlist[index].pastmonth2, time.Past); if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 27, loc.Y + 243), new Size(88, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //Day display img = displaymunber(Deloreanlist[index].pastday1, time.Past); if (File.Exists(image + "\\day\\1" + img)) { Sprite.DrawTexture(image + "\\day\\1" + img, new Point(loc.X + 140, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pastday2, time.Past); if (File.Exists(image + "\\day\\2" + img)) { Sprite.DrawTexture(image + "\\day\\2" + img, new Point(loc.X + 166, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //yeardisplay img = displaymunber(Deloreanlist[index].pasty1, time.Past); if (File.Exists(image + "\\year\\1" + img)) { Sprite.DrawTexture(image + "\\year\\1" + img, new Point(loc.X + 220, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty2, time.Past); if (File.Exists(image + "\\year\\2" + img)) { Sprite.DrawTexture(image + "\\year\\2" + img, new Point(loc.X + 249, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty3, time.Past); if (File.Exists(image + "\\year\\3" + img)) { Sprite.DrawTexture(image + "\\year\\3" + img, new Point(loc.X + 278, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasty4, time.Past); if (File.Exists(image + "\\year\\4" + img)) { Sprite.DrawTexture(image + "\\year\\4" + img, new Point(loc.X + 307, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //ampm img = "\\amber " + Deloreanlist[index].pastampm + ".jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 340, loc.Y + 243), new Size(20, 32)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //hour display img = displaymunber(Deloreanlist[index].pasth1, time.Past); if (File.Exists(image + "\\hour\\1" + img)) { Sprite.DrawTexture(image + "\\hour\\1" + img, new Point(loc.X + 366, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pasth2, time.Past); if (File.Exists(image + "\\hour\\2" + img)) { Sprite.DrawTexture(image + "\\hour\\2" + img, new Point(loc.X + 388, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } //tick if (tick != temptick) { if (ticktock) { ticktock = false; } else { ticktock = true; } temptick = tick; } else { if (ticktock) { img = "\\amber colon on.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 243), new Size(10, 17)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } else { img = "\\amber colon off.jpg"; if (File.Exists(image + img)) { Sprite.DrawTexture(image + img, new Point(loc.X + 427, loc.Y + 243), new Size(10, 17)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } } } //minute display img = displaymunber(Deloreanlist[index].pastm1, time.Past); if (File.Exists(image + "\\min\\1" + img)) { Sprite.DrawTexture(image + "\\min\\1" + img, new Point(loc.X + 447, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } img = displaymunber(Deloreanlist[index].pastm2, time.Past); if (File.Exists(image + "\\min\\2" + img)) { Sprite.DrawTexture(image + "\\min\\2" + img, new Point(loc.X + 474, loc.Y + 243), new Size(20, 29)); } else { UIText debug2 = new UIText("File is not present: " + img, new Point(400, 100), (float)0.6); debug2.Draw(); } #endregion } else { if (!Deloreanlist[index].refilltimecurcuits) { UIResText Mrfusion = new UIResText("Empty", new Point(1600, 900), (float)0.6, Color.Orange); Mrfusion.Draw(); } UIResText Timedisplayf = new UIResText(Deloreanlist[index].timedisplayfuture(), new Point(1450, 940), (float)0.6, Color.Red); UIResText Timedisplaypres = new UIResText(Deloreanlist[index].timedisplaypresent(), new Point(1450, 980), (float)0.6, Color.Green); UIResText Timedisplaypast = new UIResText(Deloreanlist[index].timedisplaypast(), new Point(1450, 1020), (float)0.6, Color.Yellow); Timedisplayf.DropShadow = true; Timedisplaypres.DropShadow = true; Timedisplaypast.DropShadow = true; Timedisplayf.Draw(); Timedisplaypres.Draw(); Timedisplaypast.Draw(); } }
void OnTick(object sender, EventArgs e) { if (controllermode) { if (GTA.Game.IsControlJustReleased(2, GTA.Control.ScriptPadUp)) { View.HandleChangeSelection(false);//TODO, doesnt work } if (GTA.Game.IsControlJustReleased(2, GTA.Control.ScriptPadDown)) { View.HandleChangeSelection(true);//TODO, doesnt work } if (GTA.Game.IsControlJustReleased(2, GTA.Control.ScriptPadLeft)) { View.HandleChangeItem(false); //left } if (GTA.Game.IsControlJustReleased(2, GTA.Control.ScriptPadRight)) { View.HandleChangeItem(true); //right } if (GTA.Game.IsControlJustReleased(2, GTA.Control.Attack)) { View.HandleActivate(); //l2 } if (GTA.Game.IsControlJustReleased(2, GTA.Control.Aim)) { View.HandleBack(); //r2 } if (GTA.Game.IsControlJustReleased(2, GTA.Control.Attack) && GTA.Game.IsControlJustReleased(2, GTA.Control.Aim)) { OpenTrainerMenu(); //l2+l2 } } foreach (Ped pd in pedsrainingmoney) { RequestControl(pd); rainmoney(pd.Position); //right in middle } foreach (Ped pd in pedsrainingminusmoney) { RequestControl(pd); rainminusmoney(pd.Position); //right in middle } if (never_wanted) { Game.Player.WantedLevel = 0; } if (showfps) { UIText uIText = new UIText((Game.FPS.ToString()), new Point(10, 10), 0.4f, Color.Red); uIText.Draw(); } Game.Player.Character.Weapons.Current.InfiniteAmmo = unlimited_ammo; Game.Player.Character.Weapons.Current.InfiniteAmmoClip = unlimited_ammo; Game.Player.Character.CanBeDraggedOutOfVehicle = iliekitinside; Game.Player.Character.CanBeKnockedOffBike = iliekitinside; lazergun(lasersight); foreach (Ped pd in gesturablepeds) { RequestControl(pd); pd.CanPlayGestures = true; } foreach (Ped pd in godpeds) { RequestControl(pd); pd.IsInvincible = true; } Function.Call(Hash.DISPLAY_HUD, !huddisabled); Function.Call(Hash.DISPLAY_RADAR, !huddisabled); Function.Call(Hash._0x2F7CEB6520288061, mobileradio); Function.Call(Hash.SET_AUDIO_FLAG, "AllowRadioDuringSwitch", mobileradio); Function.Call(Hash.SET_MOBILE_PHONE_RADIO_STATE, mobileradio); Function.Call(Hash.SET_AUDIO_FLAG, "MobileRadioInGame", mobileradio); if (sonicmode) { Function.Call(Hash._SET_SWIM_SPEED_MULTIPLIER, Game.Player, 1.49f); Function.Call(Hash._SET_MOVE_SPEED_MULTIPLIER, Game.Player, 1.49f); } else { Function.Call(Hash._SET_SWIM_SPEED_MULTIPLIER, Game.Player, 1f); Function.Call(Hash._SET_MOVE_SPEED_MULTIPLIER, Game.Player, 1f); } Blackout(isonblackout); Stoptime(timestopped); Function.Call(Hash.SET_POLICE_IGNORE_PLAYER, Game.Player, isforeveralone); if (six_star) { Function.Call(Hash.SET_MAX_WANTED_LEVEL, 6); } else { Function.Call(Hash.SET_MAX_WANTED_LEVEL, 5); } Function.Call(Hash.SET_POLICE_RADAR_BLIPS, !radarblips); try { if (shootexp) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.Character.IsShooting) { RequestControl(Game.Player.GetTargetedEntity()); World.AddExplosion(Game.Player.GetTargetedEntity().Position, ExplosionType.BigExplosion1, 1.0f, 1.0f); } } if (tpgun) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.Character.IsShooting) { RequestControl(Game.Player.GetTargetedEntity()); if (Game.Player.Character.IsInVehicle()) { Game.Player.Character.CurrentVehicle.Position = Game.Player.GetTargetedEntity().Position; } else { Game.Player.Character.Position = Game.Player.GetTargetedEntity().Position; } } } if (shootexpbyme) { shootexp = false; shootexpbyme = false; if (Game.Player.GetTargetedEntity().Exists() && Game.Player.Character.IsShooting) { RequestControl(Game.Player.GetTargetedEntity()); World.AddOwnedExplosion(Game.Player.Character, Game.Player.GetTargetedEntity().Position, ExplosionType.BigExplosion1, 1.0f, 1.0f); } } if (expbymarkedped) { shootexp = false; shootexpbyme = false; if (Game.Player.GetTargetedEntity().Exists() && framedped.Exists() && Game.Player.Character.IsShooting) { RequestControl(Game.Player.GetTargetedEntity()); World.AddOwnedExplosion(framedped, Game.Player.GetTargetedEntity().Position, ExplosionType.BigExplosion1, 1.0f, 1.0f); } } if (moneygun) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.Character.IsShooting) { RequestControl(Game.Player.GetTargetedEntity()); Game.Player.GetTargetedEntity().Health = Game.Player.GetTargetedEntity().MaxHealth; rainmoney(Game.Player.GetTargetedEntity().Position); } } if (_100shotgun) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.Character.IsShooting) { RequestControl(Game.Player.GetTargetedEntity()); for (int a = 0; a <= 100; a++) { World.ShootBullet((Game.Player.GetTargetedEntity().Position + new Vector3(0f,0f,1f)), Game.Player.GetTargetedEntity().Position, Game.Player.Character, new Model(WeaponHash.Knife), 999); } } //World.ShootBullet } if (vehiclegun && Game.Player.Character.IsShooting) { Game.Player.Character.FreezePosition = true; //http://stackoverflow.com/questions/3132126/how-do-i-select-a-random-value-from-an-enumeration Array values = Enum.GetValues(typeof(VehicleHash)); Random random = new Random(); VehicleHash randomVeh = (VehicleHash)values.GetValue(random.Next(values.Length)); //Zentorno only cuz randoms usually crash game Vehicle createdveh = World.CreateVehicle(VehicleHash.Zentorno, Game.Player.Character.Position, Game.Player.Character.Heading); createdveh.Speed = 1000; } else if (vehiclegun) { Game.Player.Character.FreezePosition = false; } if (markgun) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsVehicle) { RequestControl(Game.Player.GetTargetedEntity()); if (curmark == 1) { if (markedvehicle1 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle1, false); } markedvehicle1 = (Vehicle)Game.Player.GetTargetedEntity(); markedvehicle = markedvehicle1; } else if (curmark == 2) { if (markedvehicle != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle2, false); } markedvehicle2 = (Vehicle)Game.Player.GetTargetedEntity(); markedvehicle = markedvehicle2; } else if (curmark == 3) { if (markedvehicle3 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle3, false); } markedvehicle3 = (Vehicle)Game.Player.GetTargetedEntity(); markedvehicle = markedvehicle3; } markgun = false; View.RemoveMenu(Markmenu); OpenVehicleMarkMenu(); } } if (objmarkgun) { if (Game.Player.GetTargetedEntity().Exists()) { RequestControl(Game.Player.GetTargetedEntity()); string txt = File.ReadAllText(mdlfilename); if (txt != "") { txt += Environment.NewLine; } string name = Game.GetUserInput(21) + " "; int hashcode = Game.Player.GetTargetedEntity().GetHashCode(); txt += name + Environment.NewLine; txt += hashcode; File.WriteAllText(mdlfilename, txt); mdllist.Add(name, hashcode); objmarkgun = false; } } if (pedmarkgun) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsPed) { RequestControl(Game.Player.GetTargetedEntity()); string txt = File.ReadAllText(pedfilename); if (txt != "") { txt += Environment.NewLine; } string name = Game.GetUserInput(21) + " "; int hashcode = Game.Player.GetTargetedEntity().GetHashCode(); txt += name + Environment.NewLine; txt += hashcode; File.WriteAllText(mdlfilename, txt); pedlist.Add(name, hashcode); objmarkgun = false; } } if (markgunped) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsPed) { RequestControl(Game.Player.GetTargetedEntity()); if (curmarkped == 1) { if (markedped1 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped1, false); } markedped1 = (Ped)Game.Player.GetTargetedEntity(); markedped = markedped1; } else if (curmarkped == 2) { if (markedped2 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped2, false); } markedped2 = (Ped)Game.Player.GetTargetedEntity(); markedped = markedped2; } else if (curmarkped == 3) { if (markedped3 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped3, false); } markedped3 = (Ped)Game.Player.GetTargetedEntity(); markedped = markedped3; } markgunped = false; View.RemoveMenu(Markmenu); OpenPedMarkMenu(); } } if (opendoorgun && Game.Player.Character.IsShooting) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsVehicle) { Vehicle targetveh = (Vehicle)Game.Player.GetTargetedEntity(); for (int b = 0; b <= 7; b++) { Function.Call(Hash.SET_VEHICLE_DOOR_OPEN, targetveh, b, true, true); //check this } } } if (healgun) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsPed) { RequestControl(Game.Player.GetTargetedEntity()); Ped targetped = (Ped)Game.Player.GetTargetedEntity(); targetped.Health = targetped.MaxHealth; targetped.Armor = targetped.MaxHealth; } else if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsVehicle) { RequestControl(Game.Player.GetTargetedEntity()); Vehicle targetveh = (Vehicle)Game.Player.GetTargetedEntity(); targetveh.Repair(); } } //Game.Player.Character.IsInvincible = tg.Value; if (deletegun && Game.Player.Character.IsShooting) { RequestControl(Game.Player.GetTargetedEntity()); if (Game.Player.GetTargetedEntity().Exists()) Game.Player.GetTargetedEntity().Delete(); } if (onehitkillgun && Game.Player.Character.IsShooting) { RequestControl(Game.Player.GetTargetedEntity()); if (Game.Player.GetTargetedEntity().Exists()) Game.Player.GetTargetedEntity().Health = 0; } // player special ability if (featurePlayerUnlimitedAbility) { Function.Call(Hash._RECHARGE_SPECIAL_ABILITY, Game.Player, 1); } // player no noise if (featurePlayerNoNoiseUpdated) { if (!featurePlayerNoNoise) Function.Call(Hash.SET_PLAYER_NOISE_MULTIPLIER, Game.Player, 1.0); featurePlayerNoNoiseUpdated = false; } if (featurePlayerNoNoise) { Function.Call(Hash.SET_PLAYER_NOISE_MULTIPLIER, Game.Player, 0.0); } if (featurePlayerSuperJump) { Function.Call(Hash.SET_SUPER_JUMP_THIS_FRAME, Game.Player); } if (featureWeaponFireAmmo) { Function.Call(Hash.SET_FIRE_AMMO_THIS_FRAME, Game.Player); } if (featureWeaponExplosiveAmmo) { Function.Call(Hash.SET_EXPLOSIVE_AMMO_THIS_FRAME, Game.Player); } if (featureWeaponExplosiveMelee) { Function.Call(Hash.SET_EXPLOSIVE_MELEE_THIS_FRAME, Game.Player); } } catch { } #region noclip Vehicle[] nearbyVehicles; int i; Ped character = Game.Player.Character; if (this.noclip) { int handle = character.Handle; int iint32 = this.speed - 1; UIText uIText = new UIText(string.Concat("Speed: ", iint32.ToString()), new Point(500, 50), 0.4f, Color.White); uIText.Draw(); Vector3 offsetInWorldCoords = character.GetOffsetInWorldCoords(new Vector3(0f, (float)(this.speed + this.helpup), 0f)); Vector3 vector3 = character.GetOffsetInWorldCoords(new Vector3(0f, (float)(-this.speed - this.helpdown), 0f)); Vector3 offsetInWorldCoords1 = character.GetOffsetInWorldCoords(new Vector3((float)(-this.speed - this.helpdown), 0f, 0f)); Vector3 vector31 = character.GetOffsetInWorldCoords(new Vector3((float)(this.speed + this.helpup), 0f, 0f)); Vector3 offsetInWorldCoords2 = character.GetOffsetInWorldCoords(new Vector3(0f, 0f, (float)(this.speed + this.helpup))); Vector3 vector32 = character.GetOffsetInWorldCoords(new Vector3(0f, 0f, (float)(-this.speed - this.helpdown))); Vector3 vector33 = character.Position; if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Increase_speed_on_noclip", Keys.Add))) { this.speed = this.speed + 1; } else if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Decrease_speed_on_noclip", Keys.Subtract))) { if (this.speed > 2) { this.speed = this.speed - 1; } } if (character.IsInVehicle()) { int handle1 = character.CurrentVehicle.Handle; character.CurrentVehicle.Position = vector33; character.CurrentVehicle.FreezePosition = true; nearbyVehicles = World.GetNearbyVehicles(character, 10f); if ((nearbyVehicles == null ? false : (int)nearbyVehicles.Length > 0)) { for (i = 0; i < (int)nearbyVehicles.Length; i++) { if (Entity.Exists(nearbyVehicles[i])) { if (nearbyVehicles[i] != character.CurrentVehicle) { nearbyVehicles[i].FreezePosition = false; } } } } if ((character.CurrentVehicle.HeightAboveGround > 3f || character.CurrentVehicle.HeightAboveGround < 0f ? true : this.speed > 3)) { this.helpup = 0; this.helpdown = 0; } else { this.helpup = 3; this.helpdown = 5; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Forward_on_noclip", Keys.W))) { character.CurrentVehicle.Position = offsetInWorldCoords; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Back_on_noclip", Keys.S))) { character.CurrentVehicle.Position = vector3; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Left_on_noclip", Keys.A))) { character.CurrentVehicle.Position = offsetInWorldCoords1; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Right_on_noclip", Keys.D))) { character.CurrentVehicle.Position = vector31; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Up_on_noclip", Keys.Z))) { character.CurrentVehicle.Position = offsetInWorldCoords2; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Down_on_noclip", Keys.X))) { character.CurrentVehicle.Position = vector32; } } else { character.FreezePosition = true; nearbyVehicles = World.GetNearbyVehicles(character, 10f); this.helpup = 0; this.helpdown = 0; if ((nearbyVehicles == null ? false : (int)nearbyVehicles.Length > 0)) { for (i = 0; i < (int)nearbyVehicles.Length; i++) { if (Entity.Exists(nearbyVehicles[i])) { nearbyVehicles[i].FreezePosition = false; } } } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Forward_on_noclip", Keys.W))) { character.Position = offsetInWorldCoords; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Back_on_noclip", Keys.S))) { character.Position = vector3; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Left_on_noclip", Keys.A))) { character.Position = offsetInWorldCoords1; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Right_on_noclip", Keys.D))) { character.Position = vector31; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Up_on_noclip", Keys.Z))) { character.Position = offsetInWorldCoords2; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Down_on_noclip", Keys.X))) { character.Position = vector32; } } } #endregion }
public string show_debug() { UIText debug2 = new UIText("delay: " + delay + " " + DateTime.Now.Millisecond, new Point(400, 300), (float)0.6); debug2.Draw(); return debug2.Caption; }
public void onTick(object sender, EventArgs e) { try { if (effectcommand) { UI.ShowSubtitle("Command effect: " + command); } TTTF.OnTick(); instantDelorean.Check(sender, e); if (!preload) { if (DateTime.Now.Millisecond % 60 > 30 && DateTime.Now.Millisecond % 60 <= 60) { UI.ShowSubtitle("preload " + preloadtime); if (preloadtime == 50) { while (!preload) { Vehicle dmc12 = null; while (dmc12 == null) { try { dmc12 = World.CreateVehicle(new Model("dmc12"), new Vector3(0, 0, 0)); break; } catch { } } dmc12.Delete(); Vehicle dmc13 = null; while (dmc13 == null) { try { dmc13 = World.CreateVehicle(new Model("dmc13"), new Vector3(0, 0, 0)); break; } catch { } } dmc13.Delete(); Vehicle gmcvan = null; while (gmcvan == null) { try { gmcvan = World.CreateVehicle(new Model("gmcvan"), new Vector3(0, 0, 0)); break; } catch { } } gmcvan.Delete(); Vehicle bttf3rr = null; while (bttf3rr == null) { try { bttf3rr = World.CreateVehicle(new Model("bttf3rr"), new Vector3(0, 0, 0)); break; } catch { } } bttf3rr.Delete(); Vehicle bttf3 = null; while (bttf3 == null) { try { bttf3 = World.CreateVehicle(new Model("bttf3"), new Vector3(0, 0, 0)); break; } catch { } } bttf3.Delete(); Vehicle bttf = null; while (bttf == null) { try { bttf = World.CreateVehicle(new Model("bttf"), new Vector3(0, 0, 0)); break; } catch { } } bttf.Delete(); Vehicle bttf2 = null; while (bttf2 == null) { try { bttf2 = World.CreateVehicle(new Model("bttf2"), new Vector3(0, 0, 0)); break; } catch { } } bttf2.Delete(); Vehicle bttf2f = null; while (bttf2f == null) { try { bttf2f = World.CreateVehicle(new Model("bttf2f"), new Vector3(0, 0, 0)); break; } catch { } } bttf2f.Delete(); preload = true; } } } else { if (preloadtime < 50) preloadtime++; } } if (Displayadjustment) { UIText debug2 = new UIText("Display Adjustment. Use arrow keys to move display, and enter to Apply change.", new Point(200, 100), (float)0.6); debug2.Draw(); } if (Player_time_class.presday1 == 2 && Player_time_class.presday2 == 9 && Player_time_class.presmonth1 == 0 && Player_time_class.presmonth2 == 4 && Player_time_class.presy1 == 1 && Player_time_class.presy2 == 9 && Player_time_class.presy3 == 9 && Player_time_class.presy4 == 2) { riot(); } else if (Player_time_class.presday1 == 3 && Player_time_class.presday2 == 0 && Player_time_class.presmonth1 == 0 && Player_time_class.presmonth2 == 4 && Player_time_class.presy1 == 1 && Player_time_class.presy2 == 9 && Player_time_class.presy3 == 9 && Player_time_class.presy4 == 2) { riot(); } else if (Player_time_class.presday1 == 0 && Player_time_class.presday2 == 1 && Player_time_class.presmonth1 == 0 && Player_time_class.presmonth2 == 5 && Player_time_class.presy1 == 1 && Player_time_class.presy2 == 9 && Player_time_class.presy3 == 9 && Player_time_class.presy4 == 2) { riot(); } else if (Player_time_class.presday1 == 0 && Player_time_class.presday2 == 2 && Player_time_class.presmonth1 == 0 && Player_time_class.presmonth2 == 5 && Player_time_class.presy1 == 1 && Player_time_class.presy2 == 9 && Player_time_class.presy3 == 9 && Player_time_class.presy4 == 2) { riot(); } else if (Player_time_class.presday1 == 0 && Player_time_class.presday2 == 3 && Player_time_class.presmonth1 == 0 && Player_time_class.presmonth2 == 5 && Player_time_class.presy1 == 1 && Player_time_class.presy2 == 9 && Player_time_class.presy3 == 9 && Player_time_class.presy4 == 2) { riot(); } else if (Player_time_class.presday1 == 0 && Player_time_class.presday2 == 4 && Player_time_class.presmonth1 == 0 && Player_time_class.presmonth2 == 5 && Player_time_class.presy1 == 1 && Player_time_class.presy2 == 9 && Player_time_class.presy3 == 9 && Player_time_class.presy4 == 2) { riot(); } int tick = DateTime.Now.Second; //tick if (tick != temptick) { Player_time_class.timetick(); temptick = tick; } startingscene.scene(Game.Player.Character.Model); ExperimentScene.tick(); } catch(Exception d) { if (instantDelorean.Deloreanlist.Count < 1) { try { instantDelorean.CreateDeloreon(); } catch { } } else { UI.ShowSubtitle("Error: " + d.Message); } } }
void intial() { Game.Player.WantedLevel = 0; Game.Player.Character.Weapons.RemoveAll(); Function.Call(Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, (int)Relationship.Hate, 2124571506, -183807561); Function.Call(Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, (int)Relationship.Hate, -183807561, 2124571506); Function.Call(Hash.SET_RELATIONSHIP_BETWEEN_GROUPS, (int)Relationship.Pedestrians, 2124571506, -183807561); Function.Call(Hash.SET_RELATIONSHIP_BETWEEN_GROUPS, (int)Relationship.Pedestrians, -183807561, 2124571506); escape_Ped = World.CreatePed(PedHash.Prisoner01, new Vector3(1625.474f, 2491.485f, 45.62026f)); escape_Ped.Task.StandStill(-1); escape_Ped.Heading = 320.5151f; Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, escape_Ped, true, true); Game.Player.WantedLevel = 0; Function.Call(Hash.SET_MAX_WANTED_LEVEL, 0); Game.Player.Character.Task.PlayAnimation("RANDOM@ARRESTS", "idle_2_hands_up", 2f, -1, false, 0); Script.Wait(500); Game.FadeScreenIn(2500); // while (Function.Call<bool>(Hash.IS_ENTITY_PLAYING_ANIM, Game.Player.Character, "RANDOM@ARRESTS", "idle_2_hands_up", 3)) Script.Wait(0); while (!Function.Call<bool>(Hash.IS_SCREEN_FADED_OUT)) Script.Wait(0); Game.FadeScreenIn(0); int group = 2124571506; int player_group = Function.Call<int>(Hash.GET_PED_RELATIONSHIP_GROUP_HASH, Game.Player.Character); Function.Call(Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, (int)Relationship.Pedestrians, group, player_group); Function.Call(Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, (int)Relationship.Pedestrians, player_group, group); Function.Call(Hash.SET_RELATIONSHIP_BETWEEN_GROUPS, 1, group, player_group); // Function.Call(Hash.SET_RELATIONSHIP_BETWEEN_GROUPS, 1, player_group, group); // Function.Call(Hash.CLEAR_AREA_OF_PEDS, 1637.856f, 2608.986f, 45.56487f, 1000f, true); clothes_changer(); bail = World.CreateBlip(new Vector3(1691.709f, 2565.036f, 45.56487f)); bail.Color = BlipColor.White; Function.Call(Hash.SET_CLOCK_TIME, 13, 00, 0); roit = World.CreateBlip(escape_Ped.Position); roit.Sprite = BlipSprite.DollarSign; _headsup = new UIText("Time: ~b~" + hours + ":" + minit, new Point(2, 520), 0.7f, Color.WhiteSmoke, GTA.Font.HouseScript, false); _headsupRectangle = new UIRectangle(new Point(0, 520), new Size(215, 65), Color.FromArgb(100, 0, 0, 0)); _headsup.Draw(); _headsupRectangle.Draw(); arrested = true; escape = false; Game.Player.Character.Position = new Vector3(1617.643f, 2523.981f, 45.56489f); Game.FadeScreenOut(1); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); Game.Player.Character.Heading = 264.718f; Game.FadeScreenOut(0); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "respawn_controller"); Function.Call(Hash.TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, "re_prison"); Game.FadeScreenIn(3000); }
public CustomDraw(String text, int x, int y, Color color, GTA.Font font, float size) { UIText ui = new UIText(text, new Point(checked((int)Math.Round(unchecked((double)UI.WIDTH / x))), y), size, color, font, false); ui.Draw(); }
void OnTick(object sender, EventArgs e) { if (never_wanted) { Game.Player.WantedLevel = 0; } Game.Player.Character.Weapons.Current.InfiniteAmmo = unlimited_ammo; Game.Player.Character.Weapons.Current.InfiniteAmmoClip = unlimited_ammo; Game.Player.Character.CanBeDraggedOutOfVehicle = iliekitinside; Game.Player.Character.CanBeKnockedOffBike = iliekitinside; lazergun(lasersight); Game.Player.Character.IsInvincible = isinv; Function.Call(Hash.DISPLAY_HUD, !huddisabled); Function.Call(Hash.DISPLAY_RADAR, !huddisabled); Function.Call(Hash._0x2F7CEB6520288061, mobileradio); Function.Call(Hash.SET_AUDIO_FLAG, "AllowRadioDuringSwitch", mobileradio); Function.Call(Hash.SET_MOBILE_PHONE_RADIO_STATE, mobileradio); Function.Call(Hash.SET_AUDIO_FLAG, "MobileRadioInGame", mobileradio); if (sonicmode) { Function.Call(Hash._SET_SWIM_SPEED_MULTIPLIER, Game.Player, 1.49f); Function.Call(Hash._SET_MOVE_SPEED_MULTIPLIER, Game.Player, 1.49f); } else { Function.Call(Hash._SET_SWIM_SPEED_MULTIPLIER, Game.Player, 1f); Function.Call(Hash._SET_MOVE_SPEED_MULTIPLIER, Game.Player, 1f); } Blackout(isonblackout); Stoptime(timestopped); Function.Call(Hash.SET_POLICE_IGNORE_PLAYER, Game.Player, isforeveralone); if (six_star) { Function.Call(Hash.SET_MAX_WANTED_LEVEL, 6); } else { Function.Call(Hash.SET_MAX_WANTED_LEVEL, 5); } Function.Call(Hash.SET_POLICE_RADAR_BLIPS, !radarblips); Game.Player.Character.CanPlayGestures = abletogesture; try { if (shootexp && Game.Player.Character.IsShooting) { if (Game.Player.GetTargetedEntity().Exists()) { World.AddExplosion(Game.Player.GetTargetedEntity().Position, ExplosionType.BigExplosion1, 1.0f, 1.0f); } } if (tpgun && Game.Player.Character.IsShooting) { if (Game.Player.GetTargetedEntity().Exists()) { if (Game.Player.Character.IsInVehicle()) { Game.Player.Character.CurrentVehicle.Position = Game.Player.GetTargetedEntity().Position; } else { Game.Player.Character.Position = Game.Player.GetTargetedEntity().Position; } } } if (shootexpbyme && Game.Player.Character.IsShooting) { shootexp = false; if (Game.Player.GetTargetedEntity().Exists()) { World.AddOwnedExplosion(Game.Player.Character, Game.Player.GetTargetedEntity().Position, ExplosionType.BigExplosion1, 1.0f, 1.0f); } } if (_100shotgun && Game.Player.Character.IsShooting) { if (Game.Player.GetTargetedEntity().Exists()) { for (int a = 0; a <= 100; a++) { World.ShootBullet(Game.Player.GetTargetedEntity().Position, Game.Player.GetTargetedEntity().Position, Game.Player.Character, new Model(WeaponHash.Knife), 999); } } //World.ShootBullet } if (markgun) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsVehicle) { if (curmark == 1) { if (markedvehicle1 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle1, false); } markedvehicle1 = (Vehicle)Game.Player.GetTargetedEntity(); markedvehicle = markedvehicle1; } else if (curmark == 2) { if (markedvehicle != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle2, false); } markedvehicle2 = (Vehicle)Game.Player.GetTargetedEntity(); markedvehicle = markedvehicle2; } else if (curmark == 3) { if (markedvehicle3 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedvehicle3, false); } markedvehicle3 = (Vehicle)Game.Player.GetTargetedEntity(); markedvehicle = markedvehicle3; } markgun = false; View.RemoveMenu(Markmenu); OpenVehicleMarkMenu(); } } if (markgunped) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsPed) { if (curmarkped == 1) { if (markedped1 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped1, false); } markedped1 = (Ped)Game.Player.GetTargetedEntity(); markedped = markedped1; } else if (curmarkped == 2) { if (markedped2 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped2, false); } markedped2 = (Ped)Game.Player.GetTargetedEntity(); markedped = markedped2; } else if (curmarkped == 3) { if (markedped3 != null) { Function.Call(Hash.SET_ENTITY_AS_MISSION_ENTITY, (Entity)markedped3, false); } markedped3 = (Ped)Game.Player.GetTargetedEntity(); markedped = markedped3; } markgunped = false; View.RemoveMenu(Markmenu); OpenPedMarkMenu(); } } if (opendoorgun && Game.Player.Character.IsShooting) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsVehicle) { Vehicle targetveh = (Vehicle)Game.Player.GetTargetedEntity(); for (int b = 0; b <= 7; b++) { Function.Call(Hash.SET_VEHICLE_DOOR_OPEN, targetveh, b, true, true); //check this } } } if (healgun) { if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsPed) { Ped targetped = (Ped)Game.Player.GetTargetedEntity(); targetped.Health = targetped.MaxHealth; targetped.Armor = targetped.MaxHealth; } else if (Game.Player.GetTargetedEntity().Exists() && Game.Player.GetTargetedEntity().Model.IsVehicle) { Vehicle targetveh = (Vehicle)Game.Player.GetTargetedEntity(); targetveh.Repair(); } } //Game.Player.Character.IsInvincible = tg.Value; if (deletegun && Game.Player.Character.IsShooting) { if (Game.Player.GetTargetedEntity().Exists()) Game.Player.GetTargetedEntity().Delete(); } if (onehitkillgun && Game.Player.Character.IsShooting) { if (Game.Player.GetTargetedEntity().Exists()) Game.Player.GetTargetedEntity().Health = 0; } // player special ability if (featurePlayerUnlimitedAbility) { Function.Call(Hash._RECHARGE_SPECIAL_ABILITY, Game.Player, 1); } // player no noise if (featurePlayerNoNoiseUpdated) { if (!featurePlayerNoNoise) Function.Call(Hash.SET_PLAYER_NOISE_MULTIPLIER, Game.Player, 1.0); featurePlayerNoNoiseUpdated = false; } if (featurePlayerNoNoise) { Function.Call(Hash.SET_PLAYER_NOISE_MULTIPLIER, Game.Player, 0.0); } if (featurePlayerSuperJump) { Function.Call(Hash.SET_SUPER_JUMP_THIS_FRAME, Game.Player); } if (featureWeaponFireAmmo) { Function.Call(Hash.SET_FIRE_AMMO_THIS_FRAME, Game.Player); } if (featureWeaponExplosiveAmmo) { Function.Call(Hash.SET_EXPLOSIVE_AMMO_THIS_FRAME, Game.Player); } if (featureWeaponExplosiveMelee) { Function.Call(Hash.SET_EXPLOSIVE_MELEE_THIS_FRAME, Game.Player); } } catch { } #region noclip Vehicle[] nearbyVehicles; int i; Ped character = Game.Player.Character; if (this.noclip) { int handle = character.Handle; int ınt32 = this.speed - 1; UIText uIText = new UIText(string.Concat("Speed: ", ınt32.ToString()), new Point(500, 50), 0.4f, Color.White); uIText.Draw(); Vector3 offsetInWorldCoords = character.GetOffsetInWorldCoords(new Vector3(0f, (float)(this.speed + this.helpup), 0f)); Vector3 vector3 = character.GetOffsetInWorldCoords(new Vector3(0f, (float)(-this.speed - this.helpdown), 0f)); Vector3 offsetInWorldCoords1 = character.GetOffsetInWorldCoords(new Vector3((float)(-this.speed - this.helpdown), 0f, 0f)); Vector3 vector31 = character.GetOffsetInWorldCoords(new Vector3((float)(this.speed + this.helpup), 0f, 0f)); Vector3 offsetInWorldCoords2 = character.GetOffsetInWorldCoords(new Vector3(0f, 0f, (float)(this.speed + this.helpup))); Vector3 vector32 = character.GetOffsetInWorldCoords(new Vector3(0f, 0f, (float)(-this.speed - this.helpdown))); Vector3 vector33 = character.Position; if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Increase_speed_on_noclip", Keys.Add))) { this.speed = this.speed + 1; } else if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Decrease_speed_on_noclip", Keys.Subtract))) { if (this.speed > 2) { this.speed = this.speed - 1; } } if (character.IsInVehicle()) { int handle1 = character.CurrentVehicle.Handle; character.CurrentVehicle.Position = vector33; character.CurrentVehicle.FreezePosition = true; nearbyVehicles = World.GetNearbyVehicles(character, 10f); if ((nearbyVehicles == null ? false : (int)nearbyVehicles.Length > 0)) { for (i = 0; i < (int)nearbyVehicles.Length; i++) { if (Entity.Exists(nearbyVehicles[i])) { if (nearbyVehicles[i] != character.CurrentVehicle) { nearbyVehicles[i].FreezePosition = false; } } } } if ((character.CurrentVehicle.HeightAboveGround > 3f || character.CurrentVehicle.HeightAboveGround < 0f ? true : this.speed > 3)) { this.helpup = 0; this.helpdown = 0; } else { this.helpup = 3; this.helpdown = 5; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Forward_on_noclip", Keys.W))) { character.CurrentVehicle.Position = offsetInWorldCoords; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Back_on_noclip", Keys.S))) { character.CurrentVehicle.Position = vector3; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Left_on_noclip", Keys.A))) { character.CurrentVehicle.Position = offsetInWorldCoords1; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Right_on_noclip", Keys.D))) { character.CurrentVehicle.Position = vector31; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Up_on_noclip", Keys.Z))) { character.CurrentVehicle.Position = offsetInWorldCoords2; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Down_on_noclip", Keys.X))) { character.CurrentVehicle.Position = vector32; } } else { character.FreezePosition = true; nearbyVehicles = World.GetNearbyVehicles(character, 10f); this.helpup = 0; this.helpdown = 0; if ((nearbyVehicles == null ? false : (int)nearbyVehicles.Length > 0)) { for (i = 0; i < (int)nearbyVehicles.Length; i++) { if (Entity.Exists(nearbyVehicles[i])) { nearbyVehicles[i].FreezePosition = false; } } } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Forward_on_noclip", Keys.W))) { character.Position = offsetInWorldCoords; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Back_on_noclip", Keys.S))) { character.Position = vector3; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Left_on_noclip", Keys.A))) { character.Position = offsetInWorldCoords1; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Right_on_noclip", Keys.D))) { character.Position = vector31; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Up_on_noclip", Keys.Z))) { character.Position = offsetInWorldCoords2; } if (Game.IsKeyPressed(this.settings.GetValue<Keys>(sectionname, "Down_on_noclip", Keys.X))) { character.Position = vector32; } } } #endregion }