Jump to content

simple marker teleport?


WallMart

Recommended Posts

  • 2 weeks later...
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

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...