/// <summary> /// OnCalloutAccepted is where we begin our callout's logic. In this instance we create our pursuit and add our ped from eariler to the pursuit as well /// </summary> /// <returns></returns> public override bool OnCalloutAccepted() { //We accepted the callout, so lets initilize our blip from before and attach it to our ped so we know where he is. heliBlip = crash.AttachBlip(); if (crash.Model == new Model("prop_crashed_heli") || crash.Model == new Model("prop_wrecked_buzzard")) { heliBlip.Sprite = BlipSprite.Helicopter; } else if (crash.Model == new Model("prop_shamal_crash") || crash.Model == new Model("apa_mp_apa_crashed_usaf_01a")) { heliBlip.Sprite = BlipSprite.Plane; } heliBlip.Color = Color.Yellow; heliBlip.EnableRoute(Color.Yellow); Functions.PlayScannerAudioUsingPosition("CRIME_AMBULANCE_REQUESTED IN_OR_ON_POSITION", spawnPoint); explosionBool = true; GameFiber.StartNew(delegate { GameFiber.Sleep(MathHelper.GetRandomInteger(500, 12501)); if (crash.Exists()) { int rndFarExplosion = MathHelper.GetRandomInteger(101); if (rndFarExplosion < 75) { World.SpawnExplosion(crash.Position.AroundPosition(5.0f), 5, 10.0f, true, false, MathHelper.GetRandomSingle(0.0f, 4.0f)); } } }); return(base.OnCalloutAccepted()); }