[+] New Feature in Wanted System
+ Autowanted System (only cop murder) * Fix: rejail after breakout * Fix: typo in /wa Command
This commit is contained in:
31
ReallifeGamemode.Server/Wanted/Autowanted.cs
Normal file
31
ReallifeGamemode.Server/Wanted/Autowanted.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Server.Entities;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Models;
|
||||
|
||||
namespace ReallifeGamemode.Server.Wanted
|
||||
{
|
||||
public class Autowanted
|
||||
{
|
||||
public static void Check_AutoWanted(Client killerPlayer, Client copPlayer)
|
||||
{
|
||||
User killer = killerPlayer.GetUser();
|
||||
if(killer.FactionId != 1 || killer.FactionId != 3)
|
||||
{
|
||||
User cop = copPlayer.GetUser();
|
||||
if(cop.FactionId == 1 || cop.FactionId == 3)
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
killer = killerPlayer.GetUser(dbContext);
|
||||
killer.GiveWanteds(copPlayer, 10, "Beamten-Mord");
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user