From b4f4bb4622bd17941d743e73e23e68d7f9bc2aea Mon Sep 17 00:00:00 2001 From: Lukas Moungos Date: Sun, 15 Dec 2019 16:22:43 +0100 Subject: [PATCH] Added Blip Color on /ainvite and /makeleader --- .../Commands/AdminCommands.cs | 33 +++++++++++++++++++ ReallifeGamemode.Server/Wanted/Jail.cs | 5 +-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 0d70c1b4..d71b4205 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1707,7 +1707,22 @@ namespace ReallifeGamemode.Server.Commands } u.FactionLeader = false; + switch (u.FactionId) + { + case null: + target.SetSharedData("blipColor", 0); + break; + case 8: + target.SetSharedData("blipColor", 83); + break; + case 7: + target.SetSharedData("blipColor", 52); + break; + case 4: + target.SetSharedData("blipColor", 5); + break; + } dbContext.SaveChanges(); } } @@ -1748,6 +1763,24 @@ namespace ReallifeGamemode.Server.Commands ChatService.SendMessage(player, "~b~[ADMIN]~s~ Du hast hast den Spieler ~y~" + target.Name + "~s~ zum Leader der Fraktion ~o~" + f.Name + "~s~ ernannt."); ChatService.SendMessage(target, "~b~[ADMIN]~s~ Du wurdest von ~y~" + player.Name + "~s~ zum Leader der Fraktion ~o~" + f.Name + "~s~ ernannt."); + u.FactionLeader = false; + switch (u.FactionId) + { + case null: + target.SetSharedData("blipColor", 0); + break; + case 8: + target.SetSharedData("blipColor", 83); + break; + case 7: + target.SetSharedData("blipColor", 52); + break; + case 4: + target.SetSharedData("blipColor", 5); + break; + + } + dbContext.SaveChanges(); } } diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index f785f16c..13bb25a9 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -78,7 +78,7 @@ namespace ReallifeGamemode.Server.Wanted int timeMinutes = 0; - if (((int)(user.JailTime / 60)) == 0 && user.JailTime != 0) + if (((int)(user.JailTime / 60)) <= 1 && user.JailTime != 0) { timeMinutes = 1; } @@ -186,7 +186,8 @@ namespace ReallifeGamemode.Server.Wanted if (user.JailTime <= 0) { Jailtime.Remove(user.Id); - player.Position = new Vector3(461.7256, -988.6035, 24.91487); + player.Position = new Vector3(461.7256, -988.6035, 24.91487); + player.TriggerEvent("jailTime", 0); return; } if (user.JailTime > 0)