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