Mati Posted February 2, 2013 Share Posted February 2, 2013 Buenas c: Tengo un GUI creado, y en el hay un botón que al apretarlo, abre otro GUI... mi problema es que cuando aprieto ese boton el GUI se abre mas de una vez, no solo una.. ¿Qué función, o que cosa debo usar para arreglar eso? Mi otra duda es saber como ponerle tiempo a una animación, es decir.. determinar una anim a un player y que esta Anim dure hasta cierto tiempo. Gracias por leer:3 Link to comment
Mati Posted February 2, 2013 Author Share Posted February 2, 2013 mostra el codigo:D function showGUI(theplayer) local id = getElementModel ( theplayer ) if id == 0 then if ( theplayer == localPlayer ) then Ventana = guiCreateWindow(179, 161, 335, 130, "Sistema de Musculatura", false ) guiWindowSetSizable(Ventana, false) FlechaIzq = guiCreateButton(10, 55, 30, 31, "<", false, Ventana) guiSetProperty(FlechaIzq, "NormalTextColour", "FFAAAAAA") Ejer = guiCreateButton(127, 55, 94, 32, "EJERCITARME", false, Ventana) guiSetProperty(Ejer, "NormalTextColour", "FFAAAAAA") Cerrar = guiCreateButton(305, 103, 20, 17, "x", false, Ventana) guiSetProperty(Cerrar, "NormalTextColour", "FFAAAAAA") showCursor ( true ) addEventHandler ( "onClientGUIClick", Cerrar, Exit, false ) addEventHandler ( "onClientGUIClick", FlechaIzq, Ayuda, false ) addEventHandler ( "onClientGUIClick", Ejer, Ejercitar, false ) end end end addEventHandler( "onClientMarkerHit", marker, showGUI ) function Exit () guiSetVisible ( Ventana, not guiGetVisible ( Ventana) ) showCursor ( false ) end function Ayuda () VentanaHelp = guiCreateWindow(10, 161, 163, 130, "Ayuda", false) guiWindowSetSizable(VentanaHelp, false) guiSetAlpha(VentanaHelp, 0.72) FlechaDer = guiCreateButton(138, 56, 15, 22, ">", false, VentanaHelp) guiSetProperty(FlechaDer, "NormalTextColour", "FFAAAAAA") showCursor ( true ) addEventHandler ( "onClientGUIClick", FlechaDer, ExitAy, false ) end function ExitAy() guiSetVisible ( VentanaHelp, not guiGetVisible ( VentanaHelp) ) end :'B Link to comment
Other Languages Moderators Cuervo_fi Posted February 4, 2013 Other Languages Moderators Share Posted February 4, 2013 Revisa bien el codigo. addEventHandler ( "onClientGUIClick", Cerrar, Exit, false ) addEventHandler ( "onClientGUIClick", FlechaIzq, Ayuda, false ) addEventHandler ( "onClientGUIClick", Ejer, Ejercitar, false ) Link to comment
Plate Posted February 4, 2013 Share Posted February 4, 2013 Yo no encontraba este topic jaja Link to comment
Mati Posted February 5, 2013 Author Share Posted February 5, 2013 Revisa bien el codigo. addEventHandler ( "onClientGUIClick", Cerrar, Exit, false ) addEventHandler ( "onClientGUIClick", FlechaIzq, Ayuda, false ) addEventHandler ( "onClientGUIClick", Ejer, Ejercitar, false ) D: ? Link to comment
FraN-724 Posted February 5, 2013 Share Posted February 5, 2013 Responderé tu duda sobre la anim que dure asta cierto tiempo, utiliza setTimer Link to comment
Mati Posted February 5, 2013 Author Share Posted February 5, 2013 Responderé tu duda sobre la anim que dure asta cierto tiempo, utiliza setTimer Gracias. Link to comment
Recommended Posts