From b587c51365a22f476293de1d7e7a4ba8d2a00372 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 14 Apr 2021 21:36:32 +0200 Subject: [PATCH] fx2 --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 2 +- ReallifeGamemode.Server/Events/Disconnect.cs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 1753a540..2bbd91ed 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1402,7 +1402,7 @@ 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 }); + 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 8fa51e67..09ced74b 100644 --- a/ReallifeGamemode.Server/Events/Disconnect.cs +++ b/ReallifeGamemode.Server/Events/Disconnect.cs @@ -63,7 +63,13 @@ namespace ReallifeGamemode.Server.Events ChatService.BroadcastAdmin("!{#FFFF00}*** " + player.Name + " hat den Server verlassen", AdminLevel.MAPPING); } - ChatService.BroadcastFaction("Info: " + "Der Auftrag von " + player.Name + " wurde entfernt (Ausgeloggt)", new List() { 2 }); + MedicTask task = Medic.ReviveTasks.FirstOrDefault(t => t.Victim == player.Name); + + if (task != null) + { + ChatService.BroadcastFaction("Info: Der Auftrag von " + player.Name + " wurde entfernt (Ausgeloggt)", new List() { 2 }); + return; + } /* TaxiDriverJob taxiJob = JobManager.GetJob();