abu5lf Posted March 26, 2012 Share Posted March 26, 2012 function showWindow( ) guiSetVisible (win, true ) showCursor ( true ) end addEvent( "showWindow", true ) addEventHandler( "showWindow", root, showWindow ) function closeWindow() guiSetVisible ( win, false) showCursor(false) end local marker = createMarker( 781.4, -1360.2, 13.2, 'cylinder', 3, 0, 0, 255, 100 ) function MarkerHit() triggerClientEvent ("showWindow", ) end addEventHandler( "onMarkerHit", marker, MarkerHit ) Link to comment
drk Posted March 26, 2012 Share Posted March 26, 2012 Client-side: local marker = createMarker( 781.4, -1360.2, 13.2, 'cylinder', 3, 0, 0, 255, 100 ) addEventHandler ( 'onClientMarkerHit', root, function ( ) if ( source == marker ) then guiSetVisible ( win, true ); showCursor ( true ); end end ) function closeWindow ( ) guiSetVisible ( win, false ); showCursor ( false ); end Link to comment
TAPL Posted March 26, 2012 Share Posted March 26, 2012 Client-side: local marker = createMarker( 781.4, -1360.2, 13.2, 'cylinder', 3, 0, 0, 255, 100 ) addEventHandler ( 'onClientMarkerHit', root, function ( ) if ( source == marker ) then guiSetVisible ( win, true ); showCursor ( true ); end end ) function closeWindow ( ) guiSetVisible ( win, false ); showCursor ( false ); end local marker = createMarker(781.4, -1360.2, 13.2, 'cylinder', 3, 0, 0, 255, 100) addEventHandler('onClientMarkerHit',marker, function(hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(win,true) showCursor(true) end end) function closeWindow() guiSetVisible(win,false) showCursor(false) end Link to comment
drk Posted March 26, 2012 Share Posted March 26, 2012 Client-side: local marker = createMarker( 781.4, -1360.2, 13.2, 'cylinder', 3, 0, 0, 255, 100 ) addEventHandler ( 'onClientMarkerHit', root, function ( ) if ( source == marker ) then guiSetVisible ( win, true ); showCursor ( true ); end end ) function closeWindow ( ) guiSetVisible ( win, false ); showCursor ( false ); end local marker = createMarker(781.4, -1360.2, 13.2, 'cylinder', 3, 0, 0, 255, 100) addEventHandler('onClientMarkerHit',marker, function(hitPlayer) if (hitPlayer == localPlayer) then guiSetVisible(win,true) showCursor(true) end end) function closeWindow() guiSetVisible(win,false) showCursor(false) end I forget this every time Link to comment
abu5lf Posted March 26, 2012 Author Share Posted March 26, 2012 Thanks for all to help =) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now