RegisterNetEvent('mh_garage:storeVehicle') AddEventHandler('mh_garage:storeVehicle', function(zone) local coords = GetEntityCoords(PlayerPedId()) local vehicles = GetGamePool('CVehicle') local opt = {} for i = 1, #vehicles, 1 do local veh_coords = GetEntityCoords(vehicles[1]) local distance = #(veh_coords - coords) if distance < 40.0 then local mods = QBCore.Functions.GetVehicleProperties(vehicles[i]) table.insert(opt, { title = "Kennzeichen: "..mods.plate, description = "Soll dieses Fahrzeug eingeparkt werden?", icon = "car", onSelect = function() if zone.price == nil then else local alert = lib.alertDialog({ header = "Parkplatz kosten", content = "Parkplatkosten pro Fahrzeug: "..zone.price.."\n\nWillst du das Parkplatz trotzdem Einparken?", centered = true, cancel = true }) print(alert) print(json.encode(alert)) end end }) end end end)