zones
This commit is contained in:
1 parent
6ed438a609
commit
abb5e21e03
2 files changed
+32
No files matched your search
@@ -100,6 +100,26 @@ Target.AddBoxZone = function(name, coords, size, heading, options)
|
||||
return target
|
||||
end
|
||||
|
||||
---comment
|
||||
---@param name string
|
||||
---@param coords vector3
|
||||
---@param radius number
|
||||
---@param heading number -- unused, but kept for compatibility
|
||||
---@param options table
|
||||
---@return number
|
||||
Target.AddSphereZone = function(name, coords, radius, heading, options)
|
||||
options = Target.FixOptions(options)
|
||||
local target = ox_target:addSphereZone({
|
||||
coords = coords,
|
||||
radius = radius,
|
||||
name = name,
|
||||
debug = targetDebug,
|
||||
options = options
|
||||
})
|
||||
table.insert(targetZones, { name = name, id = target, creator = GetInvokingResource() })
|
||||
return target
|
||||
end
|
||||
|
||||
Target.RemoveGlobalPlayer = function()
|
||||
ox_target:removeGlobalPlayer()
|
||||
end
|
||||
|
||||
@@ -92,6 +92,18 @@ Target.AddBoxZone = function(name, coords, size, heading, options)
|
||||
table.insert(targetZones, { name = name, creator = GetInvokingResource() })
|
||||
end
|
||||
|
||||
Target.AddSphereZone = function(name, coords, radius, options)
|
||||
options = Target.FixOptions(options)
|
||||
exports['qb-target']:AddCircleZone(name, coords, radius, {
|
||||
name = name,
|
||||
debugPoly = targetDebug,
|
||||
}, {
|
||||
options = options,
|
||||
distance = options.distance or 1.5,
|
||||
})
|
||||
table.insert(targetZones, { name = name, creator = GetInvokingResource() })
|
||||
end
|
||||
|
||||
Target.RemoveGlobalPlayer = function()
|
||||
exports['qb-target']:RemoveGlobalPlayer()
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user