public override bool OnCalloutAccepted(MurderInvestigation owner)
 {
     owner.HelpText              = @"What if you search for a CCTV camera? Or a weapon?~n~If you found out how the suspect is you could ask a pedestrian if he saw him pressing ~b~" + Controls.SecondaryAction.ToUserFriendlyName() + "~s~";
     objects                     = new List <Rage.Object>();
     alreadyAskedPeds            = new List <Ped>();
     state                       = Var1State.EnRoute;
     blipLocation                = new Blip(scenario.CalloutPosition);
     blipLocation.IsRouteEnabled = true;
     return(createScenario());
 }
            public override void Process(MurderInvestigation owner)
            {
                if (state == Var1State.EnRoute)
                {
                    if (Game.LocalPlayer.Character.IsInRangeOf2D(victimPed, 12.5f))
                    {
                        state = Var1State.CrimeSceneReached;
                        return;
                    }
                }
                else if (state == Var1State.CrimeSceneReached)
                {
                    Game.DisplayNotification("~b~" + Settings.General.Name + ": ~w~Dispatch, I'm on scene, ~g~victim is dead");
                    GameFiber.Wait(1250);
                    Game.DisplayNotification("~b~Dispatch: ~w~Roger, investigate the scene");

                    state = Var1State.SearchingEvidences;
                    owner.IsPlayerOnScene = true;
                    return;
                }
                else if (state == Var1State.SearchingEvidences)
                {
//                    if (owner.InvestigationModeRaycastResult.Hit)
//                    {
//                        if (owner.InvestigationModeRaycastResult.HitEntity != null)
//                        {
//                            if (owner.InvestigationModeRaycastResult.HitEntity == cctvObject)
//                            {
//                                Game.DisplayHelp("~b~Investigation Mode:~s~ Press ~b~" + Controls.SecondaryAction.ToUserFriendlyName() + "~s~ to watch the ~g~CCTV camera footage~s~", 10);
//                                //cctvObjectVar1.Opacity = cctvObjectVar1.Opacity == 1.0f ? 0.33f : 1.0f;
//                                if (Controls.SecondaryAction.IsJustPressed())
//                                {
//                                    //cctvObjectVar1.Opacity = 1.0f;
//                                    watchCCTVCameraFootage(owner);
//                                }
//                            }
//                            else if (owner.InvestigationModeRaycastResult.HitEntity == knifeObject)
//                            {
//                                Game.DisplayHelp("~b~Investigation Mode:~s~ Press ~b~" + Controls.SecondaryAction.ToUserFriendlyName() + "~s~ to collect the ~g~knife~s~ as an evidence", 10);

//                                if (Controls.SecondaryAction.IsJustPressed())
//                                {
//                                    if (!hasFoundKnife)
//                                    {
//                                        if (knifeObject.Exists())
//                                            knifeObject.Delete();
//                                        owner.Report.AddTextToReport(
//    @"[" + DateTime.UtcNow.ToShortDateString() + "  " + DateTime.UtcNow.ToLongTimeString() + @"]
//Knife found.
//Has blood remains.
//Possible crime weapon.");
//                                    }
//                                    hasFoundKnife = true;
//                                }
//                            }
//                        }
//                    }

                    if (hasCCTVTextBeenAddedToReport)
                    {
                        if (Controls.SecondaryAction.IsJustPressed())
                        {
                            Ped closestPed = World.GetClosestEntity(Game.LocalPlayer.Character.Position, 5.0f, GetEntitiesFlags.ConsiderHumanPeds | GetEntitiesFlags.ExcludePlayerPed) as Ped;
                            if (closestPed.Exists())
                            {
                                if (alreadyAskedPeds.Contains(closestPed))
                                {
                                    Game.DisplayHelp("You already asked this pedestrian");
                                    return;
                                }

                                if (closestPed.IsDead)
                                {
                                    string[] phrases =
                                    {
                                        "What do you think you're doing? You can't ask a dead body...",
                                        "Ha, ha, ha! So funny... Asking a dead body...",
                                        "Mmh, I think that's a dead body, you shouldn't ask " + (closestPed.IsMale ? "him" : "her"),
                                    };
                                    Game.DisplayHelp(phrases.GetRandomElement(), 5750);
                                    return;
                                }

                                closestPed.BlockPermanentEvents = true;
                                bool askingPed = true;
                                GameFiber.StartNew(delegate
                                {
                                    while (askingPed && closestPed.Exists())
                                    {
                                        GameFiber.Yield();
                                        closestPed.Tasks.AchieveHeading(closestPed.GetHeadingTowards(Game.LocalPlayer.Character));
                                    }
                                });
                                GameFiber.Sleep(225);

                                bool pedDisrespectPolice = Globals.Random.Next(12) <= 1 ? true : false;
                                bool pedSawMurderer      = Globals.Random.Next(3) == 1 ? true : false;
                                if (closestPed.IsMale)
                                {
                                    Game.DisplaySubtitle("~b~" + Settings.General.Name + ": ~w~Sir, have you seen this person?", 3250); //TODO: implement asking peds
                                }
                                else
                                {
                                    Game.DisplaySubtitle("~b~" + Settings.General.Name + ": ~w~Ma'am, have you seen this person?", 3250);
                                }
                                GameFiber.Sleep(3150);
                                if (closestPed == murdererPed)
                                {
                                    askingPed = false;
                                    murdererPed.Tasks.Clear();
                                    murdererPed.Flee(Game.LocalPlayer.Character, 1000.0f, 60000); // notfleeing
                                }
                                else
                                {
                                    if (pedSawMurderer)
                                    {
                                        if (pedDisrespectPolice)
                                        {
                                            Game.DisplaySubtitle("pedSawMurderer pedDisrespectPolice", 5000);
                                        }
                                        else
                                        {
                                            Game.DisplaySubtitle("pedSawMurderer", 5000);
                                        }
                                    }
                                    else
                                    {
                                        if (pedDisrespectPolice)
                                        {
                                            string notSawDisrespect = new string[] { "Ha, ha! So now you pigs need my help!? Go ask your speed tickets!" }.GetRandomElement();
                                            Game.DisplaySubtitle("~b~Pedestrian: ~w~" + notSawDisrespect, 3250);
                                        }
                                        else
                                        {
                                            Game.DisplaySubtitle("pedNOTSawMurderer", 5000);
                                        }
                                    }
                                }
                                askingPed = false;
                                alreadyAskedPeds.Add(closestPed);
                            }
                        }
                    }
                }
                else if (state == Var1State.SuspectFound)
                {
                }
            }