From afa3348854826b7dcdcc72c5498e6b3187c7033b Mon Sep 17 00:00:00 2001 From: Lukas Moungos Date: Sun, 15 Dec 2019 14:55:02 +0100 Subject: [PATCH] fix Wanted Blip color --- ReallifeGamemode.Server/Wanted/Jail.cs | 2 +- .../Wanted/WantedEscapeTimer.cs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index 11bd0769..f785f16c 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -88,7 +88,7 @@ namespace ReallifeGamemode.Server.Wanted } client.TriggerEvent("jailTime", timeMinutes); - ChatService.SendMessage(client, "!{#FF614A}* Du bist nun im Gefängnis für " + jailTime + " Sekunden."); + ChatService.SendMessage(client, "!{#FF614A}* Du bist nun im Gefängnis für " + timeMinutes + " Minute/n."); ChatService.BroadcastFaction("!{#8181E9}HQ: " + user.Name + " wurde ins Gefängnis geliefert.", new List() { 1, 3 }); switch (user.FactionId) { diff --git a/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs b/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs index a9e057bc..cf6027e7 100644 --- a/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs +++ b/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs @@ -70,6 +70,24 @@ namespace ReallifeGamemode.Server.Wanted using (var dbContext = new DatabaseContext()) { player.GetUser(dbContext).Wanteds -= 1; + if(player.GetUser(dbContext).Wanteds == 0) + { + switch (player.GetUser(dbContext).FactionId) + { + case null: + player.SetSharedData("blipColor", 0); + break; + case 8: + player.SetSharedData("blipColor", 83); + break; + case 7: + player.SetSharedData("blipColor", 52); + break; + case 4: + player.SetSharedData("blipColor", 5); + break; + } + } dbContext.SaveChanges(); }