From 93f919e741e460da6a8d4f8622d0773642d51e67 Mon Sep 17 00:00:00 2001 From: balbo Date: Fri, 7 Aug 2020 21:24:01 +0200 Subject: [PATCH 1/6] wanted abgetaucht chatmessage added --- ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs b/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs index 0585ed28..5fc94dee 100644 --- a/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs +++ b/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs @@ -67,6 +67,7 @@ namespace ReallifeGamemode.Server.Wanted if (waTimer[user.Id] <= 0) { ResetWantedTimeToElapse(player); + player.SendChatMessage("~y~Du hast erfolgtreich einen Wanted abgetaucht."); using (var dbContext = new DatabaseContext()) { player.GetUser(dbContext).Wanteds -= 1; From f52ad245f03112254b1d663db3474b20316c6eb4 Mon Sep 17 00:00:00 2001 From: balbo Date: Fri, 7 Aug 2020 22:03:25 +0200 Subject: [PATCH 2/6] cheater meldung entfernt wenn der cheater admin ist --- ReallifeGamemode.Server/Job/TaxiDriverJob.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Job/TaxiDriverJob.cs b/ReallifeGamemode.Server/Job/TaxiDriverJob.cs index e506eec5..b9dc3a8e 100644 --- a/ReallifeGamemode.Server/Job/TaxiDriverJob.cs +++ b/ReallifeGamemode.Server/Job/TaxiDriverJob.cs @@ -119,7 +119,18 @@ namespace ReallifeGamemode.Server.Job lastPositions[v.Handle] = v.Position; double distance = lastPosition.DistanceTo(v.Position) / 1000.0; - if (distance > 0.5) { ChatService.BroadcastAdmin($"Möglicher Cheater - {player.Name}", AdminLevel.MAPPING); continue; } + + if(!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + if (player.GetUser()?.IsAdmin(AdminLevel.PLAYER) ?? true) + { + if (distance > 0.5) { ChatService.BroadcastAdmin($"Möglicher Cheater - {player.Name}", AdminLevel.MAPPING); continue; } + } + if (!player.GetData("hasPassager")) continue; foreach (Player occupant in v.Occupants) { From 0ccea1618063eefc0d80e489d6324b870b3d7dd1 Mon Sep 17 00:00:00 2001 From: balbo Date: Sat, 8 Aug 2020 00:04:35 +0200 Subject: [PATCH 3/6] copy paste fail --- ReallifeGamemode.Server/Job/TaxiDriverJob.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ReallifeGamemode.Server/Job/TaxiDriverJob.cs b/ReallifeGamemode.Server/Job/TaxiDriverJob.cs index b9dc3a8e..8d621634 100644 --- a/ReallifeGamemode.Server/Job/TaxiDriverJob.cs +++ b/ReallifeGamemode.Server/Job/TaxiDriverJob.cs @@ -120,12 +120,6 @@ namespace ReallifeGamemode.Server.Job double distance = lastPosition.DistanceTo(v.Position) / 1000.0; - if(!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true) - { - ChatService.NotAuthorized(player); - return; - } - if (player.GetUser()?.IsAdmin(AdminLevel.PLAYER) ?? true) { if (distance > 0.5) { ChatService.BroadcastAdmin($"Möglicher Cheater - {player.Name}", AdminLevel.MAPPING); continue; } From a01a4d3ed2276547ff188ff751f0067372e07a90 Mon Sep 17 00:00:00 2001 From: balbo Date: Sat, 8 Aug 2020 21:59:47 +0200 Subject: [PATCH 4/6] command /id added --- ReallifeGamemode.Server/Commands/UserCommands.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 9a170770..73a149df 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -9,11 +9,26 @@ using ReallifeGamemode.Server.Managers; using ReallifeGamemode.Server.Services; using ReallifeGamemode.Server.Types; using ReallifeGamemode.Server.Util; +using ReallifeGamemode.Services; namespace ReallifeGamemode.Server.Commands { internal class UserCommands : Script { + [Command("id", "~m~Benutzung: ~s~/id")] + public void CmdUserDice(Player player, String targetname) + { + Player target = PlayerService.GetPlayerByNameOrId(targetname); + + if (target == null) + { + player.SendChatMessage("~c~Spieler ist nicht online."); + } else + { + player.SendChatMessage("~c~ID: (" + target.Id + ") " + target.Name); + } + } + [Command("dice", "~m~Benutzung: ~s~/dice")] public void CmdUserDice(Player player) { From 7bfeb23d7999e7a22d7cb34b8d7e30914ac6feab Mon Sep 17 00:00:00 2001 From: balbo Date: Sat, 8 Aug 2020 22:01:49 +0200 Subject: [PATCH 5/6] copy paste ist gekonnt --- ReallifeGamemode.Server/Commands/UserCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 73a149df..de95066b 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -16,7 +16,7 @@ namespace ReallifeGamemode.Server.Commands internal class UserCommands : Script { [Command("id", "~m~Benutzung: ~s~/id")] - public void CmdUserDice(Player player, String targetname) + public void CmdUserId(Player player, String targetname) { Player target = PlayerService.GetPlayerByNameOrId(targetname); From 1157c93a527eb43b53b4dbdc64c2c73590793449 Mon Sep 17 00:00:00 2001 From: balbo Date: Sat, 8 Aug 2020 22:32:55 +0200 Subject: [PATCH 6/6] =?UTF-8?q?bus=20cprange=20erh=C3=B6ht=20+=20sch=C3=B6?= =?UTF-8?q?n=20gemacht=20den=20lachs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Commands/AdminCommands.cs | 1 + ReallifeGamemode.Server/Job/BusDriverJob.cs | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 1cc72d39..da6e4623 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1547,6 +1547,7 @@ namespace ReallifeGamemode.Server.Commands } ServerVehicle veh = VehicleManager.GetServerVehicleFromVehicle(targetVeh); + if (veh != null) { ChatService.ErrorMessage(player, "Dieses Fahrzeug wird von einem Server-System benutzt: ~m~" + veh.GetType().Name); diff --git a/ReallifeGamemode.Server/Job/BusDriverJob.cs b/ReallifeGamemode.Server/Job/BusDriverJob.cs index cb09c192..e0aca217 100644 --- a/ReallifeGamemode.Server/Job/BusDriverJob.cs +++ b/ReallifeGamemode.Server/Job/BusDriverJob.cs @@ -19,6 +19,12 @@ namespace ReallifeGamemode.Server.Job public override string Name => "Busfahrer"; + private const int MARKER_DELAY = 4000; + private const int MARKER_ID = 1; + private const int MARKER_SIZE = 7; + private const int MARKER_DIST = 6; + private const string MARKER_EVENT = "busDriverJob"; + public override bool NeedVehicleToStart => false; private readonly IReadOnlyCollection Skill1Route1 = new List//Bus_Skill_1_Route_1 @@ -257,28 +263,28 @@ namespace ReallifeGamemode.Server.Job { case 1: { - CheckPointHandle.StartCheckPointRoute(player, Skill1Route1, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill1Route1, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 1"); player.SetData("Route", "Skill1Route1"); break; } case 2: { - CheckPointHandle.StartCheckPointRoute(player, Skill1Route2, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill1Route2, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 2"); player.SetData("Route", "Skill1Route2"); break; } case 3: { - CheckPointHandle.StartCheckPointRoute(player, Skill1Route3, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill1Route3, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 3"); player.SetData("Route", "Skill1Route3"); break; } case 4: { - CheckPointHandle.StartCheckPointRoute(player, Skill1Route4, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill1Route4, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 4"); player.SetData("Route", "Skill1Route4"); break; @@ -301,28 +307,28 @@ namespace ReallifeGamemode.Server.Job { case 1: { - CheckPointHandle.StartCheckPointRoute(player, Skill2Route1, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill2Route1, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 1"); player.SetData("Route", "Skill2Route1"); break; } case 2: { - CheckPointHandle.StartCheckPointRoute(player, Skill2Route2, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill2Route2, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 2"); player.SetData("Route", "Skill2Route2"); break; } case 3: { - CheckPointHandle.StartCheckPointRoute(player, Skill2Route3, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill2Route3, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 3"); player.SetData("Route", "Skill2Route3"); break; } case 4: { - CheckPointHandle.StartCheckPointRoute(player, Skill2Route4, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill2Route4, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 4"); player.SetData("Route", "Skill2Route3"); break; @@ -339,28 +345,28 @@ namespace ReallifeGamemode.Server.Job { case 1: { - CheckPointHandle.StartCheckPointRoute(player, Skill3Route1, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill3Route1, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 1"); player.SetData("Route", "Skill3Route1"); break; } case 2: { - CheckPointHandle.StartCheckPointRoute(player, Skill3Route2, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill3Route2, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 2"); player.SetData("Route", "Skill3Route2"); break; } case 3: { - CheckPointHandle.StartCheckPointRoute(player, Skill3Route3, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill3Route3, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 3"); player.SetData("Route", "Skill3Route3"); break; } case 4: { - CheckPointHandle.StartCheckPointRoute(player, Skill3Route4, 4000, 1, 7, 3, true, "busDriverJob"); + CheckPointHandle.StartCheckPointRoute(player, Skill3Route4, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); player.SendChatMessage("~y~Job: ~w~Route wurde gesetzt: ~g~Route 4"); player.SetData("Route", "Skill3Route4"); break;