diff --git a/ReallifeGamemode.Client/Interaction/factioninteraction.ts b/ReallifeGamemode.Client/Interaction/factioninteraction.ts index 889efdff..641d1487 100644 --- a/ReallifeGamemode.Client/Interaction/factioninteraction.ts +++ b/ReallifeGamemode.Client/Interaction/factioninteraction.ts @@ -485,6 +485,7 @@ export default function factionInteraction(globalData: IGlobalData) { mp.events.add("destroyMedicTaskCheckpoint", () => { activeCheckpoint.destroy(); activeTask = false; + timeLeft = 0; mp.events.callRemote("MedicTaskTimeout"); }); @@ -495,7 +496,8 @@ export default function factionInteraction(globalData: IGlobalData) { activeCheckpoint.destroy(); mp.events.callRemote("PayCutMedicEarnings"); activeTask = false; - deadRespawned = false; + deadRespawned = false; + timeLeft = 0; } else { mp.gui.chat.push("DEBUG: Checkpoint VOR wiederbelebung des Spielers betreten") } diff --git a/ReallifeGamemode.Server/Factions/Medic/Medic.cs b/ReallifeGamemode.Server/Factions/Medic/Medic.cs index 8e17da37..c274581b 100644 --- a/ReallifeGamemode.Server/Factions/Medic/Medic.cs +++ b/ReallifeGamemode.Server/Factions/Medic/Medic.cs @@ -158,13 +158,14 @@ namespace ReallifeGamemode.Server.Factions.Medic using var dbContext = new DatabaseContext(); dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += Medic.ReviveIncome / 2; player.SendNotification($"Du hast den Einsatzort erreicht und ~g~{Medic.ReviveIncome / 2}$ ~s~für die Fraktion verdient."); + Medic.delReviveTaskMedic(player); dbContext.SaveChanges(); } [RemoteEvent("MedicTaskTimeout")] public void RemoveMedicTask(Player player) { - Medic.delReviveTask(player); + Medic.delReviveTaskMedic(player); } public static void UpdateDutyMedics(int modifier)