fix jailtime
This commit is contained in:
@@ -48,9 +48,9 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
User cop = copClient.GetUser();
|
||||
if (cop?.FactionId == 1 || cop?.FactionId == 3)
|
||||
{
|
||||
int jailTime = user.Wanteds * 54;
|
||||
if (cop.GetData<bool>("duty") && copClient.Position.DistanceTo2D(client.Position) <= 200 && (!copClient.HasData("isDead") || copClient.GetData("isDead") != true))
|
||||
{
|
||||
int jailTime = user.Wanteds * 54; ;
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
if (!client.HasData("isDead") || client.GetData("isDead") == false)
|
||||
@@ -84,13 +84,11 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
client.Health = 100;
|
||||
|
||||
ChatService.SendMessage(client, "Du bist im Gefängnis für " + jailTime + " Sekunden.");
|
||||
ChatService.BroadcastFaction("~r~HQ: " + user.Name + " wurde ins Gefängnis geliefert.", new List<int>() {1,3});
|
||||
ChatService.BroadcastFaction("~r~HQ: " + user.Name + " wurde ins Gefängnis geliefert.", new List<int>() { 1, 3 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void JailTimer()
|
||||
{
|
||||
System.Timers.Timer timer = new System.Timers.Timer(60000);
|
||||
|
||||
Reference in New Issue
Block a user