Update stored.lua

This commit is contained in:
Miho931 2025-06-08 18:00:11 +02:00
parent dc849979f9
commit e2212140b7

View file

@ -7,14 +7,14 @@ AddEventHandler('mh_garage:storeVehicle', function(zone)
local randomname, randomdes = SelectName()
local opt = {}
print("1")
for i = 1, #vehicles, 1 do
local veh_coords = GetEntityCoords(vehicles[1])
local distance = #(veh_coords - coords)
print("2")
if distance < 40.0 then
local mods = QBCore.Functions.GetVehicleProperties(vehicles[i])
print("3")
table.insert(opt, {
title = "Kennzeichen: "..mods.plate,
description = "Soll dieses Fahrzeug eingeparkt werden?",
@ -35,14 +35,14 @@ AddEventHandler('mh_garage:storeVehicle', function(zone)
end
end
})
print("4")
lib.registerContext({
id = "StoredVehicles",
title = randomname,
description = randomdes,
options = opt
})
print("5")
lib.showContext("StoredVehicles")
end
end