Eweest Posted July 7, 2015 Posted July 7, 2015 Hi guys! Such question. How to make so that when you press the button opened another window
Miika Posted July 7, 2015 Posted July 7, 2015 OnClientGUIClick GuiCreateWindow Real motorbike backflip / frontflip script: https://forum.mtasa.com/viewtopic.php?f=108&t=98191
Tekken Posted July 7, 2015 Posted July 7, 2015 Hi guys! Such question. How to make so that when you press the button opened another window There is an example: function drawWindowAndButton() window_1 = guiCreateWindow(x, y, w, h, "WINDOW 1", false)--Create window 1(Were button is) window_2 = guiCreateWindow(x, y, w, h, "WINDOW 2", false)--Create window 2(The window to show after click) guiSetVisible(window_2, false)--Make window 2 invisible!So we can make is visible later. button = guiCreateButton(x, y, w, h, "SHOW WINDOW 2", false, window_1)--Create the button! end addEventHandler("onClientResourceStart", resourceRoot, drawWindowAndButton) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), function() if (source == button) then guiSetVisible(window_2, true) --Now make window 2 visible! end end) Resources I made: attachToBones - A newer bone_attach. Simple Level system - Just a simple level system. Do not PM me for help with leaked scripts! I WILL NOT HELP YOU!
Eweest Posted July 7, 2015 Author Posted July 7, 2015 Hi guys! Such question. How to make so that when you press the button opened another window There is an example: function drawWindowAndButton() window_1 = guiCreateWindow(x, y, w, h, "WINDOW 1", false)--Create window 1(Were button is) window_2 = guiCreateWindow(x, y, w, h, "WINDOW 2", false)--Create window 2(The window to show after click) guiSetVisible(window_2, false)--Make window 2 invisible!So we can make is visible later. button = guiCreateButton(x, y, w, h, "SHOW WINDOW 2", false, window_1)--Create the button! end addEventHandler("onClientResourceStart", resourceRoot, drawWindowAndButton) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), function() if (source == button) then guiSetVisible(window_2, true) --Now make window 2 visible! end end) Thank you. I figured out
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