ModuleName for target and DisableTargeting added

This commit is contained in:
MrNewb committed 2025-03-10 01:38:37 -04:00
1 parent 4ee642fc37
commit ea3b9040ce
4 files changed
+29

No files matched your search

+4
View File
@@ -4,6 +4,10 @@ local function warnUser()
print("Currently Only Targeting Is Supported By Community Bridge, You Are Using A Resource That Requires The Target Module To Be Used.")
end
Target.ModuleName = function()
return "Defualt"
end
Target.AddGlobalPlayer = function(options)
warnUser()
end
+8
View File
@@ -17,6 +17,10 @@ local targetZones = {}
Target = Target or {}
Target.ModuleName = function()
return resourceName
end
Target.FixOptions = function(options)
for k, v in pairs(options) do
local action = v.onSelect or v.action
@@ -39,6 +43,10 @@ Target.AddGlobalPlayer = function(options)
ox_target:addGlobalPlayer(options)
end
Target.DisableTargeting = function(bool)
ox_target:disableTargeting(bool)
end
---comment
---@param options table
---@return nil
+9
View File
@@ -16,6 +16,10 @@ local targetZones = {}
Target = Target or {}
Target.ModuleName = function()
return resourceName
end
Target.FixOptions = function(options)
for k, v in pairs(options) do
local action = v.onSelect or v.action
@@ -31,6 +35,11 @@ Target.FixOptions = function(options)
return options
end
Target.DisableTargeting = function(bool)
exports['qb-target']:AllowTargeting(not bool)
end
Target.AddGlobalPlayer = function(options)
options = Target.FixOptions(options)
exports['qb-target']:AddGlobalPlayer({
@@ -9,6 +9,14 @@ local sleepless = exports.sleepless_interact
Target = Target or {}
Target.ModuleName = function()
return resourceName
end
Target.DisableTargeting = function(bool)
-- nothing to see here
end
Target.FixOptions = function(options)
for k, v in pairs(options) do
local action = v.onSelect or v.action