reset wanted escape timer when abtauchen
This commit is contained in:
@@ -15,6 +15,8 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
{
|
||||
public class WantedEscapeTimer
|
||||
{
|
||||
private const int WantedEscapeTime = 300000;
|
||||
|
||||
public static Dictionary<int, int> waTimer { get; set; } = new Dictionary<int, int>(); //zeit in ms
|
||||
/*
|
||||
public static void WantedTimer()
|
||||
@@ -31,7 +33,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
if (user.FactionId == 1 || user.FactionId == 3)
|
||||
return;
|
||||
|
||||
waTimer[user.Id] = 300000;
|
||||
waTimer[user.Id] = WantedEscapeTime;
|
||||
}
|
||||
|
||||
public static void Timer_Elapsed()
|
||||
@@ -77,9 +79,9 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
user.SetBlipAndNametagColor();
|
||||
}
|
||||
dbContext.SaveChanges();
|
||||
waTimer[user.Id] = WantedEscapeTime;
|
||||
}
|
||||
|
||||
if (!isNearCop)
|
||||
else if (!isNearCop)
|
||||
waTimer[user.Id] -= 2500;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user