From 2d56b7d20331a8a3cfc5d533677ceb1d2bc36c3f Mon Sep 17 00:00:00 2001 From: Giana Date: Sun, 19 Feb 2023 02:03:04 -0600 Subject: [PATCH] Add target support --- client/target.lua | 21 +++++++++++++++++++++ fxmanifest.lua | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 client/target.lua diff --git a/client/target.lua b/client/target.lua new file mode 100644 index 0000000..04bb4e5 --- /dev/null +++ b/client/target.lua @@ -0,0 +1,21 @@ +for k, v in pairs(Config.SellLocations) do + if Config.SellLocations[k].active and Config.SellLocations[k].type == 'target' then + exports['qb-target']:AddBoxZone(Config.SellLocations[k].blip.label, Config.SellLocations[k].coords, 2.5, 2.5, { + name = Config.SellLocations[k].blip.label, + heading = 0, + debugPoly = false, + minZ = Config.SellLocations[k].coords.z - 1, + maxZ = Config.SellLocations[k].coords + 1, + }, { + options = { + { + type = 'client', + event = 'g-drugselling:client:registerTarget', + icon = 'fas fa-pills', + label = Lang:t('other.target_label'), + }, + }, + distance = 2 + }) + end +end \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua index 95b3c5a..3a9584b 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -12,7 +12,8 @@ shared_scripts { } client_scripts { - 'client/main.lua' + 'client/main.lua', + 'client/target.lua' } server_scripts {