From d4bfd37ef37985d17b0ef1c08df8b4f8db4bc47d Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 14 Apr 2021 21:31:15 +0200 Subject: [PATCH 1/4] fx --- ReallifeGamemode.Server/Events/Disconnect.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Disconnect.cs b/ReallifeGamemode.Server/Events/Disconnect.cs index e62e8ece..8fa51e67 100644 --- a/ReallifeGamemode.Server/Events/Disconnect.cs +++ b/ReallifeGamemode.Server/Events/Disconnect.cs @@ -63,11 +63,7 @@ namespace ReallifeGamemode.Server.Events ChatService.BroadcastAdmin("!{#FFFF00}*** " + player.Name + " hat den Server verlassen", AdminLevel.MAPPING); } - if (!player.HasData("isDead") || !player.GetData("isDead")) - { - 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(); From b587c51365a22f476293de1d7e7a4ba8d2a00372 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 14 Apr 2021 21:36:32 +0200 Subject: [PATCH 2/4] 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(); From 9f376a7d4fc8d8be3883d0469e3a8e1579830cbd Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 14 Apr 2021 21:43:25 +0200 Subject: [PATCH 3/4] 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(); From 9a506f7b7572cf92c5155adc139ec1f40f8050d5 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 14 Apr 2021 21:45:01 +0200 Subject: [PATCH 4/4] admin logout support meldung --- ReallifeGamemode.Server/Events/Disconnect.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Events/Disconnect.cs b/ReallifeGamemode.Server/Events/Disconnect.cs index a8644275..d44559c9 100644 --- a/ReallifeGamemode.Server/Events/Disconnect.cs +++ b/ReallifeGamemode.Server/Events/Disconnect.cs @@ -70,7 +70,10 @@ namespace ReallifeGamemode.Server.Events ChatService.BroadcastFaction("Info: Der Auftrag von " + player.Name + " wurde entfernt (Ausgeloggt)", new List() { 2 }); } - + if (player.IsAdminDuty()) + { + ChatService.Broadcast("!{#ee4d2e}[SUPPORT] " + player.Name + " hat sich vom Support abgemeldet (Ausgeloggt)"); + } /* TaxiDriverJob taxiJob = JobManager.GetJob();