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 1/7] 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 2/7] 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")] From 967ff86006527449b586c4c9b3bc326d4806eee6 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Sun, 4 Apr 2021 00:00:18 +0200 Subject: [PATCH 3/7] Edit /help --- ReallifeGamemode.Server/Commands/UserCommands.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 00412237..18f78cb2 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -90,12 +90,14 @@ namespace ReallifeGamemode.Server.Commands [Command("help", "~m~Benutzung: ~s~/help")] public void CmdHelp(Player player) { + player.SendChatMessage("E - Interagieren (ATM, Türen, Shops, Friseur etc."); player.SendChatMessage("M - Interaktionsmenü öffnen und schließen"); player.SendChatMessage("X - Fahrzeug auf -/ abschließen sowie im Fahrzeuginteraktionsmenü öffnen"); player.SendChatMessage("N - Fahrzeugmotor Starten"); player.SendChatMessage("O - Onlineliste öffnen / schließen"); player.SendChatMessage("I - Inventar öffnen / schließen"); player.SendChatMessage("F4 - Mikrofon an/aus schalten"); + player.SendChatMessage("/skill - Skillpunkte anzeigen"); } [Command("hup")] From 9e5c23ce339fb6723f9c0bfe3ef21b9dd78f9190 Mon Sep 17 00:00:00 2001 From: kookroach <62265045+kookroach@users.noreply.github.com> Date: Sun, 4 Apr 2021 00:06:16 +0200 Subject: [PATCH 4/7] Test new Finance --- ReallifeGamemode.Server/Finance/Economy.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Finance/Economy.cs b/ReallifeGamemode.Server/Finance/Economy.cs index 6cb10cb9..e57261b6 100644 --- a/ReallifeGamemode.Server/Finance/Economy.cs +++ b/ReallifeGamemode.Server/Finance/Economy.cs @@ -25,7 +25,7 @@ namespace ReallifeGamemode.Server.Finance public static (int, float, float) GetEconomyClass(Player client, int wage) { int bankAccount = client.GetUser().BankAccount.Balance; - float financialHelp = -(float)Math.Pow(1.0005, -bankAccount) * -1000; + float financialHelp = -(float)Math.Pow(1.0005, -(bankAccount + client.GetUser().Handmoney)) * -1000; float financialInterest = 1 - (float)Math.Pow(1.00006, -wage) * 1; if (financialInterest >= 0.7) financialInterest = 0.7f; @@ -77,7 +77,7 @@ namespace ReallifeGamemode.Server.Finance int vehicleTaxation = GetVehicleTaxation(client); int rentalFees = GetRentalFees(client); - int healthInsurance = (int)(user.BankAccount.Balance * 0.001); + int healthInsurance = (int)((bankAccount + user.Handmoney)* 0.001); if (healthInsurance < 0) { healthInsurance = 0; From f713f3b528c76b24cb7212041fffea6ad6b6aa84 Mon Sep 17 00:00:00 2001 From: kookroach <62265045+kookroach@users.noreply.github.com> Date: Sun, 4 Apr 2021 00:09:34 +0200 Subject: [PATCH 5/7] test push --- ReallifeGamemode.Server/Finance/Economy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Finance/Economy.cs b/ReallifeGamemode.Server/Finance/Economy.cs index e57261b6..5db81d0e 100644 --- a/ReallifeGamemode.Server/Finance/Economy.cs +++ b/ReallifeGamemode.Server/Finance/Economy.cs @@ -108,7 +108,7 @@ namespace ReallifeGamemode.Server.Finance public static void ReleasePayDay(Player client, Paycheck paycheck, bool minusJail) { - NAPI.Util.ConsoleOutput("in release payday"); + NAPI.Util.ConsoleOutput("in release payday."); if (client == null || paycheck == null) { return; From c7d9045ebf4e9301d47971500c626548886a4ee0 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Sun, 4 Apr 2021 00:33:26 +0200 Subject: [PATCH 6/7] Bus Test 1 --- ReallifeGamemode.Server/Job/BusDriverJob.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Job/BusDriverJob.cs b/ReallifeGamemode.Server/Job/BusDriverJob.cs index e920bc2e..82149c21 100644 --- a/ReallifeGamemode.Server/Job/BusDriverJob.cs +++ b/ReallifeGamemode.Server/Job/BusDriverJob.cs @@ -620,7 +620,7 @@ namespace ReallifeGamemode.Server.Job } } }*/ - }, delayTime: 30000); + }, delayTime: 10000); } } } From 95ce04dc04f6449f0e2abc04a9d9840b26dc5f2c Mon Sep 17 00:00:00 2001 From: VegaZ Date: Sun, 4 Apr 2021 01:35:42 +0200 Subject: [PATCH 7/7] Fix Broadcast Faction --- ReallifeGamemode.Server/Services/ChatService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Services/ChatService.cs b/ReallifeGamemode.Server/Services/ChatService.cs index 7ee17107..d552bb3e 100644 --- a/ReallifeGamemode.Server/Services/ChatService.cs +++ b/ReallifeGamemode.Server/Services/ChatService.cs @@ -65,10 +65,10 @@ namespace ReallifeGamemode.Server.Services ChatService.SendMessage(c, message); } } - else if(user.IsAdmin(AdminLevel.ADMIN) && toAdmins) + /*else if(user.IsAdmin(AdminLevel.ADMIN) && toAdmins) { ChatService.SendMessage(c, message); - } + }*/ } }