Black2 Posted July 17, 2015 Share Posted July 17, 2015 Hello i have this,he open in all dimensions how i put to open only in dimension 2 ? Thx function Pilotjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(Wnd) then guiSetVisible(Wnd, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", markerp, Pilotjob) Link to comment
Perfect Posted July 17, 2015 Share Posted July 17, 2015 The event 'onClientMarkerHit' have two arguments, first one is hitElement and the second is matchingDimension. You can use getElementDimension to get player current dimension. You can do a simple if statement between getElementDimension and matchingDimension to make gui-window open only when a player is in specific dimension. Link to comment
GTX Posted July 17, 2015 Share Posted July 17, 2015 If you still don't know how to do it with Perfect his post: function Pilotjob(hitElement, matchingDimension) if getElementType(hitElement) == "player" and (hitElement == localPlayer) and (getElementDimension(hitElement) == matchingDimension) then if not guiGetVisible(Wnd) then guiSetVisible(Wnd, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", markerp, Pilotjob) Your marker must be in dimension 2. 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