NextGenRP Posted May 4, 2012 Share Posted May 4, 2012 Hey guys, I've made a panel when a player clicks on another player it will open the panel. The problem is that before the player logged in the login GUI comes up and when a player clicks on the login edit the player panel comes up but it doesn't have any information because the player has not yet logged in, How can i stop the player panel GUI from showing if the user is not logged in? Or is there any way to check if a gui window is already open? -- this would be better for what i need. (not just this) Link to comment
yMassai Posted May 4, 2012 Share Posted May 4, 2012 I did not quite understand What you tried to speak. I recommend that you explicase best and show the script. Link to comment
NextGenRP Posted May 4, 2012 Author Share Posted May 4, 2012 It's a GUI that shows when you click on a player, I can't seem to reproduce the error now but it happened when a player tried to click on the Login GUI and the player GUI came up because the player is behind the gui, Here is another example with a different GUI: This is why checking if any GUI window is open it would be better i think. Link to comment
TAPL Posted May 4, 2012 Share Posted May 4, 2012 https://wiki.multitheftauto.com/wiki/GuiGetVisible Link to comment
NextGenRP Posted May 4, 2012 Author Share Posted May 4, 2012 With the guiGetVisible i need to use a gui argument don't i? I want to check if any window is open and yeah but then i would still have the error shown in the image. Link to comment
TAPL Posted May 4, 2012 Share Posted May 4, 2012 I want to check if any window is open. for _,gui in ipairs(getElementsByType("gui-window")) do if guiGetVisible(gui) then .. end end Link to comment
NextGenRP Posted May 4, 2012 Author Share Posted May 4, 2012 Thanks man the type argument gui-window wasn't in the wiki for getElementsByType Link to comment
TAPL Posted May 4, 2012 Share Posted May 4, 2012 Thanks man the type argument gui-window wasn't in the wiki for getElementsByType All elements listed here https://wiki.multitheftauto.com/wiki/Element Link to comment
NextGenRP Posted May 4, 2012 Author Share Posted May 4, 2012 I still have the problem this is what i added: for _,gui in ipairs(getElementsByType("gui-window")) do if guiGetVisible(gui) == true then else For some reason the GUI still shows when i open another GUI then try to open it. Link to comment
TAPL Posted May 4, 2012 Share Posted May 4, 2012 I still have the problem this is what i added: for _,gui in ipairs(getElementsByType("gui-window")) do if guiGetVisible(gui) == true then else For some reason the GUI still shows when i open another GUI then try to open it. We can't help you if you didn't post the code also this make no sense for _,gui in ipairs(getElementsByType("gui-window")) do if guiGetVisible(gui) == true then else also you can use this to move the gui to very back of all other GUI https://wiki.multitheftauto.com/wiki/GuiMoveToBack Link to comment
NextGenRP Posted May 4, 2012 Author Share Posted May 4, 2012 Never mind ill just put up with it. Another thing i want to know is, I changed the element data client side from a GUI then when the player quits i save it server side and then when a player logs in it should set the data server side, It works fine for everything else but this for some reason the thing i change from the GUI doesn't save 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