Miese Corona Zeiten push für Lenhardt

This commit is contained in:
Siga
2020-05-10 19:19:53 +02:00
parent 15e4cec8ee
commit efbff34c21
159 changed files with 8042 additions and 8695 deletions

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using GTANetworkAPI;
using GTANetworkAPI;
using ReallifeGamemode.Database.Entities;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Extensions;
@@ -9,25 +6,24 @@ using ReallifeGamemode.Server.Extensions;
namespace ReallifeGamemode.Server.Wanted
{
public class Autowanted
{
public static void Check_AutoWanted(Player killerPlayer, Player copPlayer)
{
User killer = killerPlayer.GetUser();
if (killer.FactionId == 1 || killer.FactionId == 3)
return;
User cop = copPlayer.GetUser();
if (!cop.GetData<bool>("duty")) return;
if (cop.FactionId == 1 || cop.FactionId == 3)
{
using (var dbContext = new DatabaseContext())
public static void Check_AutoWanted(Player killerPlayer, Player copPlayer)
{
killer = killerPlayer.GetUser(dbContext);
killer.GiveWanteds(copPlayer, 10, "Beamten-Mord");
dbContext.SaveChanges();
}
}
User killer = killerPlayer.GetUser();
if (killer.FactionId == 1 || killer.FactionId == 3)
return;
User cop = copPlayer.GetUser();
if (!cop.GetData<bool>("duty")) return;
if (cop.FactionId == 1 || cop.FactionId == 3)
{
using (var dbContext = new DatabaseContext())
{
killer = killerPlayer.GetUser(dbContext);
killer.GiveWanteds(copPlayer, 10, "Beamten-Mord");
dbContext.SaveChanges();
}
}
}
}
}
}