public Manhunt() { this.calloutType = ECalloutType.FootChase; //(ECalloutType)Common.GetRandomEnumValue(typeof(ECalloutType)); this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); while (this.spawnPosition.DistanceTo(LPlayer.LocalPlayer.Ped.Position) < 100.0f) { this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); } if (this.spawnPosition == Vector3.Zero) { // It obviously failed, set the position to be the player's position and the distance check will catch it. this.spawnPosition = LPlayer.LocalPlayer.Ped.Position; } this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPosition, 50f); this.AddMinimumDistanceCheck(80f, this.spawnPosition); if (this.calloutType == ECalloutType.FootChase) { this.CalloutMessage = string.Format("Attention all units, we have a reports of a criminal evading police on foot, please respond."); Functions.PlaySoundUsingPosition("ATTENTION_ALL_UNITS INS_WE_HAVER_A_REPORT_OF_ERRR SUSPECT ON_FOOT IN_OR_ON_LOCATION", this.spawnPosition); } else if (this.calloutType == ECalloutType.Manhunt) { this.CalloutMessage = string.Format("Attention all units, request a perimeter search for a HVT"); Functions.PlaySoundUsingPosition("ATTENTION_ALL_UNITS INS_WE_HAVE_A_REPORT_OF_ERRR CRIM_A_SUSPECT_RESISTING_ARREST IN_OR_ON_POSITION", this.spawnPosition); } }
public CruiserTheft() { this.calloutType = (ECalloutType)Common.GetRandomEnumValue(typeof(ECalloutType)); this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); while (this.spawnPosition.DistanceTo(LPlayer.LocalPlayer.Ped.Position) < 100.0f) { this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); } if (this.spawnPosition == Vector3.Zero) { // It obviously failed, set the position to be the player's position and the distance check will catch it. this.spawnPosition = LPlayer.LocalPlayer.Ped.Position; } // Show user where the pursuit is about to happen this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPosition, 50f); this.AddMinimumDistanceCheck(80f, this.spawnPosition); if (this.calloutType == ECalloutType.StolenCruiser) { this.CalloutMessage = string.Format("Reports of a stolen police vehicle, seen driving dangerously, all units please respond.", Functions.GetAreaStringFromPosition(this.spawnPosition)); Functions.PlaySoundUsingPosition("THIS_IS_CONTROL ATTENTION_ALL_UNITS INS_WE_HAVE_A_REPORT_OF_ERRR CRIM_A_STOLEN_VEHICLE", this.spawnPosition); } }
/// <summary> /// Initializes a new instance of the <see cref="CruiserTheft"/> class. /// </summary> public Races() { // Determine type this.calloutType = ECalloutType.Race; //(ECalloutType)Common.GetRandomEnumValue(typeof(ECalloutType)); // Get a good position this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); while (this.spawnPosition.DistanceTo(LPlayer.LocalPlayer.Ped.Position) < 100.0f) { this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); } if (this.spawnPosition == Vector3.Zero) { // It obviously failed, set the position to be the player's position and the distance check will catch it. this.spawnPosition = LPlayer.LocalPlayer.Ped.Position; } // Show user where the pursuit is about to happen this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPosition, 50f); this.AddMinimumDistanceCheck(80f, this.spawnPosition); // Set up message if (this.calloutType == ECalloutType.Race) { this.CalloutMessage = string.Format("Attention all units, illegal street race in progress, officer's requiring assitance.", Functions.GetAreaStringFromPosition(this.spawnPosition)); Functions.PlaySoundUsingPosition("THIS_IS_CONTROL ATTENTION_ALL_UNITS INS_WE_HAVE_A_REPORT_OF_ERRR STREET_RACE_CRIME_AN_ILLEGAL_STREET_RACE_IN_PROGRESS IN_OR_ON_POSITION", this.spawnPosition); } else if (this.calloutType == ECalloutType.GangMeeting) { this.CalloutMessage = string.Format("Officers in need of assistance, gang members evading pursuit, all units please respond.", Functions.GetAreaStringFromPosition(this.spawnPosition)); Functions.PlaySoundUsingPosition(ESound.PursuitAcknowledged, this.spawnPosition); } }
/// <summary> /// Initializes a new instance of the <see cref="Pursuit"/> class. /// </summary> public Pursuit() { // Determine type this.calloutType = (ECalloutType)Common.GetRandomEnumValue(typeof(ECalloutType)); // Get a good position this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); while (this.spawnPosition.DistanceTo(LPlayer.LocalPlayer.Ped.Position) < 100.0f) { this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); } if (this.spawnPosition == Vector3.Zero) { // It obviously failed, set the position to be the player's position and the distance check will catch it. this.spawnPosition = LPlayer.LocalPlayer.Ped.Position; } // Show user where the pursuit is about to happen this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPosition, 50f); this.AddMinimumDistanceCheck(80f, this.spawnPosition); // Set up message if (this.calloutType == ECalloutType.GrandTheftAuto) { this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("CALLOUT_ROBBERY_GTA_MESSAGE"), Functions.GetAreaStringFromPosition(this.spawnPosition)); int randomValue = Common.GetRandomValue(0, 6); switch (randomValue) { case 0: Functions.PlaySoundUsingPosition("THIS_IS_CONTROL ATTENTION_ALL_UNITS INS_WE_HAVE_A_REPORT_OF_ERRR CRIM_A_GRAND_THEFT_AUTO IN_OR_ON_POSITION", this.spawnPosition); break; case 1: Functions.PlaySoundUsingPosition("ATTENTION_ALL_UNITS INS_WEVE_GOT CRIM_A_CRIMINAL_IN_A_STOLEN_CAR IN_OR_ON_POSITION", this.spawnPosition); break; case 2: Functions.PlaySoundUsingPosition("INS_AVAILABLE_UNITS_RESPOND_TO CRIM_A_CRIMINAL_IN_A_STOLEN_VEHICLE IN_OR_ON_POSITION", this.spawnPosition); break; case 3: Functions.PlaySoundUsingPosition("INS_THIS_IS_CONTROL_I_NEED_ASSISTANCE_FOR CRIM_A_SUSPECT_RESISTING_ARREST IN_OR_ON_POSITION", this.spawnPosition); break; case 4: Functions.PlaySoundUsingPosition("THIS_IS_CONTROL INS_WE_HAVE_A_REPORT_OF_ERRR CRIM_A_CRIMINAL_IN_A_STOLEN_VEHICLE IN_OR_ON_POSITION", this.spawnPosition); break; case 5: Functions.PlaySoundUsingPosition("ATTENTION_ALL_UNITS ASSISTANCE_REQUIRED FOR CRIM_A_GRAND_THEFT_AUTO IN_OR_ON_POSITION", this.spawnPosition); break; } } else if (this.calloutType == ECalloutType.Pursuit) { this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("CALLOUT_ROBBERY_PURSUIT_MESSAGE"), Functions.GetAreaStringFromPosition(this.spawnPosition)); Functions.PlaySoundUsingPosition(ESound.PursuitAcknowledged, this.spawnPosition); } else if (this.calloutType == ECalloutType.Robbery) { this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("CALLOUT_ROBBERY_ROBBERY_MESSAGE"), Functions.GetAreaStringFromPosition(this.spawnPosition)); Functions.PlaySoundUsingPosition(ESound.PursuitAcknowledged, this.spawnPosition); } }
/// <summary> /// Initializes a new instance of the <see cref="Pursuit"/> class. /// </summary> public Pursuit() { // Determine type this.calloutType = (ECalloutType)Common.GetRandomEnumValue(typeof(ECalloutType)); // Grab Game Episode for vehicle models if (Game.CurrentEpisode == GameEpisode.TLAD) { vehicleModels = new string[] { "REGINA", "GBURRITO", "ADMIRAL", "SLAMVAN", "LYCAN", "FBI", "LANDSTALKER", "PATRIOT", "SABREGT", "WASHINGTON" } } ; else if (Game.CurrentEpisode == GameEpisode.TBOGT) { vehicleModels = new string[] { "APC", "BUFFALO", "F620", "LIMO2", "VADER", "CHAVOS", "REBLA", "PCJ", "TAXI", "STRETCH", "SULTAN" } } ; else { vehicleModels = new string[] { "SPEEDO", "BURRITO", "BURRITO2", "DF8", "FIRETRUK", "INTRUDER", "ZOMBIEB", "NRG900", "ORACLE" } }; if (Game.CurrentEpisode == GameEpisode.TBOGT) { copcarModels = new string[] { "POLICE", "POLICE2", "POLICE3", "POLICE4" } } ; else { copcarModels = new string[] { "POLICE", "POLICE2" } }; // Get a good position this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); while (this.spawnPosition.DistanceTo(LPlayer.LocalPlayer.Ped.Position) < 100.0f) { this.spawnPosition = World.GetNextPositionOnStreet(LPlayer.LocalPlayer.Ped.Position.Around(400.0f)); } if (this.spawnPosition == Vector3.Zero) { // It obviously failed, set the position to be the player's position and the distance check will catch it. this.spawnPosition = LPlayer.LocalPlayer.Ped.Position; } // Show user where the pursuit is about to happen this.ShowCalloutAreaBlipBeforeAccepting(this.spawnPosition, 50f); this.AddMinimumDistanceCheck(80f, this.spawnPosition); // Set up message if (this.calloutType == ECalloutType.GrandTheftAuto) { this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("CALLOUT_ROBBERY_GTA_MESSAGE"), Functions.GetAreaStringFromPosition(this.spawnPosition)); int randomValue = Common.GetRandomValue(0, 6); switch (randomValue) { case 0: Functions.PlaySoundUsingPosition("THIS_IS_CONTROL ATTENTION_ALL_UNITS INS_WE_HAVE_A_REPORT_OF_ERRR CRIM_A_GRAND_THEFT_AUTO IN_OR_ON_POSITION", this.spawnPosition); break; case 1: Functions.PlaySoundUsingPosition("ATTENTION_ALL_UNITS INS_WEVE_GOT CRIM_A_CRIMINAL_IN_A_STOLEN_CAR IN_OR_ON_POSITION", this.spawnPosition); break; case 2: Functions.PlaySoundUsingPosition("INS_AVAILABLE_UNITS_RESPOND_TO CRIM_A_CRIMINAL_IN_A_STOLEN_VEHICLE IN_OR_ON_POSITION", this.spawnPosition); break; case 3: Functions.PlaySoundUsingPosition("INS_THIS_IS_CONTROL_I_NEED_ASSISTANCE_FOR CRIM_A_SUSPECT_RESISTING_ARREST IN_OR_ON_POSITION", this.spawnPosition); break; case 4: Functions.PlaySoundUsingPosition("THIS_IS_CONTROL INS_WE_HAVE_A_REPORT_OF_ERRR CRIM_A_CRIMINAL_IN_A_STOLEN_VEHICLE IN_OR_ON_POSITION", this.spawnPosition); break; case 5: Functions.PlaySoundUsingPosition("ATTENTION_ALL_UNITS ASSISTANCE_REQUIRED FOR CRIM_A_GRAND_THEFT_AUTO IN_OR_ON_POSITION", this.spawnPosition); break; } } else if (this.calloutType == ECalloutType.Pursuit) { this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("CALLOUT_ROBBERY_PURSUIT_MESSAGE"), Functions.GetAreaStringFromPosition(this.spawnPosition)); Functions.PlaySoundUsingPosition(ESound.PursuitAcknowledged, this.spawnPosition); } else if (this.calloutType == ECalloutType.Robbery) { this.CalloutMessage = string.Format(Functions.GetStringFromLanguageFile("CALLOUT_ROBBERY_ROBBERY_MESSAGE"), Functions.GetAreaStringFromPosition(this.spawnPosition)); Functions.PlaySoundUsingPosition(ESound.PursuitAcknowledged, this.spawnPosition); } }