From 43bae1d4d451e429a25f2ba4168966814d5d4130 Mon Sep 17 00:00:00 2001 From: Siga Date: Tue, 17 Mar 2020 16:38:19 +0100 Subject: [PATCH] Fix jailtime on interface --- ReallifeGamemode.Server/Wanted/Jail.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index 1cd10028..a00f9f98 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -34,6 +34,17 @@ namespace ReallifeGamemode.Server.Wanted if (rndInt == 3) NAPI.Player.SpawnPlayer(client, new Vector3(458.3372, -1001.258, 24.91485)); //send client to jail Jailtime[user.Id] = user.JailTime; // 54 sec for each wanted star -> in total 45min for 50 Wanteds + int timeMinutes = 0; + + if (((int)(user.JailTime / 60)) <= 1 && user.JailTime != 0) + { + timeMinutes = 1; + } + else + { + timeMinutes = (int)(user.JailTime / 60); + } + client.TriggerEvent("jailTime", timeMinutes); return; } if (user.Wanteds <= 0)