diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 1440c805..2c460b31 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -59,17 +59,6 @@ namespace ReallifeGamemode.Server.Events GroundItem.PickUpGroundItem(player); } - - [RemoteEvent("keyPress:UP_ARROW")] - public void KeyPressUpArrow(Player player) - { - if (!player.IsLoggedIn()) return; - if (player.HasData("nearATM")) - { - ATMManager.ShowAtmUi(player, player.GetData("nearATM")); - } - } - [RemoteEvent("keyPress:LEFT_ARROW")] public void KeyPressLeftArrow(Player player) { @@ -194,6 +183,13 @@ namespace ReallifeGamemode.Server.Events if (!player.IsLoggedIn()) return; var user = player.GetUser(); + + if (player.HasData("nearATM")) + { + ATMManager.ShowAtmUi(player, player.GetData("nearATM")); + 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("duty"));