public override bool OnBeforeCalloutDisplayed() { //Sets the spawn points for various things. SpawnPoint = new Vector3(); SusSpawnPoint = new Vector3(1179, 2652, 37); MechSpawnPoint = new Vector3(1180, 2650, 37); VehSpawnPoint = new Vector3(1177, 2650, 37); //If peds are valid, display the area the callout is in. this.ShowCalloutAreaBlipBeforeAccepting(SpawnPoint, 15f); this.AddMinimumDistanceCheck(5f, SpawnPoint); //Set the callout message, and the position. this.CalloutMessage = "Public Disturbance"; this.CalloutPosition = SpawnPoint; //Play the scanner audio using SpawnPoint. /* * Need to update PlayScannerAudioUsingPosition */ Functions.PlayScannerAudioUsingPosition("CITIZENS_REPORT_03 A_02 POSSIBLE_BNE CRIME_BREAK_AND_ENTER IN_OR_ON_POSITION", this.SpawnPoint); computerPlusRunning = Main.IsLSPDFRPluginRunning("ComputerPlus", new Version("1.3.0.0")); if (computerPlusRunning) { callID = ComputerPlusWrapperClass.CreateCallout("Public Disturbance in Harmony", "Public Disturbance", SpawnPoint, (int)EResponseType.Code_3); } return(base.OnBeforeCalloutDisplayed()); }
public override bool OnBeforeCalloutDisplayed() { VehSpawnPoint = new Vector3(466, 2592, 43); SpawnPoint = new Vector3(474, 2590, 44); //If peds are valid, display the area the callout is in. this.ShowCalloutAreaBlipBeforeAccepting(SpawnPoint, 15f); this.AddMinimumDistanceCheck(5f, SpawnPoint); //Set the callout message, and the position this.CalloutMessage = "US Route 68 House Check"; this.CalloutPosition = SpawnPoint; //Play the scanner audio using SpawnPoint.. Functions.PlayScannerAudioUsingPosition("CITIZENS_REPORT_03 A_02 POSSIBLE_BNE CRIME_BREAK_AND_ENTER IN_OR_ON_POSITION", this.SpawnPoint); computerPlusRunning = Main.IsLSPDFRPluginRunning("ComputerPlus", new Version("1.3.0.0")); if (computerPlusRunning) { callID = ComputerPlusWrapperClass.CreateCallout("Harmony House Check", "Harmony House Check", SpawnPoint, (int)EResponseType.Code_2); } return(base.OnBeforeCalloutDisplayed()); }
public override void OnCalloutDisplayed() { if (computerPlusRunning) { ComputerPlusWrapperClass.UpdateCalloutStatus(callID, (int)ECallStatus.Dispatched); } base.OnCalloutDisplayed(); }
public override bool OnCalloutAccepted() { if (computerPlusRunning) { ComputerPlusWrapperClass.SetCalloutStatusToUnitResponding(callID); Game.DisplayHelp("Check Computer+ for further call details"); ComputerPlusWrapperClass.UpdateCalloutDescription(callID, "Caller states a van with 1 occupant pulled up to their neighbours house while they're on vacation and started looking around in the backyard."); } calloutState = ECalloutState.EnRoute; if (calloutState.Equals(ECalloutState.EnRoute)) { NativeFunction.Natives.ClearAreaOfPeds(SpawnPoint, 500f, 0); } suspect = new Ped("s_m_m_autoshop_02", SusSpawnPoint, 202f) { IsPersistent = true, BlockPermanentEvents = true }; mechanic = new Ped("a_m_y_stwhi_02", MechSpawnPoint, 20f) { IsPersistent = true, BlockPermanentEvents = true }; susVehicle = new Vehicle("", VehSpawnPoint); susVehicle.IsPersistent = true; //If one or both of the peds can't spawn for some reason end the callout if (!suspect.Exists()) { End(); } if (!mechanic.Exists()) { End(); } coBlip = suspect.AttachBlip(); coBlip.Color = Color.Yellow; coBlip.Scale = 0.75f; coBlip.IsRouteEnabled = true; return(base.OnCalloutAccepted()); }
public override bool OnCalloutAccepted() { if (computerPlusRunning) { ComputerPlusWrapperClass.SetCalloutStatusToUnitResponding(callID); Game.DisplayHelp("Check Computer+ for further call details"); ComputerPlusWrapperClass.UpdateCalloutDescription(callID, "Caller states a van with 1 occupant pulled up to their neighbours house while they're on vacation and started looking around in the backyard."); } calloutState = ECalloutState.EnRoute; if (calloutState.Equals(ECalloutState.EnRoute)) { NativeFunction.Natives.ClearAreaOfPeds(SpawnPoint, 500F, 0); } //Spawn suspect at SpawnPoint. suspect = new Ped("g_m_m_chicold_01", SpawnPoint, 0F) { //Set suspect as persistent, so it doesn't randomly disappear. IsPersistent = true, //Block permanent events from suspect. BlockPermanentEvents = true }; susVehicle = new Vehicle("YOUGA", VehSpawnPoint); NativeFunction.Natives.SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(susVehicle, 0, 0, 0); NativeFunction.Natives.SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(susVehicle, 0, 0, 0); susVehicle.IsPersistent = true; //Stops the callout from being displayed if the suspect can't spawn for some reason if (!suspect.Exists()) { End(); } //Attach coBlip to suspect to show where they are. coBlip = suspect.AttachBlip(); coBlip.Color = Color.Yellow; coBlip.Scale = 0.75f; coBlip.IsRouteEnabled = true; Functions.PlayScannerAudioUsingPosition("UNITS_RESPOND_CODE_02_02", this.SpawnPoint); return(base.OnCalloutAccepted()); }
public override void OnCalloutNotAccepted() { if (computerPlusRunning) { ComputerPlusWrapperClass.AssignCallToAIUnit(callID); } if (suspect.Exists()) { suspect.Delete(); } if (coBlip.Exists()) { coBlip.Delete(); } base.OnCalloutNotAccepted(); }
public override void End() { if (computerPlusRunning) { ComputerPlusWrapperClass.ConcludeCallout(callID); } if (suspect.Exists()) { suspect.Dismiss(); } if (coBlip.Exists()) { coBlip.Delete(); } if (susVehicle.Exists()) { susVehicle.Dismiss(); } base.End(); }
public override void Process() { NativeFunction.Natives.ClearAreaOfPeds(SpawnPoint, 500f, 0); if (calloutState == ECalloutState.EnRoute && Game.LocalPlayer.Character.Position.DistanceTo2D(SpawnPoint) <= 25f) { if (computerPlusRunning) { ComputerPlusWrapperClass.SetCalloutStatusToAtScene(callID); ComputerPlusWrapperClass.AddUpdateToCallout(callID, "Officer arrived at scene."); ComputerPlusWrapperClass.AddPedToCallout(callID, suspect); ComputerPlusWrapperClass.AddPedToCallout(callID, mechanic); coBlip.IsRouteEnabled = false; } coBlip.IsRouteEnabled = false; calloutState = ECalloutState.OnScene; } if ((suspect.IsDead) || (suspect.IsCuffed)) { End(); } base.Process(); }