From 8df30ff398960fe62d690b682bc8f02d2dba9a12 Mon Sep 17 00:00:00 2001 From: Nordi98 Date: Thu, 31 Jul 2025 07:04:16 +0200 Subject: [PATCH] Update main.lua --- .../[carscripts]/nordi_seats/client/main.lua | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/resources/[carscripts]/nordi_seats/client/main.lua b/resources/[carscripts]/nordi_seats/client/main.lua index 83f4e039b..fe8370987 100644 --- a/resources/[carscripts]/nordi_seats/client/main.lua +++ b/resources/[carscripts]/nordi_seats/client/main.lua @@ -374,7 +374,7 @@ local function switchSeat(vehicle, newSeatIndex) end end --- Tür-Kontrollfunktion +-- Tür-Kontrollfunktion (korrigierte Version) local function controlDoor(vehicle, doorIndex) if GetVehicleDoorAngleRatio(vehicle, doorIndex) > 0.0 then SetVehicleDoorShut(vehicle, doorIndex, false) @@ -383,9 +383,12 @@ local function controlDoor(vehicle, doorIndex) SetVehicleDoorOpen(vehicle, doorIndex, false, false) QBCore.Functions.Notify('Tür geöffnet', 'success') end + -- Menü nach kurzer Verzögerung neu öffnen, damit die Benachrichtigung sichtbar ist + Wait(100) + showDoorControlMenu(vehicle) end --- Fenster-Kontrollfunktion +-- Fenster-Kontrollfunktion (korrigierte Version) local function controlWindow(vehicle, windowIndex) if IsVehicleWindowIntact(vehicle, windowIndex) then RollDownWindow(vehicle, windowIndex) @@ -394,6 +397,9 @@ local function controlWindow(vehicle, windowIndex) RollUpWindow(vehicle, windowIndex) QBCore.Functions.Notify('Fenster geschlossen', 'success') end + -- Menü nach kurzer Verzögerung neu öffnen, damit die Benachrichtigung sichtbar ist + Wait(100) + showWindowControlMenu(vehicle) end -- Extras-Kontrollfunktion @@ -409,7 +415,7 @@ local function controlExtra(vehicle, extraId) end end --- Türen-Kontrollmenü +-- Türen-Kontrollmenü (korrigierte Version) function showDoorControlMenu(vehicle) local options = { { @@ -425,6 +431,9 @@ function showDoorControlMenu(vehicle) end end QBCore.Functions.Notify('Alle Türen umgeschaltet', 'success') + -- Menü nach kurzer Verzögerung neu öffnen + Wait(100) + showDoorControlMenu(vehicle) end }, { @@ -494,7 +503,7 @@ function showDoorControlMenu(vehicle) lib.showContext('vehicle_door_menu') end --- Fenster-Kontrollmenü +-- Fenster-Kontrollmenü (korrigierte Version) function showWindowControlMenu(vehicle) local options = { { @@ -510,6 +519,9 @@ function showWindowControlMenu(vehicle) end end QBCore.Functions.Notify('Alle Fenster umgeschaltet', 'success') + -- Menü nach kurzer Verzögerung neu öffnen + Wait(100) + showWindowControlMenu(vehicle) end }, {