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()); }