Sanis Aufzug, Waffenschein Geld für Fraks, HQ Message

This commit is contained in:
VegaZ
2021-04-04 23:34:19 +02:00
parent 704e4e9a07
commit 5ba74a4c97
3 changed files with 8 additions and 8 deletions

View File

@@ -50,8 +50,8 @@ namespace ReallifeGamemode.Server.Core.Menus
player.SendMessage("Du hast den Waffenschein erfolgreich erworben.", ChatPrefix.Info);
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 1).First().BankAccount.Balance += 2500;
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 3).First().BankAccount.Balance += 2500;
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 1).First().BankAccount.Balance += 1000;
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 3).First().BankAccount.Balance += 1000;
user.WeaponLicense = true;
dbContext.SaveChanges();

View File

@@ -201,7 +201,7 @@ namespace ReallifeGamemode.Server.Events
DutyPoint nearestDuty = PositionManager.DutyPoints.Find(d => d.Position.DistanceTo(player.Position) <= 1.5 && d.FactionId == user.FactionId);
WeaponPoint nearestWeapon = PositionManager.WeaponPoints.Find(w => w.Position.DistanceTo(player.Position) <= 1.5 && w.FactionId == user.FactionId);
JailReleasePoint nearestJailReleasePoint = PositionManager.JailReleasePoints.Find(j => j.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 3) && user.GetData<bool>("duty"));
ElevatorPoint nearestElevatorPoint = PositionManager.ElevatorPoints.Find(e => e.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 3));
ElevatorPoint nearestElevatorPoint = PositionManager.ElevatorPoints.Find(e => e.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 2 || user.FactionId == 3));
ClotheshopPoint nearestClotheShopPoint = PositionManager.clotheshopPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5 && (!user.GetData<bool>("duty")));
FriseurPoint nearestFriseurPoint = PositionManager.friseurPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5 && (!user.GetData<bool>("duty")));
ItemshopPoint nearestItemShopPoint = PositionManager.itemshopPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5);

View File

@@ -640,7 +640,7 @@ namespace ReallifeGamemode.Server.Managers
}
player.SendNotification($"~w~Du hast ~y~{targetname} ~b~{amount} ~w~Strafpunkte gegeben. Grund: ~g~{reason}~w~.");
target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben.", true);
ChatService.BroadcastFaction("~y~" + targetname + "~b~ hat von ~g~" + playername + " ~y~" + amount + " ~b~Strafpunkt erhalten. Gesamt: ~y~" + target.GetUser().Points, new List<int>() { 1, 3 });
ChatService.BroadcastFaction("!{#8181E9}HQ: " + targetname + " hat von " + playername + " " + amount + " Strafpunkt(e) erhalten. Gesamt: " + target.GetUser().Points, new List<int>() { 1, 3 });
if (target.GetUser().Points < 0)
{
using (var dbContext = new DatabaseContext())
@@ -653,8 +653,8 @@ namespace ReallifeGamemode.Server.Managers
else if (target.GetUser().Points >= 12)
{
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~r~12/12 ~x~Strafpunkten.", true);
target.SendNotification($"~w~Dir wird ~r~Auto- ~w~und ~r~Motorradführerschein ~w~entzogen.", true);
ChatService.BroadcastFaction("~y~" + targetname + "~b~ hat von ~g~" + playername + " ~y~" + amount + " ~b~Strafpunkt erhalten. Gesamt: ~y~" + target.GetUser().Points, new List<int>() { 1, 3 });
target.SendNotification($"~w~Dir wird ~r~Auto- ~w~und ~r~Motorradführerschein ~w~entzogen.", true); //FlashNotif
ChatService.HQMessage(targetname + "hat von" + playername + " " + amount + " Strafpunkt erhalten(e). Gesamt: " + target.GetUser().Points);
foreach (var copPlayer in NAPI.Pools.GetAllPlayers())
{
User copUser = copPlayer.GetUser();
@@ -667,7 +667,7 @@ namespace ReallifeGamemode.Server.Managers
{
if (copUser.GetData<bool>("duty") == true)
{
ChatService.SendMessage(copPlayer, "!{#8181E9}HQ: " + targetname + " besitzt nun keinen Führerschein mehr.");
ChatService.HQMessage(targetname + " besitzt nun keinen Führerschein mehr.");
}
}
}
@@ -687,7 +687,7 @@ namespace ReallifeGamemode.Server.Managers
}
else
{
player.SendNotification("~r~Du kannst nur zwischen 1 und 8 Punkte verteilen!");
player.SendNotification("~r~Du kannst nur zwischen 1 und 12 Punkte verteilen!");
}
}
}