iSmokee Posted October 1, 2014 Posted October 1, 2014 tengo esta function function Button() if close then guiSetVisible(window,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),Button) addEventHandler("onClientMarkerHit", marker, function (hitElement) if hitElement == localPlayer then guiSetVisible(window,true) showCursor(true) end end ) no me da error me anda pero el problema es que cuando hago click en el window o se me cierra el panel lo mismo si apreto en un edit box se me cierra no entiendo porque .-.
DBY Posted October 1, 2014 Posted October 1, 2014 Has puesto para que cuando clickees cualquier parte del panel se le cierre a todo el que lo tenga abierto.
alex17 Posted October 1, 2014 Posted October 1, 2014 prueva asi function Button() if source == close then guiSetVisible(window,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),Button)
Tomas Posted October 1, 2014 Posted October 1, 2014 Si vas a usar un evento por gui-element no es recomendable usar getRootElement sino que el mismo gui-element como segundo argumento del evento.
Recommended Posts