brunob22 Posted November 27, 2013 Share Posted November 27, 2013 Hello would like someone help me open up this gui I tried everything and could not if someone suber and tell me I would be very grateful my code padrao = {} b2mtadayz = {} GUIEditor = { staticimage = {}, combobox = {} } botao = {} b2 = {} padrao = {} addEventHandler("onClientResourceStart", resourceRoot, function() b2.windows = guiCreateWindow(180, 63, 996, 712, "PAINEL VIP B2 MTA DAYZ 1.0", false) guiWindowSetSizable(b2.windows, false) guiSetAlpha(b2.windows, 0.81) botao.sair = guiCreateButton(33, 640, 939, 62, "SAIR DO PAINEL VIP", false, b2.windows) guiSetFont(botao.sair, "default-bold-small") padrao.botao2 = guiCreateButton(20, 256, 252, 45, "", false, b2.windows) padrao.botao1 = guiCreateButton(20, 201, 252, 45, "", false, b2.windows) GUIEditor.combobox[1] = guiCreateComboBox(312, 320, 332, 202, "", false, padrao.botao1) b2mtadayz.label = guiCreateLabel(33, 613, 929, 17, "PAINEL VIP 1.0 FEITO POR: B2 MTA DAYZ", false, b2.windows) GUIEditor.staticimage[1] = guiCreateStaticImage(10, 19, 976, 136, ":Painel-VIPv2/Arquivos/Logo.png", false, b2.windows) padrao.botao3 = guiCreateButton(20, 311, 252, 45, "", false, b2.windows) padrao.botao5 = guiCreateButton(20, 423, 252, 45, "", false, b2.windows) padrao.botao4 = guiCreateButton(20, 366, 252, 45, "", false, b2.windows) padrao.botao6 = guiCreateButton(20, 478, 252, 45, "", false, b2.windows) padrao.botao7 = guiCreateButton(20, 533, 252, 45, "", false, b2.windows) end ) -- exit addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == botao.sair) then guiSetVisible(b2.windows,false) showCursor(false) end end ) Link to comment
Tete omar Posted November 27, 2013 Share Posted November 27, 2013 What way do you want to open this GUI with? e.g: with key, command, etc.. Link to comment
brunob22 Posted November 27, 2013 Author Share Posted November 27, 2013 What way do you want to open this GUI with? e.g: with key, command, etc.. can be both? Link to comment
Tete omar Posted November 28, 2013 Share Posted November 28, 2013 Use: bindKey addCommandHandler Link to comment
brunob22 Posted November 28, 2013 Author Share Posted November 28, 2013 Use: bindKey addCommandHandler dont works Link to comment
Snow-Man Posted November 29, 2013 Share Posted November 29, 2013 this is Bindkey Function and also show Cursor bindKey( "F1", "down", function () if ( guiGetVisible( b2.windows ) ) then guiSetVisible( b2.windows, false ) showCursor( false ) else guiSetVisible( b2.windows, true ) showCursor( true ) end end ) this Example Command Handler the command is opengui addCommandHandler ( "opengui", function ( ) guiSetVisible ( b2.windows, not guiGetVisible ( b2.windows ) ) showCursor ( not isCursorShowing( ) ) end ) Link to comment
TAPL Posted November 29, 2013 Share Posted November 29, 2013 This better. addCommandHandler("opengui", function() if guiGetVisible(b2.windows) then guiSetVisible(b2.windows, false) showCursor(false) else guiSetVisible(b2.windows, true) showCursor(true) end end) bindKey("F1", "down", "opengui") 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