diff --git a/imports/raycast/client.lua b/imports/raycast/client.lua index 048aa34..848cfda 100644 --- a/imports/raycast/client.lua +++ b/imports/raycast/client.lua @@ -12,15 +12,16 @@ local GetWorldCoordFromScreenCoord = GetWorldCoordFromScreenCoord ---| 7 GLASS | SEE_THROUGH | NO_COLLISION ---@param flags number? Line of sight flags, defaults to 511 (see: https://docs.fivem.net/natives/?_0x377906D8A31E5586). ----@param ignore ShapetestIgnore Defaults to 4. +---@param ignore ShapetestIgnore? Defaults to 4. +---@param distance number? Defaults to 10. ---@return boolean hit ---@return number entityHit ---@return vector3 endCoords ---@return vector3 surfaceNormal ---@return number materialHash -function lib.raycast.cam(flags, ignore) +function lib.raycast.cam(flags, ignore, distance) local coords, normal = GetWorldCoordFromScreenCoord(0.5, 0.5) - local destination = coords + normal * 10 + local destination = coords + normal * (distance or 10) local handle = StartShapeTestLosProbe(coords.x, coords.y, coords.z, destination.x, destination.y, destination.z, flags or 511, cache.ped, ignore or 4) diff --git a/resource/interface/client/textui.lua b/resource/interface/client/textui.lua index 60f998a..6095e43 100644 --- a/resource/interface/client/textui.lua +++ b/resource/interface/client/textui.lua @@ -2,7 +2,7 @@ ---@field position? 'right-center' | 'left-center' | 'top-center'; ---@field icon? string | {[1]: IconProp, [2]: string}; ---@field iconColor? string; ----@field style? string; +---@field style? string | table; local isOpen = false