AlvareZ_ Posted February 18, 2014 Share Posted February 18, 2014 Quisiera saber cual es el error acá, Todo funciona bien pero el problema es cuando otro jugador pasa por el marker y se sale a mi se me quita la gui! function onMarker(hitElement) if isElementWithinMarker(localPlayer, marker) or isElementWithinMarker(localPlayer, marker1) or isElementWithinMarker(localPlayer, marker2) or isElementWithinMarker(localPlayer, marker3) or isElementWithinMarker(localPlayer, marker4) or isElementWithinMarker(localPlayer, marker5) then addEventHandler("onClientRender", root, texto) bindKey ( "H", "down", Visible ) end end addEventHandler("onClientMarkerHit", root, onMarker) function onLeave(leaveElement) if (leaveElement == localPlayer) then removeEventHandler("onClientRender", root, texto) unbindKey ( "H", "down", Visible ) guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end addEventHandler("onClientMarkerLeave", root, onLeave) Link to comment
Castillo Posted February 18, 2014 Share Posted February 18, 2014 function onMarker ( hitElement ) if ( hitElement == localPlayer ) then if ( isElementWithinMarker ( localPlayer, marker ) or isElementWithinMarker ( localPlayer, marker1 ) or isElementWithinMarker ( localPlayer, marker2 ) or isElementWithinMarker ( localPlayer, marker3 ) or isElementWithinMarker ( localPlayer, marker4 ) or isElementWithinMarker ( localPlayer, marker5 ) ) then addEventHandler ( "onClientRender", root, texto ) bindKey ( "H", "down", Visible ) end end end addEventHandler ( "onClientMarkerHit", root, onMarker ) function onLeave ( leaveElement ) if ( leaveElement == localPlayer ) then removeEventHandler ( "onClientRender", root, texto ) unbindKey ( "H", "down", Visible ) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) end end addEventHandler ( "onClientMarkerLeave", root, onLeave ) Link to comment
AlvareZ_ Posted February 18, 2014 Author Share Posted February 18, 2014 Gracias, Pero yo la había solucionado! Link to comment
Recommended Posts