Strafpunkte-Notification angepasst dies das

This commit is contained in:
Luke
2021-04-25 20:02:45 +00:00
parent 8187cbf768
commit 63a7261f33

View File

@@ -603,16 +603,16 @@ namespace ReallifeGamemode.Server.Managers
{ {
if (amount > 0 && amount <= 10000) if (amount > 0 && amount <= 10000)
{ {
player.SendNotification($"~w~Du hast ~y~{targetname} ~w~ein Ticket in Höhe von ~b~{amount}$ ~w~gestellt. Grund: ~g~{reason}~w~."); player.SendNotification($"~w~Du hast ~y~{targetname} ~w~ein Ticket in Höhe von ~b~${amount} ~w~ausgestellt. Grund: ~g~{reason}~w~.");
target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ein Ticket in Höhe von ~y~{amount}$ ~w~gestellt.", true); target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} {playername} ~w~hat dir ein Ticket in Höhe von ~y~${amount} ~w~ausgestellt.", true);
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Strafticket im Interaktionsmenü annehmen.", true); target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Das Ticket kann im Interaktionsmenü angenommen werden.", true);
target.SetData("ticket_boolean", true); target.SetData("ticket_boolean", true);
target.SetData<int>("ticket_amount", amount); target.SetData<int>("ticket_amount", amount);
target.SetData<Player>("ticket_player", player); target.SetData<Player>("ticket_player", player);
} }
else else
{ {
player.SendNotification("~r~Du kannst nur zwischen 1$ und 10000$ angeben!"); player.SendNotification("~r~Du kannst nur zwischen $1 und $10.000 angeben!");
} }
} }
} }
@@ -668,7 +668,7 @@ namespace ReallifeGamemode.Server.Managers
targetUser.Points += amount; targetUser.Points += amount;
player.SendNotification($"~w~Du hast ~y~{targetname} ~b~{amount} ~w~Strafpunkte gegeben. Grund: ~g~{reason}~w~."); 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 (Grund: ~r~{reason}~w~).", true); target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben (Grund: ~r~{reason}~w~).", true);
ChatService.HQMessage(targetname + " hat von " + playername + " " + amount + " Strafpunkt(e) erhalten (Grund: " + reason + "). Gesamt: " + targetUser.Points); ChatService.HQMessage(targetname + " hat von " + playername + " " + amount + " Strafpunkt(e) erhalten (Grund: " + reason + "). Gesamt: " + targetUser.Points);
if (targetUser.Points < 0) if (targetUser.Points < 0)
@@ -677,9 +677,7 @@ namespace ReallifeGamemode.Server.Managers
} }
else if (targetUser.Points >= 12) else if (targetUser.Points >= 12)
{ {
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~r~12/12 ~x~Strafpunkten.", true); target.SendNotification($"~x~Du hast nun ~r~12/12 ~x~Strafpunkte. ~w~Dir wurde dein ~r~Auto- und dein Motorradführerschein ~w~entzogen.", true);
target.SendNotification($"~w~Dir wird ~r~Auto- ~w~und ~r~Motorradführerschein ~w~entzogen.", true); //FlashNotif
ChatService.HQMessage(targetname + " besitzt nun keinen Führerschein mehr."); ChatService.HQMessage(targetname + " besitzt nun keinen Führerschein mehr.");
targetUser.Points = 0; targetUser.Points = 0;
@@ -688,7 +686,7 @@ namespace ReallifeGamemode.Server.Managers
} }
else else
{ {
target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~y~{targetUser.Points}/12 ~x~Strafpunkten.", true); target.SendNotification($"~x~Du hast nun ~y~{targetUser.Points}/12 ~x~Strafpunkt(e).", true);
} }
dbContext.SaveChanges(); dbContext.SaveChanges();