Update cocaine.lua

This commit is contained in:
Mustache Dom authored and GitHub committed 2024-08-26 15:51:04 -07:00
1 parent e07ab23761
commit 07fb3caf24
1 file changed
+23 -11
+23 -11
View File
@@ -54,17 +54,29 @@ RegisterNetEvent("coke:init", function()
if not v.taken then if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true) CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(CocaPlant[k], true, v.heading) Freeze(CocaPlant[k], true, v.heading)
exports['qb-target']:AddTargetEntity(CocaPlant[k], { local options = {
options = { { {
icon = "fas fa-hand", icon = "fas fa-hand",
label = "pick cocaine", label = "pick Cocaine",
action = function() action = function()
if not pick(k) then return end if not pick(k) then return end
end end
} }
}, }
distance = 2.5 local optionsox = {
}) {
icon = "fas fa-hand",
label = "pick Cocaine",
distance = 2.5,
onselect = function()
if not pick(k) then return end
end
}
}
if Config.oxtarget then
exports.ox_target:AddLocalEntity(CocaPlant[k], options = options)
else
exports['qb-target']:AddTargetEntity(CocaPlant[k], {options = options, distance = 2.5})
end end
end end
end) end)