private void onFinished(CPR cpr) { TreatedPeds.Add(cpr.Patient, cpr.WasSuccessful); if (!cpr.WasSuccessful && cpr.ShouldShowDeathReportWhenFinished) { DeathManager.Instance.ShowReport(cpr.Patient); } }
private void searchLocally() { if (Game.LocalPlayer.Character.IsOnFoot) { Ped localPatient = Util.GetClosestDeadPed(Game.LocalPlayer.Character.Position, 1.75f); if (localPatient && !HasActiveCPR(localPatient) && !TreatedPeds.ContainsKey(localPatient)) { Game.DisplayHelp("Press ~INPUT_CONTEXT~ to attempt CPR", 20); if (Game.IsControlJustPressed(0, GameControl.Context)) { Start(new CPR(localPatient, Game.LocalPlayer.Character)); } } } }