add selbsteinknasten

This commit is contained in:
michael.reiswich
2021-05-25 15:28:41 +02:00
parent 9fe9cb1466
commit d58a19033d
3 changed files with 58 additions and 2 deletions

View File

@@ -134,8 +134,10 @@ namespace ReallifeGamemode.Server.Wanted
if (user.JailTime <= 0)
{
Jailtime.Remove(user.Id);
user.Wanteds = 0;
player.SafeTeleport(JailOut_Point);
player.TriggerEvent("jailTime", 0);
dbContext.SaveChanges();
return;
}
if (user.JailTime > 0)
@@ -175,6 +177,7 @@ namespace ReallifeGamemode.Server.Wanted
using (var dbContext = new DatabaseContext())
{
player.GetUser(dbContext).JailTime = 0;
player.GetUser(dbContext).Wanteds = 0;
dbContext.SaveChanges();
}
player.SafeSetHealth(100);
@@ -195,6 +198,7 @@ namespace ReallifeGamemode.Server.Wanted
Jailtime.Remove(user.Id);
user.JailTime = 0;
user.Wanteds = 0;
dbContext.SaveChanges();
target.SafeSetHealth(100);