Restric JobPlayer
This commit is contained in:
@@ -9,6 +9,7 @@ using ReallifeGamemode.Server.Types;
|
|||||||
using ReallifeGamemode.Server.Util;
|
using ReallifeGamemode.Server.Util;
|
||||||
using ReallifeGamemode.Server.WeaponDeal;
|
using ReallifeGamemode.Server.WeaponDeal;
|
||||||
using ReallifeGamemode.Server.Managers;
|
using ReallifeGamemode.Server.Managers;
|
||||||
|
using ReallifeGamemode.Server.Job;
|
||||||
|
|
||||||
namespace ReallifeGamemode.Server.Events
|
namespace ReallifeGamemode.Server.Events
|
||||||
{
|
{
|
||||||
@@ -28,7 +29,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
|
|
||||||
if (vehicle.GetServerVehicle() is FactionVehicle veh)
|
if (vehicle.GetServerVehicle() is FactionVehicle veh)
|
||||||
{
|
{
|
||||||
if (!veh.GetOwners().Contains(player.GetUser().FactionId ?? 0) && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()))
|
if (!veh.GetOwners().Contains(player.GetUser().FactionId ?? 0) && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()) && !JobBase.GetPlayerInJob().Contains(player))
|
||||||
{
|
{
|
||||||
if ((VehicleHash)vehicle.Model == VehicleHash.Burrito3)
|
if ((VehicleHash)vehicle.Model == VehicleHash.Burrito3)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -511,7 +511,12 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
{
|
{
|
||||||
player.SendNotification("~r~Im Dienst kannst du keine Kleidung kaufen", false);
|
player.SendNotification("~r~Im Dienst kannst du keine Kleidung kaufen", false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(JobBase.GetPlayerInJob().Contains(player))
|
||||||
|
{
|
||||||
|
player.SendNotification("~r~Im aktiven Job kannst du keine Kleidung kaufen", false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
nearestClotheShopPoint.clotheShop.LoadShopNUI(player);
|
nearestClotheShopPoint.clotheShop.LoadShopNUI(player);
|
||||||
}
|
}
|
||||||
if (nearestItemShopPoint != null)
|
if (nearestItemShopPoint != null)
|
||||||
@@ -525,6 +530,11 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
player.SendNotification("~r~Im Dienst wirst du nicht vom Friseur bedient", false);
|
player.SendNotification("~r~Im Dienst wirst du nicht vom Friseur bedient", false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (JobBase.GetPlayerInJob().Contains(player))
|
||||||
|
{
|
||||||
|
player.SendNotification("~r~Im aktiven Job wirst du nicht vom Friseur bedient", false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
nearestFriseurPoint.friseurShop.LoadShopNUI(player);
|
nearestFriseurPoint.friseurShop.LoadShopNUI(player);
|
||||||
}
|
}
|
||||||
if (nearestAmmunationPoint != null)
|
if (nearestAmmunationPoint != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user