addEvent("checkIFGUIOpen", true)
function checkIFGUIOpen()
if (isAnyGUIOpen) then
outputChatBox("GUI open")
else
outputChatBox("false")
end
end
addEventHandler("checkIFGUIOpen", root, checkIFGUIOpen)
function isAnyGUIOpen()
local gui = getElementsByType('gui-window')
for _, v in ipairs(gui) do
if(guiGetVisible(v)) then
return true
end
end
return false
end
it outputs GUI open even thought I don't have any open, or does it count a cursor as one?