This commit is contained in:
2021-04-28 00:39:55 +02:00
parent c26d477557
commit 4403f0c238
5 changed files with 52 additions and 19 deletions

View File

@@ -103,7 +103,7 @@ namespace ReallifeGamemode.Server.Extensions
int factionMoney = user.Wanteds * 6;
var executiveFactions = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 1 || f.Id == 3);
foreach(var faction in executiveFactions)
foreach (var faction in executiveFactions)
{
faction.BankAccount.Balance += factionMoney;
}
@@ -224,8 +224,7 @@ namespace ReallifeGamemode.Server.Extensions
dbUser.SetBlipAndNametagColor();
dbContext.SaveChanges();
}
ChatService.SendMessage(user.Player, "!{#FF614A}Du hast ein Verbrechen begangen: " + reason + "" + (cop != null ? " | Gemeldet von: " + cop.Name + "." : ""));
ChatService.SendMessage(user.Player, " !{#FFFF00}Fahndungslevel:~s~ " + newWanteds);
user.Player.TriggerEvent("BN_ShowWithPicture", "Straftat", cop != null ? "Officer " + cop.Name + "" : "LSPD", "Du hast ein Verbrechen begangen: " + reason + ".'\n' Fahndungslevel: " + newWanteds, "DIA_POLICE", 1, true, 15);
foreach (var copPlayer in NAPI.Pools.GetAllPlayers())
{

View File

@@ -21,10 +21,10 @@ namespace ReallifeGamemode.Server.Wanted
using var dbContext = new DatabaseContext();
User user = player.GetUser(dbContext);
if (user.Wanteds <= 0)
if (user.Wanteds <= 0)
return;
player.SendChatMessage("~y~Du hast erfolgreich einen Wanted abgetaucht.");
player.TriggerEvent("BN_ShowWithPicture", "Abgetaucht", "Lester", "Du hast erfolgreich ein Wanted ~y~abgetaucht", "CHAR_LESTER", 1, true);
user.Wanteds -= 1;
if (user.Wanteds == 0)
{