diff --git a/resources/[tools]/nordi_dj/client/main.lua b/resources/[tools]/nordi_dj/client/main.lua index b5cae487d..aa369d7c9 100644 --- a/resources/[tools]/nordi_dj/client/main.lua +++ b/resources/[tools]/nordi_dj/client/main.lua @@ -629,3 +629,37 @@ if Config.Debug then end end) end + +function OpenDJInterface() + if not isDJBooth then + lib.notify({ + title = 'DJ System', + description = 'Du musst an einem DJ Pult stehen', + type = 'error' + }) + return + end + + SetNuiFocus(true, true) + SendNUIMessage({ + type = 'showDJInterface', + center = true, -- Hinzugefügt: Zentriere das Interface + reset = true -- Hinzugefügt: Setze Position zurück + }) + + isUIOpen = true + + -- Disable controls while UI is open + CreateThread(function() + while isUIOpen do + DisableAllControlActions(0) + EnableControlAction(0, 1, true) -- Mouse look + EnableControlAction(0, 2, true) -- Mouse look + EnableControlAction(0, 3, true) -- Mouse movement + EnableControlAction(0, 4, true) -- Mouse movement + EnableControlAction(0, 5, true) -- Mouse wheel + EnableControlAction(0, 6, true) -- Mouse wheel + Wait(0) + end + end) +end