From 109a5c6038094048248bc2f708cbcd26f29cc22a Mon Sep 17 00:00:00 2001 From: SNAILX <180862994+SNAILX808@users.noreply.github.com> Date: Tue, 11 Nov 2025 03:31:19 +0100 Subject: [PATCH] small fixes --- [core]/es_extended/client/compat.lua | 3 +++ [core]/esx_lib/imports/raycast/client.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[core]/es_extended/client/compat.lua b/[core]/es_extended/client/compat.lua index feef08bf..a4b3cfce 100644 --- a/[core]/es_extended/client/compat.lua +++ b/[core]/es_extended/client/compat.lua @@ -3,17 +3,20 @@ ESX.Game.GetShapeTestResultSync = xLib.Raycast.GetShapeTestResult ESX.Game.RaycastScreen = xLib.Raycast.FromScreen ESX.Game.StartRaycasting = xLib.Raycast.Start +---@param raycast table The raycast object returned from ESX.Game.StartRaycasting ESX.Game.StopRaycasting = function(raycast) if raycast and raycast.active then raycast:Stop() end end +---@param raycast table The raycast object returned from ESX.Game.StartRaycasting ESX.Game.IsRaycastActive = function(raycast) if raycast and raycast.active then return raycast:IsActive() end return false end +---@param raycast table The raycast object returned from ESX.Game.StartRaycasting ESX.Game.GetRaycastResult = function(raycast) if raycast and raycast.active then return raycast.result diff --git a/[core]/esx_lib/imports/raycast/client.lua b/[core]/esx_lib/imports/raycast/client.lua index f0464be5..131fc79b 100644 --- a/[core]/esx_lib/imports/raycast/client.lua +++ b/[core]/esx_lib/imports/raycast/client.lua @@ -60,7 +60,7 @@ end -- Stop raycasting function xLib.Raycast:Stop() - if not self and not self.active then print('already stopped') return end + if not self and not self.active then return end self.active = false if self._thread then self._thread = nil