item aufheben E

This commit is contained in:
hydrant
2021-04-05 14:25:39 +02:00
parent 3bb70d112e
commit 10939c6f0c
2 changed files with 12 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ namespace ReallifeGamemode.Server.Inventory
GroundTextLabels.Add(grndTextLabel);
}
public static void PickUpGroundItem(Player player)
public static bool PickUpGroundItem(Player player)
{
GroundItem nearest = GroundItems.FirstOrDefault(d => d.Position.DistanceTo(player.Position) <= 1.2);
if (nearest != null)
@@ -106,7 +106,10 @@ namespace ReallifeGamemode.Server.Inventory
NAPI.Player.SetPlayerCurrentWeapon(player, WeaponHash.Unarmed);
}
}
return true;
}
return false;
}
public static void RemoveGroundItem(GroundItem grndItem, GTANetworkAPI.Object grndObject, TextLabel grndTextLabel)