CodyLewis Posted February 24, 2014 Share Posted February 24, 2014 im trying to make a marker that warps you but the markers arent warping me heres the code - Enter = createMarker( -607.0859375 ,2600.5422363281 ,54.5, "cylinder", 1.5 ) addEventHandler( "onMarkerHit", Enter ) function Enter( hitPlayer, Enter ) setElementPosition ( hitPlayer, -600.9814453125 ,-600.9814453125 ,55.5 ) end addEventHandler( "onMarkerHit", Exit ) Exit = createMarker( -601.1005859375, 2600.1203613281, 53.0390625, "cylinder", 1.5 ) function Exit( hitPlayer, Exit ) setElementPosition ( hitPlayer, -543.1064453125 ,2620.150390625 ,53.515625 ) end Link to comment
MTA Team 0xCiBeR Posted February 24, 2014 MTA Team Share Posted February 24, 2014 local Enter = createMarker( -607.0859375 ,2600.5422363281 ,54.5, "cylinder", 1.5 ) local Exit = createMarker( -601.1005859375, 2600.1203613281, 53.0390625, "cylinder", 1.5 ) function EnterFunc( hitPlayer ) setElementPosition ( hitPlayer, -600.9814453125 ,-600.9814453125 ,55.5 ) end function ExitFunc( hitPlayer ) setElementPosition ( hitPlayer, -543.1064453125 ,2620.150390625 ,53.515625 ) end addEventHandler( "onMarkerHit", Enter,EnterFunc ) addEventHandler( "onMarkerHit", Exit,ExitFunc ) Link to comment
CodyLewis Posted February 24, 2014 Author Share Posted February 24, 2014 Ah Thank You hope it works Link to comment
pa3ck Posted February 24, 2014 Share Posted February 24, 2014 It's server side, are you sure you defined the script as server in your meta.xml? Link to comment
CodyLewis Posted February 24, 2014 Author Share Posted February 24, 2014 ah I'll go check Link to comment
CodyLewis Posted February 24, 2014 Author Share Posted February 24, 2014 well it warped me but not to location I wanted Link to comment
CodyLewis Posted February 24, 2014 Author Share Posted February 24, 2014 Oh one works but the other warped me to random location Link to comment
pa3ck Posted February 24, 2014 Share Posted February 24, 2014 local Enter = createMarker( -607.0859375 ,2600.5422363281 ,54.5, "cylinder", 1.5 ) local Exit = createMarker( -601.1005859375, 2600.1203613281, 53.0390625, "cylinder", 1.5 ) function EnterFunc( hitPlayer ) setElementPosition ( hitPlayer, -600.9814453125 ,-600.9814453125 ,55.5 ) -- set the x, y, z position where you want to be teleported end function ExitFunc( hitPlayer ) setElementPosition ( hitPlayer, -543.1064453125 ,2620.150390625 ,53.515625 ) -- same, set x, y and z. end addEventHandler( "onMarkerHit", Enter,EnterFunc ) addEventHandler( "onMarkerHit", Exit,ExitFunc ) Link to comment
CodyLewis Posted February 24, 2014 Author Share Posted February 24, 2014 Well I might of found problem Some how the cord I set for secound one some one changed Link to comment
CodyLewis Posted February 24, 2014 Author Share Posted February 24, 2014 Oh well thats odd changed it back does samething Link to comment
CodyLewis Posted February 24, 2014 Author Share Posted February 24, 2014 isnt that the same script other guy posted Link to comment
CodyLewis Posted February 24, 2014 Author Share Posted February 24, 2014 Ah I fixed it and extra - was in the exit cord 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