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

@@ -641,12 +641,12 @@ namespace ReallifeGamemode.Server.Events
{
if (user.GetData<bool>("duty"))
{
player.SendNotification("~r~Im Dienst kannst du keine Kleidung kaufen", false);
NotificationService.SendErrorNotification(player, "Im Dienst kannst du keine Kleidung kaufen", false);
return;
}
if (JobBase.GetPlayerInJob().Contains(player))
{
player.SendNotification("~r~Im aktiven Job kannst du keine Kleidung kaufen", false);
NotificationService.SendErrorNotification(player, "Im aktiven Job kannst du keine Kleidung kaufen", false);
return;
}
nearestClotheShopPoint.clotheShop.LoadShopNUI(player);
@@ -659,12 +659,12 @@ namespace ReallifeGamemode.Server.Events
{
if (user.GetData<bool>("duty"))
{
player.SendNotification("~r~Im Dienst wirst du nicht vom Friseur bedient", false);
NotificationService.SendErrorNotification(player, "Im Dienst wirst du nicht vom Friseur bedient", false);
return;
}
if (JobBase.GetPlayerInJob().Contains(player))
{
player.SendNotification("~r~Im aktiven Job wirst du nicht vom Friseur bedient", false);
NotificationService.SendErrorNotification(player, "Im aktiven Job wirst du nicht vom Friseur bedient", false);
return;
}
nearestFriseurPoint.friseurShop.LoadShopNUI(player);
@@ -673,7 +673,7 @@ namespace ReallifeGamemode.Server.Events
{
if (!user.WeaponLicense)
{
player.SendNotification("~r~Du besitzt keinen Waffenschein");
NotificationService.SendErrorNotification(player, "Du besitzt keinen Waffenschein");
}
else
{
@@ -685,17 +685,17 @@ namespace ReallifeGamemode.Server.Events
//{
// if (user.GetData<bool>("duty"))
// {
// player.SendNotification("~r~Im Dienst kannst du nicht operiert werden", false);
// NotificationService.SendErrorNotification(player, "Im Dienst kannst du nicht operiert werden", false);
// return;
// }
// if (JobBase.GetPlayerInJob().Contains(player))
// {
// player.SendNotification("~r~Im aktiven Job kannst du nicht operiert werden", false);
// NotificationService.SendErrorNotification(player, "Im aktiven Job kannst du nicht operiert werden", false);
// return;
// }
// if (user.Wanteds > 0)
// {
// player.SendNotification("~r~Wenn du gesucht wirst kannst du nicht operiert werden", false);
// NotificationService.SendErrorNotification(player, "Wenn du gesucht wirst kannst du nicht operiert werden", false);
// return;
// }
@@ -751,12 +751,12 @@ namespace ReallifeGamemode.Server.Events
{
if (user.GetData<bool>("duty"))
{
player.SendNotification("~r~Im Dienst kannst du keinen Job ausführen", false);
NotificationService.SendErrorNotification(player, "Im Dienst kannst du keinen Job ausführen", false);
return;
}
if (user.Wanteds > 0)
{
player.SendNotification("~r~Mit Wanteds kannst du keinen Job starten", false);
NotificationService.SendErrorNotification(player, "Mit Wanteds kannst du keinen Job starten", false);
return;
}
if (player.GetUser().JobId == 3)
@@ -779,7 +779,7 @@ namespace ReallifeGamemode.Server.Events
}
else
{
player.SendNotification("~r~[Fehler] ~w~ Du hast diesen Job nicht angenommen.");
NotificationService.SendErrorNotification(player, "Du hast diesen Job nicht angenommen");
return;
}
}
@@ -1030,7 +1030,7 @@ namespace ReallifeGamemode.Server.Events
{
player.ResetData("SellVehicleDecision");
player.ResetData("VehicleToSell");
player.SendNotification("~r~Du hast den Fahrzeugverkauf abgebrochen");
NotificationService.SendErrorNotification(player, "Du hast den Fahrzeugverkauf abgebrochen");
return;
}
@@ -1044,7 +1044,7 @@ namespace ReallifeGamemode.Server.Events
if (NAPI.Entity.GetEntityVelocity(v).Length() > 1 && v.Class != 16)
{
player.SendNotification("~r~Der Motor kann nur im Stand betätigt werden.", true);
NotificationService.SendErrorNotification(player, "Der Motor kann nur im Stand betätigt werden", true);
return;
}
@@ -1071,7 +1071,7 @@ namespace ReallifeGamemode.Server.Events
}
else if (!fV.GetOwners().Contains(u.FactionId ?? 0) && !state && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()))
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
NotificationService.SendErrorNotification(player, "Du hast keinen Schlüssel");
return;
}
}
@@ -1079,7 +1079,7 @@ namespace ReallifeGamemode.Server.Events
{
if (gV.GroupId != u.Group.Id && !state && !u.IsAdmin(AdminLevel.ADMIN3) && player.IsAdminDuty())
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
NotificationService.SendErrorNotification(player, "Du hast keinen Schlüssel");
return;
}
}
@@ -1087,7 +1087,7 @@ namespace ReallifeGamemode.Server.Events
{
if (jV.JobId != player.GetUser().JobId && !state && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()))
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
NotificationService.SendErrorNotification(player, "Du hast keinen Schlüssel");
return;
}
else
@@ -1106,7 +1106,7 @@ namespace ReallifeGamemode.Server.Events
}
else if (uV.UserId != u.Id && !u.IsAdmin(AdminLevel.HEADADMIN))
{
player.SendNotification("~r~Du hast keinen Schlüssel.");
NotificationService.SendErrorNotification(player, "Du hast keinen Schlüssel");
return;
}
}