From a03b924a9629702fd0106f9f9134e0d5ff954178 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 3 Apr 2021 23:37:28 +0200 Subject: [PATCH 1/3] fix lc ga --- ReallifeGamemode.Server/Commands/FactionCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index c5668041..dffffd3d 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -46,7 +46,7 @@ namespace ReallifeGamemode.Server.Commands { User user = player.GetUser(); Faction f = user?.Faction; - if (f == null || f.StateOwned) + if ((f == null || f.StateOwned) && !user.IsAdmin(AdminLevel.ADMIN)) { ChatService.NotAuthorized(player); return; @@ -180,7 +180,7 @@ namespace ReallifeGamemode.Server.Commands public void CmdFactionLc(Player player, string message) { User user = player.GetUser(); - if (user?.FactionId == null || user.FactionLeader == false || !user.IsAdmin(AdminLevel.ADMIN)) + if ((user?.FactionId == null || user.FactionLeader == false) && !user.IsAdmin(AdminLevel.ADMIN)) { ChatService.NotAuthorized(player); return; From 5c8523a313e1ca4c8cf2d7d74ec0dbf0585aeeb2 Mon Sep 17 00:00:00 2001 From: kookroach <62265045+kookroach@users.noreply.github.com> Date: Sat, 3 Apr 2021 23:41:21 +0200 Subject: [PATCH 2/3] possible hup fix --- ReallifeGamemode.Server/Commands/UserCommands.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 00412237..5952b082 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -101,6 +101,7 @@ namespace ReallifeGamemode.Server.Commands [Command("hup")] public void CmdAnim(Player player) { + player.StopAnimation(); player.PlayAnimation("mp_am_hold_up", "handsup_base", (int)(AnimationFlags.Loop | AnimationFlags.OnlyAnimateUpperBody | AnimationFlags.AllowPlayerControl | AnimationFlags.Cancellable)); } From a346ae97c3c994bf705f74e54469f75b7dc02696 Mon Sep 17 00:00:00 2001 From: kookroach <62265045+kookroach@users.noreply.github.com> Date: Sat, 3 Apr 2021 23:53:32 +0200 Subject: [PATCH 3/3] Fix Wantedlist --- .../Managers/InteractionManager.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 45cda73d..ae4656a1 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -795,20 +795,20 @@ namespace ReallifeGamemode.Server.Managers { if (!player.IsLoggedIn()) return; List players = NAPI.Pools.GetAllPlayers(); - if (player.GetUser().Wanteds > 0) - { + var listPlayers = players.Select(p => new { Id = p.Handle.Value, p.Name, wanted = p.GetUser().Wanteds, }) ; - player.TriggerEvent("showWantedlist", JsonConvert.SerializeObject(listPlayers)); - } - else - { - player.SendNotification("~r~[Fehler] ~w~Es gibt derzeitig keine Verbrecher!"); - } + + if(listPlayers.Count() > 0) + player.TriggerEvent("showWantedlist", JsonConvert.SerializeObject(listPlayers)); + else + player.SendNotification("~r~[Fehler] ~w~Es gibt derzeitig keine Verbrecher!"); + + } [RemoteEvent("CLIENT:InteractionMenu_FindHouse")]