forked from Simnation/Main
ed
This commit is contained in:
parent
e3d7eca02d
commit
61bc363707
1 changed files with 60 additions and 45 deletions
|
@ -416,57 +416,72 @@ end
|
|||
|
||||
local function setupTargeting()
|
||||
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",
|
||||
icon = 'fa-solid fa-basket-shopping',
|
||||
onSelect = function(d)
|
||||
action = function(entity)
|
||||
if buying then return end
|
||||
local entity = d.entity
|
||||
showVendingMenu(vendingMachineName, entity, data.items)
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
exports.ox_target:addModel(joaat(data.model), options)
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
end
|
||||
|
||||
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",
|
||||
icon = 'fa-solid fa-utensils',
|
||||
onSelect = function(d)
|
||||
action = function(entity)
|
||||
if buying then return end
|
||||
local entity = d.entity
|
||||
standMenu(standName, entity, data.items)
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
exports.ox_target:addModel(joaat(data.model), options)
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
end
|
||||
|
||||
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",
|
||||
icon = 'fa-solid fa-newspaper',
|
||||
onSelect = function(d)
|
||||
action = function(entity)
|
||||
if buying then return end
|
||||
local entity = d.entity
|
||||
newsMenu(newsName, entity, data.items)
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
exports.ox_target:addModel(joaat(data.model), options)
|
||||
},
|
||||
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
|
||||
}
|
||||
},
|
||||
distance = 2.0
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
Wait(100)
|
||||
setupTargeting()
|
||||
WaterCoolerTarget()
|
||||
-- standsTarget()
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue