diff --git a/ReallifeGamemode.Client/Interaction/factioninteraction.ts b/ReallifeGamemode.Client/Interaction/factioninteraction.ts
index 506e47a1..8c27c245 100644
--- a/ReallifeGamemode.Client/Interaction/factioninteraction.ts
+++ b/ReallifeGamemode.Client/Interaction/factioninteraction.ts
@@ -119,7 +119,7 @@ export default function factionInteraction(globalData: IGlobalData) {
case friskUserMenuItem:
factionInteractionMenu.Visible = false;
- var input = new InputHelper("Welchem Spieler möchtest du Strafpunkte geben (Name / ID)?", globalData);
+ var input = new InputHelper("Welchen Spieler möchtest du durchsuchen (Name / ID)?", globalData);
input.show();
input.getValue(name => {
mp.events.callRemote("CLIENT:InteractionMenu_LSPD_FriskUser", name);
diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs
index b0dbac78..78ccd594 100644
--- a/ReallifeGamemode.Server/Events/Key.cs
+++ b/ReallifeGamemode.Server/Events/Key.cs
@@ -819,19 +819,19 @@ namespace ReallifeGamemode.Server.Events
}
}
- if (isNearCannabisSeedBuyPoint)
+ if (isNearCannabisSeedBuyPoint && user.Faction?.GangOwned == true)
{
HanfManager.ShowPlayerBuySeedMenu(player);
return;
}
- if (isNearJointManufacturerPoint)
+ if (isNearJointManufacturerPoint && user.Faction?.GangOwned == true)
{
HanfManager.BuildJointsFromCannabis(player);
return;
}
- if (isNearCannabisSellPoint)
+ if (isNearCannabisSellPoint && user.Faction?.GangOwned == true)
{
HanfManager.PlayerSellCannabis(player);
return;
diff --git a/ReallifeGamemode.Server/Managers/HanfManager.cs b/ReallifeGamemode.Server/Managers/HanfManager.cs
index a2916668..965720ea 100644
--- a/ReallifeGamemode.Server/Managers/HanfManager.cs
+++ b/ReallifeGamemode.Server/Managers/HanfManager.cs
@@ -49,9 +49,9 @@ namespace ReallifeGamemode.Server.Managers
private const int MAX_SEEDS_PER_DAY = 50;
///
- /// Wie viele Joints man aus einem Cannabis bekommt
+ /// Wie viel Cannabis man für einen Joint braucht
///
- public static int CANNABIS_TO_JOINT_RATIO = 3;
+ private const int CANNABIS_NEEDED_FOR_JOINT = 10;
///
/// Flag, ob der Verarbeiter aktuell benutzt wird
@@ -91,7 +91,6 @@ namespace ReallifeGamemode.Server.Managers
private static Random _random = new Random();
private static List _currentCannabisData = new List();
-
public static readonly Vector3 ASSERVATENKAMMER_POSITION = new Vector3(-5.45, -670.03, 32.33);
static HanfManager()
@@ -154,7 +153,7 @@ namespace ReallifeGamemode.Server.Managers
}
var user = player.GetUser();
- if (user?.Faction?.StateOwned == true)
+ if (user?.Faction?.StateOwned == true || user.Faction?.GangOwned == false)
{
return;
}
@@ -186,7 +185,7 @@ namespace ReallifeGamemode.Server.Managers
}
var user = player.GetUser();
- if (user?.Faction?.StateOwned == true)
+ if (user?.Faction?.StateOwned == true || user.Faction?.GangOwned == false)
{
return;
}
@@ -215,7 +214,7 @@ namespace ReallifeGamemode.Server.Managers
var dbContext = new DatabaseContext();
var user = player.GetUser(dbContext);
- if (user.Faction?.StateOwned ?? false)
+ if (user.Faction?.StateOwned ?? false || user.Faction?.GangOwned == false)
{
player.SendNotification("~r~Du darfst keine Hanfsamen einpflanzen");
return;
@@ -482,18 +481,10 @@ namespace ReallifeGamemode.Server.Managers
IItem cannabisItem = InventoryManager.GetItem();
IItem jointItem = InventoryManager.GetItem();
- var addWeight = jointItem.Gewicht * CANNABIS_TO_JOINT_RATIO - cannabisItem.Gewicht;
-
- if (!InventoryManager.CanPlayerHoldMoreWeight(player, addWeight))
- {
- player.SendNotification("~r~Für die Verarbeitung hast du nicht genug Platz im Rucksack");
- return;
- }
-
UserItem userCannabisItem = userItems.Where(i => i.ItemId == cannabisItem.Id).FirstOrDefault();
- if (userCannabisItem == null)
+ if (userCannabisItem == null || userCannabisItem.Amount < CANNABIS_NEEDED_FOR_JOINT)
{
- player.SendNotification("~r~Du hast kein Cannabis dabei");
+ player.SendNotification($"~r~Du hast nicht genug Cannabis dabei~n~Zur Herstellung eines Joints werden {CANNABIS_NEEDED_FOR_JOINT} Hanfblüten benötigt");
return;
}
@@ -502,10 +493,10 @@ namespace ReallifeGamemode.Server.Managers
player.SyncAnimation(_manufacturerAnim);
- InventoryManager.RemoveUserItem(user, userCannabisItem, 1);
- InventoryManager.AddItemToInventory(player, jointItem.Id, CANNABIS_TO_JOINT_RATIO);
+ InventoryManager.RemoveUserItem(user, userCannabisItem, CANNABIS_NEEDED_FOR_JOINT);
+ InventoryManager.AddItemToInventory(player, jointItem.Id, 1);
- player.SendNotification($"Du hast 1 Cannabis in {CANNABIS_TO_JOINT_RATIO} Joints verarbeitet");
+ player.SendNotification($"Du hast{CANNABIS_NEEDED_FOR_JOINT} Hanfblüten in einen Joint verarbeitet");
NAPI.ClientEvent.TriggerClientEventInRange(player.Position, 100.0f, "SERVER:Hanf_PlayManufacturerAnim", _manufacturerAnim);
}
diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs
index c769b235..9c04f95f 100644
--- a/ReallifeGamemode.Server/Managers/InteractionManager.cs
+++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs
@@ -859,6 +859,12 @@ namespace ReallifeGamemode.Server.Managers
return;
}
+ if (serverVehicle.Model == VehicleHash.Riot)
+ {
+ player.SendNotification("~r~Der Riot muss zur Asservatenkammer gefahren werden");
+ return;
+ }
+
if (VehicleStreaming.GetLockState(vehicle) || serverVehicle.Locked)
{
player.SendNotification("~r~Dieses Fahrzeug ist abgeschlossen");