molinaa1 Posted May 18, 2014 Share Posted May 18, 2014 Necesito saber como hacer para que este Gui, En vez de salir con comando, que salga cuando pase por un Market. function newsGUI() newsGUI = guiCreateWindow(244, 160, 312, 286, "", false) guiWindowSetSizable(newsGUI, false) newsMemo = guiCreateMemo(10, 48, 292, 177, "Actualmente no ahi noticias nuevas en el sv", false, newsGUI) guiMemoSetReadOnly(newsMemo, true) newsClose = guiCreateButton(217, 248, 79, 28, "Close", false, newsGUI) newsLabel = guiCreateLabel(97, 18, 117, 20, "Sistema de noticias ", false, newsGUI) guiSetFont(newsLabel, "clear-normal") newsLabel2 = guiCreateLabel(7, 229, 295, 15, "---------------------------------------------------------------------------", false, newsGUI) showCursor( true ) end addCommandHandler("news",newsGUI) function closeButton() if newsClose then guiSetVisible(newsGUI,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),closeButton) Link to comment
Tomas Posted May 19, 2014 Share Posted May 19, 2014 local marker = createMarker(X,Y,Z,S,R,G,B,A) newsGUI = guiCreateWindow(244, 160, 312, 286, "", false) guiSetVisible(newsGUI,false) guiWindowSetSizable(newsGUI, false) newsMemo = guiCreateMemo(10, 48, 292, 177, "Actualmente no ahi noticias nuevas en el sv", false, newsGUI) guiMemoSetReadOnly(newsMemo, true) newsClose = guiCreateButton(217, 248, 79, 28, "Close", false, newsGUI) newsLabel = guiCreateLabel(97, 18, 117, 20, "Sistema de noticias ", false, newsGUI) guiSetFont(newsLabel, "clear-normal") newsLabel2 = guiCreateLabel(7, 229, 295, 15, "---------------------------------------------------------------------------", false, newsGUI) function closeButton() if newsClose then guiSetVisible(newsGUI,false) showCursor( false ) end end addEventHandler("onClientGUIClick",getRootElement(),closeButton) addEventHandler("onClientMarkerHit", marker, function (hitElement) if hitElement == localPlayer then guiSetVisible(newsGUI,true) showCursor(true) end end ) Link to comment
Recommended Posts