Black2 Posted July 17, 2015 Share Posted July 17, 2015 Why this don't work ? I need this open only in dimension 2 local markerp = createMarker( -1868.72, 46.16, 1054.2, 'Cylinder', 1.5, 255, 255, 0, 170 ); setElementDimension(markerp, 2) 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) Link to comment
GTX Posted July 17, 2015 Share Posted July 17, 2015 local markerp = createMarker( -1868.72, 46.16, 1054.2, 'Cylinder', 1.5, 255, 255, 0, 170 ); setElementDimension(markerp, 2) function Pilotjob(hitElement, matchingDimension) if getElementType(hitElement) == "player" and (hitElement == localPlayer) and (matchingDimension == true) then if not guiGetVisible(Wnd) then guiSetVisible(Wnd, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", markerp, Pilotjob) Link to comment
Rataj Posted July 18, 2015 Share Posted July 18, 2015 Just to explain (to prevent making same mistake), variable 'matchingDimension' outputs either 'true' or 'false' se there is no need to check player's dimension again. 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