From dc9b07ba3ddfca918fb49e63ce0856f824a6dbd6 Mon Sep 17 00:00:00 2001 From: Nordi98 Date: Sun, 3 Aug 2025 18:30:40 +0200 Subject: [PATCH] Update main.lua --- resources/[tools]/nordi_dj/client/main.lua | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) 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