Wanted: Bei Einsperren 6$ pro Wanted je an PD/FIB Kasse
This commit is contained in:
@@ -88,7 +88,7 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
player.Armor = armor;
|
||||
}
|
||||
|
||||
public static void SetJailTime(this User user, bool killed)
|
||||
public static void SetJailTime(this User user, bool killed, DatabaseContext dbContext)
|
||||
{
|
||||
if (user == null)
|
||||
{
|
||||
@@ -101,6 +101,13 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
time *= 2;
|
||||
}
|
||||
|
||||
int factionMoney = user.Wanteds * 6;
|
||||
var executiveFactions = dbContext.Factions.Where(f => f.Id == 1 || f.Id == 3);
|
||||
foreach(var faction in executiveFactions)
|
||||
{
|
||||
faction.BankAccount.Balance += factionMoney;
|
||||
}
|
||||
|
||||
user.Wanteds = 0;
|
||||
user.JailTime = time;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user