1
0
Fork 0
forked from Simnation/Main

Update client.lua

This commit is contained in:
Nordi98 2025-07-29 09:41:19 +02:00
parent bd4d8afd3f
commit 7b0763ef2f

View file

@ -671,3 +671,41 @@ RegisterCommand('checkvendingprops', function()
QBCore.Functions.Notify('Found ' .. foundProps .. ' vending machines nearby', 'primary')
end, false)
-- Command to manually refresh targets
RegisterCommand('refreshvendingtargets', function()
exports['qb-target']:RemoveTargetModel(Config.VendingProps)
Wait(500)
exports['qb-target']:AddTargetModel(Config.VendingProps, {
options = {
{
type = "client",
event = "vending:client:buyMachine",
icon = "fas fa-dollar-sign",
label = "Automaten kaufen ($" .. Config.VendingMachinePrice .. ")"
},
{
type = "client",
event = "vending:client:openBuyMenu",
icon = "fas fa-shopping-cart",
label = "Kaufen"
},
{
type = "client",
event = "vending:client:openOwnerMenu",
icon = "fas fa-cog",
label = "Verwalten"
},
{
type = "client",
event = "vending:client:startRobbery",
icon = "fas fa-mask",
label = "Aufbrechen"
}
},
distance = 2.0
})
QBCore.Functions.Notify('Vending machine targets refreshed', 'success')
end, false)