monstergnom Posted February 15, 2010 Share Posted February 15, 2010 Hey guys, I created a marker to port me into a casino. This works well. But now, I can't port myself out (with another Marker - in the casino ofc). Here's the code. I just can port myself out of the casino with /leave markerleave = createMarker( 2002.509765625,1016.2685546875,994.46875 ) function leaveCasino ( thePlayer ) setElementInterior ( thePlayer, 0, 2027.6220703125, 1007.2666015625, 10.8203125 ) end addEventHandler ( "onMarkerHit", markerleave, leaveCasino ) addCommandHandler("leave", leaveCasino) BTW: I see the Marker in the casino, but nothing happens if I walk into it. Greets Link to comment
DakiLLa Posted February 15, 2010 Share Posted February 15, 2010 (edited) you should check the type of element which hits your marker. If it is a player, then teleport him. function leaveCasino ( thePlayer ) if getElementType( thePlayer ) == "player" then setElementInterior ( thePlayer, 0, 2027.6220703125, 1007.2666015625, 10.8203125 ) end end Edited February 15, 2010 by Guest Link to comment
monstergnom Posted February 15, 2010 Author Share Posted February 15, 2010 (edited) Doesn't work It seems that I don't hit the marker => Are Markers possible @ interiors? Edited February 15, 2010 by Guest Link to comment
DakiLLa Posted February 15, 2010 Share Posted February 15, 2010 uhm, may be you forgot to put the leaveMarker in interior with 'setElementInterior' Link to comment
DakiLLa Posted February 15, 2010 Share Posted February 15, 2010 well, as i can see, you have created a marker somewhere in interior, buy you havent set his interior leaveMarker = createMarker( ... ) setElementInterior( leaveMarker, 3 ) --3 is for example.. Link to comment
monstergnom Posted February 15, 2010 Author Share Posted February 15, 2010 Yep, thats what i forgot =) ty mate 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