From 341bc3292534eb2227409d00bcbb5d13ab4e39b1 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sun, 2 Oct 2022 20:22:53 +1100 Subject: [PATCH] ox_target: canInteract params --- docs/ox_target/Usage/Globals.md | 4 ++-- docs/ox_target/Usage/Target.md | 4 ++-- docs/ox_target/Usage/Zones.md | 4 ++-- docs/ox_target/Usage/index.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/ox_target/Usage/Globals.md b/docs/ox_target/Usage/Globals.md index 847cf14f..949685c7 100644 --- a/docs/ox_target/Usage/Globals.md +++ b/docs/ox_target/Usage/Globals.md @@ -5,7 +5,7 @@ local options = { event = 'ox_target:debug', icon = 'fa-solid fa-road', label = 'Option 1', - canInteract = function(entity, coords, distance) + canInteract = function(entity, distance, coords, name, bone) return math.random(0, 100) < 51 end }, @@ -14,7 +14,7 @@ local options = { event = 'ox_target:debug', icon = 'fa-solid fa-road', label = 'Option 2', - canInteract = function(entity, coords, distance) + canInteract = function(entity, distance, coords, name, bone) return math.random(0, 100) < 51 end } diff --git a/docs/ox_target/Usage/Target.md b/docs/ox_target/Usage/Target.md index 2df4a59c..94831d04 100644 --- a/docs/ox_target/Usage/Target.md +++ b/docs/ox_target/Usage/Target.md @@ -5,7 +5,7 @@ local options = { event = 'ox_target:debug', icon = 'fa-solid fa-road', label = 'Option 1', - canInteract = function(entity, coords, distance) + canInteract = function(entity, distance, coords, name, bone) return math.random(0, 100) < 51 end }, @@ -14,7 +14,7 @@ local options = { event = 'ox_target:debug', icon = 'fa-solid fa-road', label = 'Option 2', - canInteract = function(entity, coords, distance) + canInteract = function(entity, distance, coords, name, bone) return math.random(0, 100) < 51 end } diff --git a/docs/ox_target/Usage/Zones.md b/docs/ox_target/Usage/Zones.md index d38cad6a..45526d17 100644 --- a/docs/ox_target/Usage/Zones.md +++ b/docs/ox_target/Usage/Zones.md @@ -31,7 +31,7 @@ exports.ox_target:addSphereZone({ event = 'ox_target:debug', icon = 'fa-solid fa-circle', label = '(Debug) Sphere', - canInteract = function(entity, coords, distance) + canInteract = function(entity, distance, coords, name) return true end } @@ -72,7 +72,7 @@ exports.ox_target:addBoxZone({ event = 'ox_target:debug', icon = 'fa-solid fa-cube', label = '(Debug) Box', - canInteract = function(entity, coords, distance) + canInteract = function(entity, distance, coords, name) return true end } diff --git a/docs/ox_target/Usage/index.md b/docs/ox_target/Usage/index.md index ff425a05..672bf637 100644 --- a/docs/ox_target/Usage/index.md +++ b/docs/ox_target/Usage/index.md @@ -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 items? = string | string[] | { [string]: number } -- 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) onSelect? = function(data), export? = string,