Mefisto_PL Posted November 4, 2012 Posted November 4, 2012 Why when the player hit the marker then gui is showed to everyone? .. function StripMarkerHit ( thePlayer, HitElement ) if isElementWithinMarker ( thePlayer, Strip_Marker ) then guiSetVisible ( StripWindow, true ) showCursor ( true ) guiSetInputEnabled ( true ) else guiSetVisible ( StripWindow, false ) showCursor ( false ) guiSetInputEnabled ( false ) end end addEventHandler ( "onClientMarkerHit", Strip_Marker, StripMarkerHit )
Guest Guest4401 Posted November 4, 2012 Posted November 4, 2012 function StripMarkerHit ( thePlayer, HitElement ) if thePlayer == localPlayer then if isElementWithinMarker ( thePlayer, Strip_Marker ) then guiSetVisible ( StripWindow, true ) showCursor ( true ) guiSetInputEnabled ( true ) else guiSetVisible ( StripWindow, false ) showCursor ( false ) guiSetInputEnabled ( false ) end end end addEventHandler ( "onClientMarkerHit", Strip_Marker, StripMarkerHit )
Anderl Posted November 4, 2012 Posted November 4, 2012 addEventHandler( "onClientMarkerHit", Strip_Marker, function( player ) if ( player == localPlayer ) then guiSetVisible( StripWindow, not guiGetVisible( StripWindow ) ); showCursor( guiGetVisible( StripWindow ) ); guiSetInputEnabled( guiGetVisible( StripWindow ) ); end end )
TAPL Posted November 4, 2012 Posted November 4, 2012 showCursor not needed while using guiSetInputEnabled, because it will show the cursor already.
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