forked from Simnation/Main
Update main.lua
This commit is contained in:
parent
08165624e2
commit
dc9b07ba3d
1 changed files with 34 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue