Duty-Restriktionen /Klamotten /FS /Job
This commit is contained in:
@@ -99,7 +99,11 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
||||
private static void EntityEnterBusinessColShape(ColShape colShape, Player client)
|
||||
{
|
||||
if (client.IsInVehicle || !client.IsLoggedIn()) return;
|
||||
|
||||
if (client.GetData<bool>("duty") == true)
|
||||
{
|
||||
client.SendNotification("~r~Im Dienst kannst du keinen Führerschein machen", false);
|
||||
return;
|
||||
}
|
||||
client.TriggerEvent("drivingSchoolMenu");
|
||||
}
|
||||
|
||||
@@ -112,11 +116,13 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
||||
public void StartDrivingSchool(Player client)
|
||||
{
|
||||
User user = client.GetUser();
|
||||
|
||||
if (user.DriverLicenseVehicle || client.HasData("ActiveSchool"))
|
||||
{
|
||||
client.SendChatMessage("~b~[INFO]~s~ Du besitzt schon einen Führerschein.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.Handmoney < 2500)
|
||||
{
|
||||
client.SendNotification("~r~[FEHLER]~s~ Du hast nicht genug Geld auf der Hand($2.500)!", true);
|
||||
|
||||
@@ -507,6 +507,11 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
if (nearestClotheShopPoint != null)
|
||||
{
|
||||
if (player.GetData<bool>("duty") == true)
|
||||
{
|
||||
player.SendNotification("~r~Im Dienst kannst du keine Kleidung kaufen", false);
|
||||
return;
|
||||
}
|
||||
nearestClotheShopPoint.clotheShop.LoadShopNUI(player);
|
||||
}
|
||||
if (nearestItemShopPoint != null)
|
||||
@@ -547,6 +552,11 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
if (!job.GetUsersInJob().Contains(player))
|
||||
{
|
||||
if (player.GetData<bool>("duty") == true)
|
||||
{
|
||||
player.SendNotification("~r~Im Dienst kannst du keinen Job ausführen", false);
|
||||
return;
|
||||
}
|
||||
if (player.GetUser().JobId == 3)
|
||||
{
|
||||
if (nearestJobPoint.Skill > user.PilotSkill)
|
||||
|
||||
Reference in New Issue
Block a user