コード例 #1
0
        private void onFinished(CPR cpr)
        {
            TreatedPeds.Add(cpr.Patient, cpr.WasSuccessful);

            if (!cpr.WasSuccessful && cpr.ShouldShowDeathReportWhenFinished)
            {
                DeathManager.Instance.ShowReport(cpr.Patient);
            }
        }
コード例 #2
0
        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));
                    }
                }
            }
        }