I just started learning Lua a couple days ago, Have been working on this script said in the Title for like the pass day or so, I didn't really wanna ask for help just yet because I wanted to try and figure it out on my own but at this point I'm pretty stumped lol. I may just be over complicating it to much and I'm to stupid to figure it out.
I got it to where it will open the client_options and hide EnterGame but can't get it to work when doing isVisible or onClose callbacks to reopen EnterGame.
Here is the code that is being placed in entergame.lua and being called by @onClick: EnterGame.openOptions() in entergame.OTUI
I got it to where it will open the client_options and hide EnterGame but can't get it to work when doing isVisible or onClose callbacks to reopen EnterGame.
Here is the code that is being placed in entergame.lua and being called by @onClick: EnterGame.openOptions() in entergame.OTUI
Lua:
function EnterGame.openOptions()
print("Loaded Options")
modules.client_options.show()
if modules.client_options.show then
EnterGame.hide()
elseif not modules.client_options.isVisible and EnterGame.hide then
print("EnterGame Show")
EnterGame.show()
end
end
-- Another function I tried using onClose
function EnterGame.openOptions()
print("Loaded Options")
modules.client_options.show()
if modules.client_options.show then
EnterGame.hide()
print("EnterGame is Hid")
end
if modules.client_options.onClose then
print("EnterGame Show")
end
end