forked from Simnation/Main
Update retrieve.lua
This commit is contained in:
parent
c9bb198d13
commit
59da814bca
1 changed files with 8 additions and 2 deletions
|
@ -9,11 +9,13 @@ AddEventHandler('mh_garage:retrieveVehicle', function()
|
|||
QBCore.Functions.TriggerCallback('mh_garage:CallVehicles', function(cb)
|
||||
Debug(json.encode(cb))
|
||||
for i = 1, #cb, 1 do
|
||||
local mods = json.decode(cb[i].mods)
|
||||
table.insert(opt, {
|
||||
title = cb[i].name,
|
||||
description = "Kennzeichen: "..cb[i].plate.."\nTankinhalt: "..cb[i].mods["fuelLevel"].."%",
|
||||
description = "Kennzeichen: "..cb[i].plate.."\nTankinhalt: "..mods.fuelLevel.."%",
|
||||
icon = "car",
|
||||
onSelect = function()
|
||||
cb[i].mods = mods
|
||||
SpawnThisVehicle(cb[i])
|
||||
end
|
||||
})
|
||||
|
@ -27,4 +29,8 @@ AddEventHandler('mh_garage:retrieveVehicle', function()
|
|||
|
||||
lib.showContext("retrieveVehicle")
|
||||
end, CurrentZone.name)
|
||||
end)
|
||||
end)
|
||||
|
||||
function SpawnThisVehicle(veh)
|
||||
print("Spawn VEhicle")
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue