From fb948012cb18a118c26a6cb929475428cb819bcc Mon Sep 17 00:00:00 2001 From: oldnapalm <38410858+oldnapalm@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:24:43 -0300 Subject: [PATCH] Update aim coordinates --- Client/Main.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Client/Main.cs b/Client/Main.cs index f640f91..83b02b1 100644 --- a/Client/Main.cs +++ b/Client/Main.cs @@ -715,8 +715,13 @@ public static void SendPlayerData() GTA.Math.Vector3 aimCoord = new GTA.Math.Vector3(); if (aiming || shooting) - aimCoord = ScreenRelToWorld(GameplayCamera.Position, GameplayCamera.Rotation, - new Vector2(0, 0)); + { + var crosshair = World.GetCrosshairCoordinates(); + if (crosshair.DidHit) + aimCoord = crosshair.HitPosition; + else + aimCoord = ScreenRelToWorld(GameplayCamera.Position, GameplayCamera.Rotation, new Vector2(0, 0)); + } var obj = new PedData(); obj.AimCoords = aimCoord.ToLVector();