From 9f376a7d4fc8d8be3883d0469e3a8e1579830cbd Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 14 Apr 2021 21:43:25 +0200 Subject: [PATCH] fx3 --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 8 +++++++- ReallifeGamemode.Server/Events/Disconnect.cs | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) 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();