Platin Posted August 3, 2013 Share Posted August 3, 2013 Hola eh creado una "Guía para N00bs" en la cual tengo unos problemas para que anda, quiero que funcione al apretar el F1 y que al apretar el botón cerrar se cierre, el problema es que no se abré Código: GUIEditor = { memo = {}, button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function guiapanel() GUIEditor.window[1] = guiCreateWindow(471, 179, 342, 356, "Guía para gente nueva", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(24, 38, 294, 267, "1- Al principio, si apareces en cualquier lado en el cual no sea una base, pon /reconnect\n\n2- Si no te aparece un Login, pon /reconnect\n\n3- El Cilindro Amarillo es para Armas, el Rojo para Banco, el Verde para Skins, el Celeste para Comida y el Azul para autos.\n\n4- La Z es para elegir animaciones.\n\n5- El F2 te sirve para comprar Skills.\n\n6- F3 para el menú de los Autos.\n\nCualquier otra duda contactar con VIPs, con Mods, SuperMods y con Admins.", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(322, -4991, 10, 633, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(316, -3978, 16, 625, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.button[3] = guiCreateButton(326, -3164, 5, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") GUIEditor.button[4] = guiCreateButton(322, -3427, 9, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") GUIEditor.button[5] = guiCreateButton(264, 327, 54, 16, "Cerrar", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA") addEventHandler( "OnClientGUIclick", Cerrar, Exit, false) end end function Exit() showcursor (false) guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) bindKey("F2", "down", function () if (guiGetVisible(GUIEditor.window[1]) == true) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) else guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end ) addEventHandler("onClientResourceStart", root, function () guiSetVisible(GUIEditor.window[1], false) showCursor(false) end ) end addEventHandler("onClientResourceStart", resourceRoot, guiapanel) Link to comment
FraN-724 Posted August 3, 2013 Share Posted August 3, 2013 Sera porque tienes como bind para que se abra el F2? cambialo al F1 Link to comment
Platin Posted August 3, 2013 Author Share Posted August 3, 2013 Sera porque tienes como bind para que se abra el F2? cambialo al F1 Ese fue un FAIL, pero no cambio nada Alguna otra idea? Link to comment
EstrategiaGTA Posted August 3, 2013 Share Posted August 3, 2013 Pues claro que no anda, la función 'Exit' no tiene ningún end. También has usado el evento 'onClientResourceStart' dos veces para la función 'guiapanel', y para la última función que no tiene nombre no le hiciste nada. Link to comment
Platin Posted August 3, 2013 Author Share Posted August 3, 2013 Pues claro que no anda, la función 'Exit' no tiene ningún end. También has usado el evento 'onClientResourceStart' dos veces para la función 'guiapanel', y para la última función que no tiene nombre no le hiciste nada. Nada cambio, mira te muestro ahora como esta: GUIEditor = { memo = {}, button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function guiapanel() GUIEditor.window[1] = guiCreateWindow(471, 179, 342, 356, "Guía para gente nueva", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(24, 38, 294, 267, "1- Al principio, si apareces en cualquier lado en el cual no sea una base, pon /reconnect\n\n2- Si no te aparece un Login, pon /reconnect\n\n3- El Cilindro Amarillo es para Armas, el Rojo para Banco, el Verde para Skins, el Celeste para Comida y el Azul para autos.\n\n4- La Z es para elegir animaciones.\n\n5- El F2 te sirve para comprar Skills.\n\n6- F3 para el menú de los Autos.\n\nCualquier otra duda contactar con VIPs, con Mods, SuperMods y con Admins.", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(322, -4991, 10, 633, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(316, -3978, 16, 625, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.button[3] = guiCreateButton(326, -3164, 5, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") GUIEditor.button[4] = guiCreateButton(322, -3427, 9, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") GUIEditor.button[5] = guiCreateButton(264, 327, 54, 16, "Cerrar", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA") addEventHandler( "OnClientGUIclick", Cerrar, Exit, false) end end function Exit() showcursor (false) guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) end bindKey("F1", "down", function () if (guiGetVisible(GUIEditor.window[1]) == true) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) else guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end ) addEventHandler("onClientResourceStart", root, function () guiSetVisible(GUIEditor.window[1], false) showCursor(false) end ) end addEventHandler("onClientResourceStart", resourceRoot, guiapanel) Link to comment
TheCrazy17 Posted August 3, 2013 Share Posted August 3, 2013 GUIEditor = { memo = {}, button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(471, 179, 342, 356, "Guía para gente nueva", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(24, 38, 294, 267, "1- Al principio, si apareces en cualquier lado en el cual no sea una base, pon /reconnect\n\n2- Si no te aparece un Login, pon /reconnect\n\n3- El Cilindro Amarillo es para Armas, el Rojo para Banco, el Verde para Skins, el Celeste para Comida y el Azul para autos.\n\n4- La Z es para elegir animaciones.\n\n5- El F2 te sirve para comprar Skills.\n\n6- F3 para el menú de los Autos.\n\nCualquier otra duda contactar con VIPs, con Mods, SuperMods y con Admins.", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(322, -4991, 10, 633, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(316, -3978, 16, 625, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.button[3] = guiCreateButton(326, -3164, 5, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") GUIEditor.button[4] = guiCreateButton(322, -3427, 9, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") cerrarPanel = guiCreateButton(264, 327, 54, 16, "Cerrar", false, GUIEditor.window[1]) guiSetProperty(cerrarPanel, "NormalTextColour", "FFAAAAAA") addEventHandler ( "onClientGUIClick", cerrarPanel, Exit, false ) end ) function onresourceStart () bindKey ("F1", "down", abrirPanel) guiSetVisible (GUIEditor.window[1], false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function abrirPanel () getVisible = guiGetVisible (GUIEditor.window[1]) if (getVisible == false) then guiSetVisible (GUIEditor.window[1], true) showCursor (true) end end function Exit () guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( false ) end Link to comment
Platin Posted August 3, 2013 Author Share Posted August 3, 2013 GUIEditor = { memo = {}, button = {}, window = {}, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(471, 179, 342, 356, "Guía para gente nueva", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(24, 38, 294, 267, "1- Al principio, si apareces en cualquier lado en el cual no sea una base, pon /reconnect\n\n2- Si no te aparece un Login, pon /reconnect\n\n3- El Cilindro Amarillo es para Armas, el Rojo para Banco, el Verde para Skins, el Celeste para Comida y el Azul para autos.\n\n4- La Z es para elegir animaciones.\n\n5- El F2 te sirve para comprar Skills.\n\n6- F3 para el menú de los Autos.\n\nCualquier otra duda contactar con VIPs, con Mods, SuperMods y con Admins.", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(322, -4991, 10, 633, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(316, -3978, 16, 625, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.button[3] = guiCreateButton(326, -3164, 5, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") GUIEditor.button[4] = guiCreateButton(322, -3427, 9, 15, "", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") cerrarPanel = guiCreateButton(264, 327, 54, 16, "Cerrar", false, GUIEditor.window[1]) guiSetProperty(cerrarPanel, "NormalTextColour", "FFAAAAAA") addEventHandler ( "onClientGUIClick", cerrarPanel, Exit, false ) end ) function onresourceStart () bindKey ("F1", "down", abrirPanel) guiSetVisible (GUIEditor.window[1], false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) function abrirPanel () getVisible = guiGetVisible (GUIEditor.window[1]) if (getVisible == false) then guiSetVisible (GUIEditor.window[1], true) showCursor (true) end end function Exit () guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) showCursor ( false ) end Muchas Gracias Link to comment
Recommended Posts