Jump to content

Marker?!


Cornelis

Recommended Posts

Somebody can give me a script that send me from a marker to another marker (for example: switching interiors)

Or somebody can explain to me how to do that, I don't know anything about scripting; don't know how to make script. *For adding a script I need some help too :(.

Thanx,,

Cornelis (Simbad de zeeman server user)

Link to comment

Here, you'll need to know when a player enters a marker (onMarkerHit event) and set his position and interior accordingly. (setElementPosition, setElementInterior.)

I will tell you this: a housing system is a fairly large script, so I'd definitely start with the basics if I were you. (I'm assuming that's where you're going with this.)

I can recommend this guide: http://robhol.net/guide/basics/?p=1

Link to comment
But I don't want to follow tutorials, I just wanna do my thing, Map Editor. Somebody just can send me the script? I just wan't to continue witch that what I was doing!

You are blind?? I only want the script, I don't said YOU need to script it!

BTW In the tutorial is nothing about marker teleporting :lol:

And I said:

I don't know anything about scripting; don't know how to make script. *For adding a script I need some help too :(.

Thanx,,

Cornelis (Simbad de zeeman server user)

if key == "left" then -- on a left mousebutton

-- destroy his teleport point, if any

destroyElement ( getElementData ( source, "teleport" ) )

-- create a normal cylinder marker

local marker = createMarker ( x, y, z, "cylinder", 2, 0, 255, 0, 50 )

-- mark the cylinder as our "teleport" type

setElementData ( marker, "type", "teleport" )

-- link the creator (player) to the marker, and vice versa

setElementData ( source, "teleport", marker )

setElementData ( marker, "owner", source )

elseif key == "right" then -- on a right mousebutton

-- destroy his destination point, if any

destroyElement ( getElementData ( source, "destination" ) )

-- create a glowing corona

local marker = createMarker ( x, y, z+1, "corona", 1, 0, 255, 255, 50 )

-- mark the corona as our "destination" type

setElementData ( marker, "type", "destination" )

-- link the creator (player) to the marker, and vice versa

setElementData ( source, "destination", marker )

setElementData ( marker, "owner", source )

Are you crazy? :evil: I don't understand this man!

Link to comment

nah .. i asked you very politely if you could make that really tiny script for me and you agreed, if you would have said "No, here are some tutorials how to make that, have a look at them[..]", i would have said "ok thank you, i'll do that".

//edit: lol.. here you are

[attachment=0]marker.rar[/attachment]

Link to comment
I try to be nice now, Somebody can tell me where to put that script in?

extract the archive into your resources folder, join your server and open the console (F8 on your keyboard) and type start marker, then the script is running.

[RTS]SATAN, this is a script for example right? you just put some coordinates in it right?

yes and the only thing you have to do now is to change the coordinates for the marker and the place were the player will be teleported to.

(there are 2 ways to get coordinates: 1.go to the mta community center, there is a script to save your current position/coordinates into a text file 2. start a new map in the map editor, save it, open the .map file and get the coordinates of the object you've placed and copy them in the script)

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