Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Cream

Pages: [1]
1
MTA / [TUT] Creating a teleport marker
« on: February 14, 2012, 09:31:02 pm »
First we need to create a marker.
Code: (Example Marker) [Select]
telemarker1 = createMarker ( x, y, z, "type", size, r, g, b, a )
x: A floating point number representing the X coordinate on the map.
y: A floating point number representing the Y coordinate on the map.
z: A floating point number representing the Z coordinate on the map.
theType: The visual type of the marker to be created. Possible values:
  • "checkpoint": A race checkpoint. These are very tall, but not infinite, light pillars. Checkpoints snap to ground and become invisible after going over a certain Z height.
  • "ring": Doughnut shaped ring, normally used for aircraft.
  • "cylinder": Small glowing ground ring. These are the glow markers you walk into to activate missions or events in single player.
  • "arrow": Arrow pointing down. These are the arrows on the doors you can enter in single player, except MTA's are not animated by default.
  • "corona": A glowing ball of light.
size: The diameter of the marker to be created, in meters.
r: An integer number representing the amount of red to use in the colouring of the marker (0 - 255).
g: An integer number representing the amount of green to use in the colouring of the marker (0 - 255).
b: An integer number representing the amount of blue to use in the colouring of the marker (0 - 255).
a: An integer number representing the amount of alpha to use in the colouring of the marker (0 - 255 where 0 is transparent and 255 is opaque).

Then, we need to add function:
Code: (Teleport) [Select]
function Teleport
    setElementPosition ( source, x, y, z, warp = true )
end
addEventHandler( "onMarkerHit", telemarker1, Teleport)
x: The x coordinate of the destination.
y: The y coordinate of the destination.
z: The z coordinate of the destination.
warp: teleports players, resetting any animations they were doing. Setting this to false preserves the current animation.

Now our script needs to look like this:
Code: (Example) [Select]
telemarker1 = createMarker ( -2596.625, 579.358, 15.626, "cylinder", 2.0, 255, 0, 0, 150 )

function Teleport
    setElementPosition ( source, 5540, 1020, 1240, false )
end
addEventHandler( "onMarkerHit", telemarker1, Teleport)

2
Join requests / Re: Cream's Application
« on: February 14, 2012, 08:34:58 pm »
And maybe i can hear Gargamel's screams. Lol

3
Join requests / Cream's Application
« on: February 14, 2012, 06:15:07 pm »
1. Batuhan
2. Cream or maybe iCream
3. 15 [11.06.1996]
4. Turkey, Kocaeli
5. Uhmm.. IDK maybe 3 years.
6. Sure.
7. [CBH] Close Box House - Closed
    [R] Reality - Closed
    -dnd- Devils Never Die - Closed
    -cw- Car Walkers - Because of passiveness..
8. MSN: creampie@w.cn
9. -
10. I think upc has a great potential to become one of the best clans in MTA. Also i dont know why but i like upc team.
11. I have some Photoshop and GIMP knowledge maybe i can help to graphic design.
      I have some LUA knowledge too. But not enough to write scripts. I can edit or add new functions from other scripts.
12. ViaLpaNdo but it was 2 years ago ;D
13. As i told i have some Photoshop, some GIMP and some LUA...
14. I'm 10th grade student. I like animes lol :D. I like cartoons too ::). I listen Symphonic Death, Symphonic Black, Melodic Death, Black, Folk Metal also Muse -my favourite song is MK Ultra.-. That's all. :)

Pages: [1]