ox_target: canInteract params

This commit is contained in:
Linden committed 2022-10-02 20:23:01 +11:00
1 parent 07256a74a0
commit 341bc32925
4 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ local options = {
event = 'ox_target:debug', event = 'ox_target:debug',
icon = 'fa-solid fa-road', icon = 'fa-solid fa-road',
label = 'Option 1', label = 'Option 1',
canInteract = function(entity, coords, distance) canInteract = function(entity, distance, coords, name, bone)
return math.random(0, 100) < 51 return math.random(0, 100) < 51
end end
}, },
@@ -14,7 +14,7 @@ local options = {
event = 'ox_target:debug', event = 'ox_target:debug',
icon = 'fa-solid fa-road', icon = 'fa-solid fa-road',
label = 'Option 2', label = 'Option 2',
canInteract = function(entity, coords, distance) canInteract = function(entity, distance, coords, name, bone)
return math.random(0, 100) < 51 return math.random(0, 100) < 51
end end
} }
+2 -2
View File
@@ -5,7 +5,7 @@ local options = {
event = 'ox_target:debug', event = 'ox_target:debug',
icon = 'fa-solid fa-road', icon = 'fa-solid fa-road',
label = 'Option 1', label = 'Option 1',
canInteract = function(entity, coords, distance) canInteract = function(entity, distance, coords, name, bone)
return math.random(0, 100) < 51 return math.random(0, 100) < 51
end end
}, },
@@ -14,7 +14,7 @@ local options = {
event = 'ox_target:debug', event = 'ox_target:debug',
icon = 'fa-solid fa-road', icon = 'fa-solid fa-road',
label = 'Option 2', label = 'Option 2',
canInteract = function(entity, coords, distance) canInteract = function(entity, distance, coords, name, bone)
return math.random(0, 100) < 51 return math.random(0, 100) < 51
end end
} }
+2 -2
View File
@@ -31,7 +31,7 @@ exports.ox_target:addSphereZone({
event = 'ox_target:debug', event = 'ox_target:debug',
icon = 'fa-solid fa-circle', icon = 'fa-solid fa-circle',
label = '(Debug) Sphere', label = '(Debug) Sphere',
canInteract = function(entity, coords, distance) canInteract = function(entity, distance, coords, name)
return true return true
end end
} }
@@ -72,7 +72,7 @@ exports.ox_target:addBoxZone({
event = 'ox_target:debug', event = 'ox_target:debug',
icon = 'fa-solid fa-cube', icon = 'fa-solid fa-cube',
label = '(Debug) Box', label = '(Debug) Box',
canInteract = function(entity, coords, distance) canInteract = function(entity, distance, coords, name)
return true return true
end end
} }
+1 -1
View File
@@ -17,7 +17,7 @@ When calling exports to add options, the input is an array of tables with the fo
-- an item, array of items, or items and counts needed to display -- an item, array of items, or items and counts needed to display
items? = string | string[] | { [string]: number } items? = string | string[] | { [string]: number }
-- custom check to hide or display the option -- custom check to hide or display the option
canInteract? = function(entity, distance, coords, name), canInteract? = function(entity, distance, coords, name, bone),
-- triggered on option selection (one only) -- triggered on option selection (one only)
onSelect? = function(data), onSelect? = function(data),
export? = string, export? = string,