diff --git a/ReallifeGamemode.Client/Gui/wanteds.ts b/ReallifeGamemode.Client/Gui/wanteds.ts index 3a33f5eb..2b04bbfc 100644 --- a/ReallifeGamemode.Client/Gui/wanteds.ts +++ b/ReallifeGamemode.Client/Gui/wanteds.ts @@ -4,4 +4,8 @@ mp.events.add("SERVER:SetWanteds", (count: number) => { browser.execute(`setWanteds(${count});`); }); + + mp.events.add("SERVER:SetWantedFlash", (flash) => { + browser.execute(`setFlashing(${flash});`); + }); } \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/wanteds/index.html b/ReallifeGamemode.Client/assets/html/wanteds/index.html index c374c5a1..dc979115 100644 --- a/ReallifeGamemode.Client/assets/html/wanteds/index.html +++ b/ReallifeGamemode.Client/assets/html/wanteds/index.html @@ -1,60 +1,99 @@  - - - Wanteds - - + #wanteds img { + width: 25px; + height: 25px; + margin-right: 5px; + filter: drop-shadow(0px 0px 1px #000000); + -webkit-filter: drop-shadow(0px 0px 1px #000000); + -moz-filter: drop-shadow(0px 0px 1px #000000); + } + + #wanteds span { + color: white; + font-family: "Pricedown", sans-serif; + font-size: 2.5em; + line-height: 1; + -webkit-text-stroke: 1px black; + margin-top: -5px; + } + - + - - + + \ No newline at end of file diff --git a/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs b/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs index 16786f60..530e4741 100644 --- a/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs +++ b/ReallifeGamemode.Server/Wanted/WantedEscapeTimer.cs @@ -27,12 +27,8 @@ namespace ReallifeGamemode.Server.Wanted } */ - public static void ResetWantedTimeToElapse(Player client) + public static void ResetWantedTimeToElapse(User user) { - User user = client.GetUser(); - if (user.FactionId == 1 || user.FactionId == 3) - return; - waTimer[user.Id] = WantedEscapeTime; } @@ -45,7 +41,7 @@ namespace ReallifeGamemode.Server.Wanted if (user != null && user.Wanteds > 0) { if (!waTimer.ContainsKey(user.Id)) - ResetWantedTimeToElapse(player); + ResetWantedTimeToElapse(user); bool isNearCop = false; foreach (var playerCop in NAPI.Pools.GetAllPlayers()) @@ -70,7 +66,7 @@ namespace ReallifeGamemode.Server.Wanted if (waTimer[user.Id] <= 0) { - ResetWantedTimeToElapse(player); + ResetWantedTimeToElapse(user); player.SendChatMessage("~y~Du hast erfolgreich einen Wanted abgetaucht."); user.Wanteds -= 1; if (user.Wanteds == 0) @@ -82,7 +78,15 @@ namespace ReallifeGamemode.Server.Wanted waTimer[user.Id] = WantedEscapeTime; } else if (!isNearCop) + { + player.TriggerEvent("SERVER:SetWantedFlash", true); waTimer[user.Id] -= 2500; + } + else if (isNearCop) + { + player.TriggerEvent("SERVER:SetWantedFlash", false); + ResetWantedTimeToElapse(user); + } } } }