Skip to content

Commit

Permalink
Add target support
Browse files Browse the repository at this point in the history
  • Loading branch information
Giana committed Feb 19, 2023
1 parent e37fc15 commit 2d56b7d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions client/target.lua
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ shared_scripts {
}

client_scripts {
'client/main.lua'
'client/main.lua',
'client/target.lua'
}

server_scripts {
Expand Down

0 comments on commit 2d56b7d

Please sign in to comment.