1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-07-10 14:54:36 +02:00
parent e3d7eca02d
commit 61bc363707

View file

@ -416,57 +416,72 @@ end
local function setupTargeting() local function setupTargeting()
for vendingMachineName, data in pairs(Config.machines) do for vendingMachineName, data in pairs(Config.machines) do
local options = { exports['qb-target']:AddTargetModel(data.model, {
options = {
{ {
type = "client",
icon = "fas fa-basket-shopping",
label = "Abrir Máquina Expendedora", label = "Abrir Máquina Expendedora",
icon = 'fa-solid fa-basket-shopping', action = function(entity)
onSelect = function(d)
if buying then return end if buying then return end
local entity = d.entity
showVendingMenu(vendingMachineName, entity, data.items) showVendingMenu(vendingMachineName, entity, data.items)
end end
} }
} },
distance = 2.0
exports.ox_target:addModel(joaat(data.model), options) })
end end
for standName, data in pairs(Config.Stands) do for standName, data in pairs(Config.Stands) do
local options = { exports['qb-target']:AddTargetModel(data.model, {
options = {
{ {
type = "client",
icon = "fas fa-utensils",
label = "Abrir Puesto de Comida", label = "Abrir Puesto de Comida",
icon = 'fa-solid fa-utensils', action = function(entity)
onSelect = function(d)
if buying then return end if buying then return end
local entity = d.entity
standMenu(standName, entity, data.items) standMenu(standName, entity, data.items)
end end
} }
} },
distance = 2.0
exports.ox_target:addModel(joaat(data.model), options) })
end end
for newsName, data in pairs(Config.NewsSellers) do for newsName, data in pairs(Config.NewsSellers) do
local options = { exports['qb-target']:AddTargetModel(data.model, {
options = {
{ {
type = "client",
icon = "fas fa-newspaper",
label = "Abrir Venta de Noticias", label = "Abrir Venta de Noticias",
icon = 'fa-solid fa-newspaper', action = function(entity)
onSelect = function(d)
if buying then return end if buying then return end
local entity = d.entity
newsMenu(newsName, entity, data.items) newsMenu(newsName, entity, data.items)
end end
} }
},
distance = 2.0
})
end
end
local function WaterCoolerTarget()
for waterCoolerName, data in pairs(Config.WaterCoolers) do
exports['qb-target']:AddTargetModel(data.model, {
options = {
{
type = "client",
icon = "fas fa-glass-water",
label = "Beber Agua",
action = function(entity)
interactWithWaterCooler(entity)
end
} }
},
exports.ox_target:addModel(joaat(data.model), options) distance = 2.0
})
end end
end end
CreateThread(function()
Wait(100)
setupTargeting()
WaterCoolerTarget()
-- standsTarget()
end)