samen kaufen und hanf -> joint

This commit is contained in:
hydrant
2021-05-24 00:04:55 +02:00
parent d72f7216cc
commit a49fcf09c7
11 changed files with 1126 additions and 788 deletions

View File

@@ -243,6 +243,8 @@ namespace ReallifeGamemode.Server.Events
AmmunationPoint nearestAmmunationPoint = PositionManager.AmmunationPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5);
RentcarPoint nearestRentcarPoint = PositionManager.rentcarPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5);
JailPoint nearestjailPoint = PositionManager.jailPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5);
bool isNearCannabisSeedBuyPoint = HanfManager.IsPlayerNearSeedBuyPoint(player);
bool isNearJointManufacturerPoint = HanfManager.IsPlayerNearJointManufacturer(player);
if (user?.FactionId != null)
{
@@ -761,6 +763,18 @@ namespace ReallifeGamemode.Server.Events
return;
}
}
if (isNearCannabisSeedBuyPoint)
{
player.TriggerEvent("SERVER:Hanf_BuySeed", HanfManager.SEED_PRICE);
return;
}
if (isNearJointManufacturerPoint)
{
HanfManager.BuildJointsFromCannabis(player);
return;
}
}
[RemoteEvent("keyPress:I")]