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

@@ -198,6 +198,14 @@ namespace ReallifeGamemode.Server.Events
return;
}
if(!player.IsInVehicle)
{
if(GroundItem.PickUpGroundItem(player))
{
return;
}
}
DutyPoint nearestDuty = PositionManager.DutyPoints.Find(d => d.Position.DistanceTo(player.Position) <= 1.5 && d.FactionId == user.FactionId);
WeaponPoint nearestWeapon = PositionManager.WeaponPoints.Find(w => w.Position.DistanceTo(player.Position) <= 1.5 && w.FactionId == user.FactionId);
JailReleasePoint nearestJailReleasePoint = PositionManager.JailReleasePoints.Find(j => j.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 3) && user.GetData<bool>("duty"));
@@ -875,8 +883,6 @@ namespace ReallifeGamemode.Server.Events
if (!player.IsInVehicle)
{
Vehicle.VehicleMenuLockCarEvent(player);
GroundItem.PickUpGroundItem(player);
}
if (player.IsInVehicle && player.VehicleSeat == 0)