yanvr Posted April 24, 2012 Share Posted April 24, 2012 hi i have problem with this bind: bindKey("o", "down", function () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[2] ) ) end ) The gui is not open. It's my first time using guieditor. someone could help me? try commenting on the previous post but it was closed I did not want to steal resources just download community resources and modify for my server I did not know could not do that just think I'm a newbie and I'm lua learning little by little and now I can only modify community resources and ask for help from the people in this place. really sorry I did not want to be angry or think you tried to steal sorry x shadow and sorry again for my clumsy English Link to comment
Castillo Posted April 24, 2012 Share Posted April 24, 2012 bindKey ( "o", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) I don't see anything wrong with it, can you post your entire script? Link to comment
yanvr Posted April 24, 2012 Author Share Posted April 24, 2012 (edited) GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(227,186,309,254,"test",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(0.0291,0.1063,0.9385,0.8583,true,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Information",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(0.0724,0.1031,0.5138,0.1443,"stats:",true,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(0.069,0.3299,0.4448,0.2268,"skill:",true,GUIEditor_Tab[1]) GUIEditor_Label[3] = guiCreateLabel(0.0724,0.5361,0.331,0.2216,"rank:",true,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("vehicles",GUIEditor_TabPanel[1]) GUIEditor_Grid[1] = guiCreateGridList(0.0138,0.0309,0.4655,0.9381,true,GUIEditor_Tab[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) GUIEditor_Button[1] = guiCreateButton(0.5241,0.1082,0.4241,0.1959,"spawn",true,GUIEditor_Tab[2]) GUIEditor_Button[2] = guiCreateButton(0.5207,0.3557,0.431,0.1907,"buy",true,GUIEditor_Tab[2]) GUIEditor_Button[3] = guiCreateButton(0.5241,0.6237,0.431,0.1856,"sell",true,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) bindKey("o", "down", function () guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[2] ) ) end ) In this time it works But the panel appears when you connect I want to see panel when you press the button Edited April 24, 2012 by Guest Link to comment
Castillo Posted April 24, 2012 Share Posted April 24, 2012 GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(227,186,309,254,"test",false) guiSetVisible ( GUIEditor_Window[1], false ) GUIEditor_TabPanel[1] = guiCreateTabPanel(0.0291,0.1063,0.9385,0.8583,true,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("Information",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(0.0724,0.1031,0.5138,0.1443,"stats:",true,GUIEditor_Tab[1]) GUIEditor_Label[2] = guiCreateLabel(0.069,0.3299,0.4448,0.2268,"skill:",true,GUIEditor_Tab[1]) GUIEditor_Label[3] = guiCreateLabel(0.0724,0.5361,0.331,0.2216,"rank:",true,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("vehicles",GUIEditor_TabPanel[1]) GUIEditor_Grid[1] = guiCreateGridList(0.0138,0.0309,0.4655,0.9381,true,GUIEditor_Tab[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) GUIEditor_Button[1] = guiCreateButton(0.5241,0.1082,0.4241,0.1959,"spawn",true,GUIEditor_Tab[2]) GUIEditor_Button[2] = guiCreateButton(0.5207,0.3557,0.431,0.1907,"buy",true,GUIEditor_Tab[2]) GUIEditor_Button[3] = guiCreateButton(0.5241,0.6237,0.431,0.1856,"sell",true,GUIEditor_Tab[2]) bindKey ( "o", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) Link to comment
skyturk.sgf Posted April 24, 2012 Share Posted April 24, 2012 This code try easy addEventHandler("onClientResourceStart",resourceRoot, function() guiwindow = guiCreateWindow(227,186,309,254,"test",false) guiSetVisible ( guiwindow, false ) guitabpanel = guiCreateTabPanel(0.0291,0.1063,0.9385,0.8583,true,guiwindow) guitab = guiCreateTab("Information",guitabpanel) guilabel1 = guiCreateLabel(0.0724,0.1031,0.5138,0.1443,"stats:",true,guitab) guilabel2 = guiCreateLabel(0.069,0.3299,0.4448,0.2268,"skill:",true,guitab) guilabel3 = guiCreateLabel(0.0724,0.5361,0.331,0.2216,"rank:",true,guitab) guitab2 = guiCreateTab("vehicles",guitabpanel) guigrid = guiCreateGridList(0.0138,0.0309,0.4655,0.9381,true,guitab2) guiGridListSetSelectionMode(guigrid,2) guibutton1 = guiCreateButton(0.5241,0.1082,0.4241,0.1959,"spawn",true,guitab2) guibutton2 = guiCreateButton(0.5207,0.3557,0.431,0.1907,"buy",true,guitab2) guibutton3 = guiCreateButton(0.5241,0.6237,0.431,0.1856,"sell",true,guitab2) end ) function windowcloseopen () local IsWindowVisible = guiGetVisible(guiwindow) if (IsWindowVisible == true) then guiSetVisible(guiwindow, false) guiSetInputEnabled(false) showCursor(false) end if (IsWindowVisible == false) then guiSetVisible(guiwindow, true) showCursor(true) end end bindKey("o", "down", windowcloseopen) 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