diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 2bbd91ed..39a9251c 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1402,7 +1402,13 @@ namespace ReallifeGamemode.Server.Commands } target.TriggerEvent("onPlayerRevived"); target.SendNotification("Du wurdest von Admin ~y~" + player.Name + "~s~ wiederbelebt."); - ChatService.BroadcastFaction("Info: Der Auftrag von " + target.Name + " wurde entfernt (Administrativ wiederbelebt)", new List() { 2 }); + + MedicTask task = Medic.ReviveTasks.FirstOrDefault(t => t.Victim == player.Name); + if (task != null) + { + ChatService.BroadcastFaction("Info: Der Auftrag von " + target.Name + " wurde entfernt (Administrativ wiederbelebt)", new List() { 2 }); + } + target.SetData("isDead", false); using (var dbContext = new DatabaseContext()) { diff --git a/ReallifeGamemode.Server/Events/Disconnect.cs b/ReallifeGamemode.Server/Events/Disconnect.cs index 09ced74b..a8644275 100644 --- a/ReallifeGamemode.Server/Events/Disconnect.cs +++ b/ReallifeGamemode.Server/Events/Disconnect.cs @@ -67,10 +67,11 @@ namespace ReallifeGamemode.Server.Events if (task != null) { - ChatService.BroadcastFaction("Info: Der Auftrag von " + player.Name + " wurde entfernt (Ausgeloggt)", new List() { 2 }); - return; + ChatService.BroadcastFaction("Info: Der Auftrag von " + player.Name + " wurde entfernt (Ausgeloggt)", new List() { 2 }); } + + /* TaxiDriverJob taxiJob = JobManager.GetJob(); TaxiContract taxiContract = taxiJob.TaxiContracts.Where(t => t.Name == player.Name).FirstOrDefault();