GARAGE
This commit is contained in:
parent
f3a9f443a7
commit
dd9754b106
2 changed files with 15 additions and 13 deletions
|
@ -9,16 +9,18 @@ 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: "..math.round(mods.fuelLevel, 2).."%",
|
||||
icon = "car",
|
||||
onSelect = function()
|
||||
cb[i].mods = mods
|
||||
SpawnThisVehicle(cb[i])
|
||||
end
|
||||
})
|
||||
if cb[i].garage ~= "OUT" then
|
||||
local mods = json.decode(cb[i].mods)
|
||||
table.insert(opt, {
|
||||
title = cb[i].name,
|
||||
description = "Kennzeichen: "..cb[i].plate.."\nTankinhalt: "..math.round(mods.fuelLevel, 2).."%",
|
||||
icon = "car",
|
||||
onSelect = function()
|
||||
cb[i].mods = mods
|
||||
SpawnThisVehicle(cb[i])
|
||||
end
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
lib.registerContext({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue