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()
|
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 = {
|
||||||
label = "Abrir Máquina Expendedora",
|
{
|
||||||
icon = 'fa-solid fa-basket-shopping',
|
type = "client",
|
||||||
onSelect = function(d)
|
icon = "fas fa-basket-shopping",
|
||||||
if buying then return end
|
label = "Abrir Máquina Expendedora",
|
||||||
local entity = d.entity
|
action = function(entity)
|
||||||
showVendingMenu(vendingMachineName, entity, data.items)
|
if buying then return end
|
||||||
end
|
showVendingMenu(vendingMachineName, entity, data.items)
|
||||||
}
|
end
|
||||||
}
|
}
|
||||||
|
},
|
||||||
exports.ox_target:addModel(joaat(data.model), options)
|
distance = 2.0
|
||||||
|
})
|
||||||
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 = {
|
||||||
label = "Abrir Puesto de Comida",
|
{
|
||||||
icon = 'fa-solid fa-utensils',
|
type = "client",
|
||||||
onSelect = function(d)
|
icon = "fas fa-utensils",
|
||||||
if buying then return end
|
label = "Abrir Puesto de Comida",
|
||||||
local entity = d.entity
|
action = function(entity)
|
||||||
standMenu(standName, entity, data.items)
|
if buying then return end
|
||||||
end
|
standMenu(standName, entity, data.items)
|
||||||
}
|
end
|
||||||
}
|
}
|
||||||
|
},
|
||||||
exports.ox_target:addModel(joaat(data.model), options)
|
distance = 2.0
|
||||||
|
})
|
||||||
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 = {
|
||||||
label = "Abrir Venta de Noticias",
|
{
|
||||||
icon = 'fa-solid fa-newspaper',
|
type = "client",
|
||||||
onSelect = function(d)
|
icon = "fas fa-newspaper",
|
||||||
if buying then return end
|
label = "Abrir Venta de Noticias",
|
||||||
local entity = d.entity
|
action = function(entity)
|
||||||
newsMenu(newsName, entity, data.items)
|
if buying then return end
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
CreateThread(function()
|
|
||||||
Wait(100)
|
|
||||||
setupTargeting()
|
|
||||||
WaterCoolerTarget()
|
|
||||||
-- standsTarget()
|
|
||||||
end)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue