CodyLewis Posted February 24, 2014 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
MTA Team 0xCiBeR Posted February 24, 2014 MTA Team 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 )
pa3ck Posted February 24, 2014 Posted February 24, 2014 It's server side, are you sure you defined the script as server in your meta.xml?
CodyLewis Posted February 24, 2014 Author Posted February 24, 2014 well it warped me but not to location I wanted
CodyLewis Posted February 24, 2014 Author Posted February 24, 2014 Oh one works but the other warped me to random location
pa3ck Posted February 24, 2014 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 )
CodyLewis Posted February 24, 2014 Author Posted February 24, 2014 Well I might of found problem Some how the cord I set for secound one some one changed
CodyLewis Posted February 24, 2014 Author Posted February 24, 2014 Oh well thats odd changed it back does samething
CodyLewis Posted February 24, 2014 Author Posted February 24, 2014 isnt that the same script other guy posted
CodyLewis Posted February 24, 2014 Author Posted February 24, 2014 Ah I fixed it and extra - was in the exit cord
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