NotificationService für Fehler rein

This commit is contained in:
Luke
2021-07-05 11:33:04 +02:00
parent f70218e85a
commit 84c3a84ed0
10 changed files with 111 additions and 103 deletions

View File

@@ -90,13 +90,13 @@ namespace ReallifeGamemode.Server.Job
if (player.HasData("hasPassager"))
{
User target = dbContext.Users.Where(u => u.Id == targetId).FirstOrDefault();
player.SendNotification("~r~[Info] ~w~ Dein Kunde hat kein Geld mehr auf der Hand.");
NotificationService.SendErrorNotification(player, "Dein Kunde hat kein Geld mehr auf der Hand");
if ((target.Handmoney - amount) <= 0)
{
Player targetmoney = PlayerService.GetPlayerByNameOrId(Convert.ToString(targetId));
targetmoney.SendNotification("~r~[Fehler] ~w~ Du hast kein Geld mehr auf der Hand.");
player.SendNotification("~r~[Fehler] ~w~ Dein Fahrgast kann dich nicht mehr bezahlen.");
NotificationService.SendErrorNotification(player, "Dein Fahrgast kann dich nicht mehr bezahlen");
player.TriggerEvent("CLIENT:cancelFare");
targetmoney.TriggerEvent("CLIENT:cancelFareCustomer");
targetmoney.WarpOutOfVehicle();