fix: improve sleepless_interact compatibility, clean up unused code

- Fixed issues with sleepless_interact module not loading
- Removed unnecessary commented-out code
- Performed general code organization and cleanup
This commit is contained in:
MrNewb committed 2025-06-21 07:45:56 -04:00
1 parent 98451f023d
commit a2a1d76cef
6 files changed
+104 -125

No files matched your search

+17 -43
View File
@@ -34,6 +34,12 @@ Target.FixOptions = function(options)
return options
end
---This will toggle the targeting system on or off. This is useful for when you want to disable the targeting system for a specific player entirely.
---@param bool boolean
Target.DisableTargeting = function(bool)
ox_target:disableTargeting(bool)
end
---This will add target options to players.
---@param options table
Target.AddGlobalPlayer = function(options)
@@ -43,14 +49,20 @@ end
---This will remove target options from all players.
Target.RemoveGlobalPlayer = function()
---@diagnostic disable-next-line: missing-parameter
ox_target:removeGlobalPlayer()
end
---This will toggle the targeting system on or off. This is useful for when you want to disable the targeting system for a specific player entirely.
---@param bool boolean
Target.DisableTargeting = function(bool)
ox_target:disableTargeting(bool)
---This will add target options to all specified models. This is useful for when you want to add target options to all models of a specific type.
---@param options table
Target.AddGlobalPed = function(options)
options = Target.FixOptions(options)
ox_target:addGlobalPed(options)
end
---This will remove target options from all peds. This is useful for when you want to remove target options from all peds.
---@param options any
Target.RemoveGlobalPed = function(options)
ox_target:removeGlobalPed(options)
end
---This will add taget options to all vehicles.
@@ -85,19 +97,6 @@ Target.RemoveLocalEntity = function(entities, optionNames)
ox_target:removeLocalEntity(entities, optionNames)
end
---This will add target options to all specified models. This is useful for when you want to add target options to all models of a specific type.
---@param options table
Target.AddGlobalPed = function(options)
options = Target.FixOptions(options)
ox_target:addGlobalPed(options)
end
---This will remove target options from all peds. This is useful for when you want to remove target options from all peds.
---@param options any
Target.RemoveGlobalPed = function(options)
ox_target:removeGlobalPed(options)
end
---This will add target options to all specified models. This is useful for when you want to add target options to all models of a specific type.
---@param models number | table
---@param options table
@@ -112,18 +111,6 @@ Target.RemoveModel = function(model)
ox_target:removeModel(model)
end
-- Target.DisableTargeting = function(bool)
-- ox_target:disableTargeting(bool)
-- end
-- Target.Refresh = function()
-- ox_target:disableTargeting(true)
-- Wait(10)
-- ox_target:disableTargeting(false)
-- end
---This will add a box zone to the target system. This is useful for when you want to add target options to a specific area.
---@param name string
---@param coords table
@@ -144,19 +131,6 @@ Target.AddBoxZone = function(name, coords, size, heading, options, debug)
return target
end
-- RegisterCommand('boxzone:test', function(source, args, rawCommand)
-- local coords = GetEntityCoords(PlayerPedId())
-- Target.AddBoxZone('test_zone', coords, { 2.0, 2.0, 2.0 }, 0.0, {
-- {
-- label = 'Test Option',
-- icon = 'fas fa-check',
-- onSelect = function()
-- print('Test option selected!')
-- end
-- }
-- }, true)
-- end)
---This will add a circle zone to the target system. This is useful for when you want to add target options to a specific area.
---@param name string
---@param coords table