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

@@ -10,6 +10,7 @@ using ReallifeGamemode.Server.Util;
using ReallifeGamemode.Server.WeaponDeal;
using ReallifeGamemode.Server.Managers;
using ReallifeGamemode.Server.Job;
using ReallifeGamemode.Server.Services;
namespace ReallifeGamemode.Server.Events
{
@@ -37,7 +38,7 @@ namespace ReallifeGamemode.Server.Events
return;
}
player.StopAnimation();
player.SendNotification("~r~Du darfst dieses Fahrzeug nicht benutzen!", true);
NotificationService.SendErrorNotification(player, "Du darfst dieses Fahrzeug nicht benutzen!", true);
return;
}
}
@@ -46,7 +47,7 @@ namespace ReallifeGamemode.Server.Events
if (jveh.JobId != player.GetUser().JobId && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()))
{
player.StopAnimation();
player.SendNotification("~r~Du darfst dieses Fahrzeug nicht benutzen!", true);
NotificationService.SendErrorNotification(player, "Du darfst dieses Fahrzeug nicht benutzen!", true);
return;
}
else if (u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty())
@@ -89,13 +90,13 @@ namespace ReallifeGamemode.Server.Events
if (!player.HasData("ActiveSchool") && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()))
{
player.StopAnimation();
player.SendNotification("~r~Du darfst dieses Fahrzeug nicht benutzen!", true);
NotificationService.SendErrorNotification(player, "Du darfst dieses Fahrzeug nicht benutzen!", true);
return;
}
if (sVeh.SchoolId != player.GetData<int>("ActiveSchool"))
{
player.StopAnimation();
player.SendNotification("~r~Du darfst dieses Fahrzeug nicht benutzen!", true);
NotificationService.SendErrorNotification(player, "Du darfst dieses Fahrzeug nicht benutzen!", true);
return;
}
}
@@ -106,7 +107,7 @@ namespace ReallifeGamemode.Server.Events
if (player.GetUser().PlayedMinutes > 1800)
{
player.StopAnimation();
player.SendNotification("~r~Du hast schon über 30 Spielstunden!", true);
NotificationService.SendErrorNotification(player, "Du hast schon über 30 Spielstunden!", true);
return;
}
}
@@ -121,13 +122,13 @@ namespace ReallifeGamemode.Server.Events
if (player.GetUser().PlayedMinutes > 1800)
{
player.StopAnimation();
player.SendNotification("~r~Du hast schon über 30 Spielstunden!", true);
NotificationService.SendErrorNotification(player, "Du hast schon über 30 Spielstunden!", true);
return;
}
if (player.GetData<bool>("HatNoobSpawnVehicle") == true)
{
player.StopAnimation();
player.SendNotification("~r~Du hast bereits einen Roller!", true);
NotificationService.SendErrorNotification(player, "Du hast bereits einen Roller!", true);
return;
}
else
@@ -223,7 +224,7 @@ namespace ReallifeGamemode.Server.Events
if (player.GetUser().PlayedMinutes > 1800)
{
player.StopAnimation();
player.SendNotification("~r~Du hast schon über 30 Spielstunden!", true);
NotificationService.SendErrorNotification(player, "Du hast schon über 30 Spielstunden!", true);
return;
}
else