[+] Jail System

- add Escape
    - add Jail In
    - add Jail Timer
[+] Wanted System
    - add Escape Timer
This commit is contained in:
Lukas Moungos
2019-07-16 21:40:59 +02:00
parent fcf810b567
commit 279b7770c3
10 changed files with 1382 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ using System.Threading;
using GTANetworkAPI;
using ReallifeGamemode.Server.Entities;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Server.Models;
using ReallifeGamemode.Server.Services;
namespace ReallifeGamemode.Server.Wanted
@@ -68,7 +69,12 @@ namespace ReallifeGamemode.Server.Wanted
if (waTimer[user.Id] <= 0)
{
ResetWantedTimeToElapse(player);
user.Wanteds -= 1;
using (var dbContext = new DatabaseContext())
{
player.GetUser(dbContext).Wanteds -= 1;
dbContext.SaveChanges();
}
}
if (!isNearCop)