From a697c5b9dba0a798dacd368673f4ad6c050b41c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Neves?= <66961515+antonionevesss@users.noreply.github.com> Date: Thu, 5 Jun 2025 00:49:27 +0100 Subject: [PATCH] refactor(target): added second var to remove specific options --- modules/target/ox_target/client.lua | 5 +++-- modules/target/qb-target/client.lua | 7 ++++--- modules/target/sleepless_interact/client.lua | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/target/ox_target/client.lua b/modules/target/ox_target/client.lua index d65b7e6..252eecf 100644 --- a/modules/target/ox_target/client.lua +++ b/modules/target/ox_target/client.lua @@ -80,8 +80,9 @@ end ---This will remove the target options from a local entity. This is useful for when you want to remove target options from a specific entity. ---@param entity any -Target.RemoveLocalEntity = function(entity) - ox_target:removeLocalEntity(entity) +---@param labels string | table | nil +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. diff --git a/modules/target/qb-target/client.lua b/modules/target/qb-target/client.lua index 516b4e8..8c56a7e 100644 --- a/modules/target/qb-target/client.lua +++ b/modules/target/qb-target/client.lua @@ -89,9 +89,10 @@ Target.AddLocalEntity = function(entities, options) end ---This will remove the target options from a local entity. This is useful for when you want to remove target options from a specific entity. ----@param entity any -Target.RemoveLocalEntity = function(entity) - qb_target:RemoveTargetEntity(entity) +---@param entity number | table +---@param labels string | table | nil +Target.RemoveLocalEntity = function(entity, labels) + qb_target:RemoveTargetEntity(entity, labels) 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. diff --git a/modules/target/sleepless_interact/client.lua b/modules/target/sleepless_interact/client.lua index 0e924b2..bc50bc0 100644 --- a/modules/target/sleepless_interact/client.lua +++ b/modules/target/sleepless_interact/client.lua @@ -104,9 +104,10 @@ end ---comment ---@param entity number +---@param labels string | table | nil ---@return nil -Target.RemoveLocalEntity = function(entity) - sleepless_interact:removeLocalEntity(entity) +Target.RemoveLocalEntity = function(entity, labels) + sleepless_interact:removeLocalEntity(entity, labels) end ---comment