From ed7aba595386af78dfba7fb17f60eeaaf2f55737 Mon Sep 17 00:00:00 2001 From: Miho931 <98314142+Miho931@users.noreply.github.com> Date: Sun, 8 Jun 2025 19:18:00 +0200 Subject: [PATCH] Update stored.lua --- .../[carscripts]/mh_garage/client/stored.lua | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/resources/[carscripts]/mh_garage/client/stored.lua b/resources/[carscripts]/mh_garage/client/stored.lua index 5a07557c4..1f21e30ea 100644 --- a/resources/[carscripts]/mh_garage/client/stored.lua +++ b/resources/[carscripts]/mh_garage/client/stored.lua @@ -18,14 +18,36 @@ AddEventHandler('mh_garage:storeVehicle', function(zone) icon = "car", onSelect = function() if zone.price == nil then - + StoredVehicle(vehicles[i], zone) else - lib.alertDialog({ - header = "Parkplatz kosten", - content = "Parkplatkosten pro Fahrzeug: "..zone.price.."\n\nWillst du das Parkplatz trotzdem Einparken?", - centered = true, - cancel = true + lib.hideContext("StoredVehicles") + + lib registerContext({ + id = "thisVehicle", + title = random.name, + options = { + {title = "Kosten: "..zone.price}, + {title = ""}, + { + title = "Akzeptieren", + description = "Geld wird vom Bankkonto abgebucht!", + onSelect = function() + lib.hideContext("thisVehicle") + StoredVehicle(vehicles[i], zone) + end + }, + { + title = "Abbrechen", + description = "Das ist sehr Schade,", + icon = "close", + onSelect = function() + lib.hideContext("thisVehicle") + end + } + } }) + + lib.showContext("thisVehicle") end end })