internal static void ShowVehicleDetails() { if (!LastSelected || !LastSelected.Validate()) { return; } var reports = ComputerReportsController.GetArrestReportsForPed(LastSelected); var trafficCitations = ComputerReportsController.GetTrafficCitationsForPed(LastSelected); if (LastSelected != null && LastSelected.Vehicle != null && LastSelected.Vehicle.IsValid() && LastSelected.Ped != null && LastSelected.Ped.IsValid()) { Globals.Navigation.Push(new ComputerVehicleViewExtendedContainer(new DetailedEntity(LastSelected, reports, trafficCitations))); } }
internal static void ShowPedView() { if (!LastSelected || !LastSelected.Validate()) { return; } try { var arrestReports = ComputerReportsController.GetArrestReportsForPed(LastSelected); if (arrestReports != null && arrestReports.Count > 0) { Function.Log("Found arrest report for ped"); } else { Function.Log("Arrest report for ped are null"); } var trafficCitations = ComputerReportsController.GetTrafficCitationsForPed(LastSelected); if (trafficCitations != null && trafficCitations.Count > 0) { Function.Log("Found citations for ped"); } else { Function.Log("Citations for ped are null"); } if (LastSelected != null && LastSelected.FullName != null && LastSelected.Ped != null && LastSelected.Ped.IsValid()) { Function.LogDebug("Creating ComputerPedViewExtendedContainer"); Globals.Navigation.Push(new ComputerPedViewExtendedContainer(new DetailedEntity(LastSelected, arrestReports, trafficCitations))); } } catch (Exception e) { Function.Log(e.ToString()); } }