iiv03 Posted August 16, 2018 Share Posted August 16, 2018 I have designed the GUI drawing panel and open the button and want to do the dx panel with the gui panel which I just programming. I want a script that makes the DX panel open with a ( GUI panel! By Me )? Link to comment
VenomOG Posted August 16, 2018 Share Posted August 16, 2018 Explain moreand post codes. Link to comment
JeViCo Posted August 16, 2018 Share Posted August 16, 2018 local key = "f1" function menu() -- dx drawing stuff end bindKey(key,"down",function() if not menuVisible then addEventHandler("onClientRender",getRootElement(),menu) -- guiCreate stuff menuVisible = true else removeEventHandler("onClientRender",getRootElement(),menu) -- destroyElement(gui element) stuff menuVisible = nil end end) Link to comment
Discord Moderators Pirulax Posted August 16, 2018 Discord Moderators Share Posted August 16, 2018 local isMenuVisible = false function menu() -- dx drawing stuff end bindKey("f1","down",function() isMenuVisible = not isMenuVisible -- Flip the state(if it's was true now it's false, and vice versa) ((isMenuVisible and addEventHandler) or (removeEventHandler))("onClientRender", root, menu) if menuVisible then --// Do some stuff here if you want else --// or here end end) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now