WallMart Posted December 22, 2009 Share Posted December 22, 2009 hey, im looking for a simple teleport script that makes use of markers, just to get somewhere quickly... im a total noob at scripting so help would be appreciated thx in advance Link to comment
capitanazop Posted December 22, 2009 Share Posted December 22, 2009 local myMarker = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) function MarkerHit( hitPlayer, matchingDimension ) setElementPosition ( hitPlayer, posX, posY, posZ ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) Link to comment
WallMart Posted January 2, 2010 Author Share Posted January 2, 2010 local myMarker = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) function MarkerHit( hitPlayer, matchingDimension ) setElementPosition ( hitPlayer, posX, posY, posZ ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) .... i dont understand a thing about this?"can i just put in a file and save it and my teleporter will work?(read:im a total noob at scripting) Link to comment
50p Posted January 3, 2010 Share Posted January 3, 2010 If you're total noob, I suggest you have a read at: - https://wiki.multitheftauto.com/wiki/Scr ... troduction - https://wiki.multitheftauto.com/wiki/Main_Page - and https://forum.multitheftauto.com/viewtop ... 91&t=25032 Link to comment
WallMart Posted January 3, 2010 Author Share Posted January 3, 2010 If you're total noob, I suggest you have a read at:- https://wiki.multitheftauto.com/wiki/Scr ... troduction - https://wiki.multitheftauto.com/wiki/Main_Page - and https://forum.multitheftauto.com/viewtop ... 91&t=25032 but well the problem is that i couldnt understand one of these tutorials i hoped someone just had this simple script ready to be used and just with an easy explanation of what i have to fill in to get the portals connected Link to comment
Ziemys Posted January 6, 2010 Share Posted January 6, 2010 local myMarker = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) function MarkerHit( hitPlayer, matchingDimension ) setElementPosition ( hitPlayer, posX, posY, posZ ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) .... i dont understand a thing about this?"can i just put in a file and save it and my teleporter will work?(read:im a total noob at scripting) local myMarker = createMarker( -2596.6259765625, 579.3583984375, 15.626741409302, 'cylinder', 2.0, 255, 0, 0, 150 ) -- This one creates a marker with cylinder form at x,y,z coordinates and makes marker red. function MarkerHit( hitPlayer, matchingDimension ) -- This line creates a function with 2 arguments hitPlayer and matchingDimension (I don't know very much about arguments). setElementPosition ( hitPlayer, posX, posY, posZ ) -- This line teleports hitPlayer ( player that hits marker) to posX, posY and posZ coordinates. end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- This is event handler read about it at [url=http://robhol.net/guide/basics/?p=8]http://robhol.net/guide/basics/?p=8[/url] And... Yes you can save it and start the server, but first you need to save this in a lua file and make it server side in meta.xml. 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