Hoka1234 Posted July 22, 2012 Share Posted July 22, 2012 (edited) Hi All , i need when i press on "Button" that show me new Widnow GUI my Code GUIEditor_Window = {} GUIEditor_Button = {} function test() GUIEditor_Window[1] = guiCreateWindow(275,102,581,569,"",false) GUIEditor_Button[1] = guiCreateButton(36,61,181,93,"SHOW",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(372,63,197,95,"SHOW New Window",false,GUIEditor_Window[1]) end it is just a test When i press on Button[2] Create New WINDOW Gui PS: Congratz Castillo Thanks. Edited July 22, 2012 by Guest Link to comment
Kenix Posted July 22, 2012 Share Posted July 22, 2012 (edited) guiSetVisible bindKey Use [lua ] [/lua ] tags(without spaces) if you want paste lua code! Edited July 22, 2012 by Guest Link to comment
Hoka1234 Posted July 22, 2012 Author Share Posted July 22, 2012 guiSetVisible bindKey Use [lua] [/lua] if you want paste lua code! O_O i want a one like Press F1 Freeroam script when i press on buton , it show new window Link to comment
Kenix Posted July 22, 2012 Share Posted July 22, 2012 Use function bindKey i said before. No one will write code for you. You should write yourself. Link to comment
Hoka1234 Posted July 22, 2012 Author Share Posted July 22, 2012 Use function bindKey i said before. No one will write code for you. You should write yourself. Fixed the format.. i dont want to bindkey ... and why u telling to me no one will write for you? maybe some body can do that , it is too easy , but i cant remember cuz i left the scripting from many months... i added the window with visible ... i just want when i press the button it show me that window just the code. Link to comment
Castillo Posted July 22, 2012 Share Posted July 22, 2012 You must use the event: onClientGUIClick for the button and bindKey to bind a key to a function to show your window Link to comment
robhol Posted July 22, 2012 Share Posted July 22, 2012 Use function bindKey i said before. No one will write code for you. You should write yourself. Fixed the format.. i dont want to bindkey ... and why u telling to me no one will write for you? maybe some body can do that , it is too easy , but i cant remember cuz i left the scripting from many months... i added the window with visible ... i just want when i press the button it show me that window just the code. He's telling you that nobody wants to write your script for you, because nobody wants to write your script for you. It's a matter of 2 function calls, it's not a major chore, but nobody wants to write anything for people who are too lazy to do this kind of extremely basic scripting for themselves. Link to comment
Hoka1234 Posted July 23, 2012 Author Share Posted July 23, 2012 Thank You Castillo i forgot the Wiki page it is the button only function initGUI( ) btnOutput = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) -- And attach our button to the outputEditBox function addEventHandler ( "onClientGUIClick", btnOutput, outputEditBox, false ) end addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), initGUI ) -- Setup our function to output the message to the chatbox function outputEditBox ( button ) if button == "left" then GUIEditor_Window[2] = guiCreateWindow(0.3086,0.2188,0.457,0.4206,"EMAIL SYSTEM",true) guiSetVisible(GUIEditor_Window[2],false) guiWindowSetSizable(GUIEditor_Window[2],false) end end addEventHandler("onClientResourceStart",resourceRoot, function() bindKey ("F3", "down", openGui ) end ) function openGui() if not isElement(btnOutput) then initGUI() end if not guiGetVisible(btnOutput) then guiSetVisible ( btnOutput, true ) else guiSetVisible ( btnOutput, false ) end end here's the code for who have same problem ------------------------ @rohbol : if he gived to me the wiki pages like castillo did , with out (no body will make for u) .. i would like hes helping. , so see Castillo gived me the wiki page with all i understand .. in just 1 line. and i said at first i've another code i just put that as Test ----------------------- anyway thank you all , Lock it please. Link to comment
Castillo Posted July 23, 2012 Share Posted July 23, 2012 You're welcome. P.S: There's no need to lock it. Link to comment
Hoka1234 Posted July 24, 2012 Author Share Posted July 24, 2012 You're welcome.P.S: There's no need to lock it. okay ^^ 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