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
+22 -10
+22 -10
View File
@@ -54,17 +54,29 @@ RegisterNetEvent("coke:init", function()
if not v.taken then
CocaPlant[k] = CreateObject(hash, v.location.x, v.location.y, v.location.z, false, true, true)
Freeze(CocaPlant[k], true, v.heading)
exports['qb-target']:AddTargetEntity(CocaPlant[k], {
options = { {
icon = "fas fa-hand",
label = "pick cocaine",
action = function()
if not pick(k) then return end
local options = {
{
icon = "fas fa-hand",
label = "pick Cocaine",
action = function()
if not pick(k) then return 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)