SA-MP Forums Archive
How To Create A Teleport? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How To Create A Teleport? (/showthread.php?tid=371781)



How To Create A Teleport? - MikkaVanBuuren - 24.08.2012

Hi There I am here to Ask you guys How Do I create a teleport and How Do I get the Coordinates?


Re: How To Create A Teleport? - FalconX - 24.08.2012

Quote:
Originally Posted by MikkaVanBuuren
Посмотреть сообщение
Hi There I am here to Ask you guys How Do I create a teleport and How Do I get the Coordinates?
Just go ingame and stand in the place where you want the teleport coordinates to be, and then type /save it will get save in Documents > GTA SA > SAMP > savepositions.txt

and the rest you can read here:

https://sampforum.blast.hk/showthread.php?tid=369474

And command can be like this:

pawn Код:
CMD:teleport( playerid, params[ ] )
{
    SetPlayerPos( playerid, X, Y, Z ); // put coordinates on X, Y and Z
    return 1;
}



Re: How To Create A Teleport? - clarencecuzz - 24.08.2012

If you want to get co-ordinates, you can go in-game and type '/save'.
Then you can exit the game, go to your GTA User Files directory, then into the 'SAMP' folder, and finally inside savedpositions.txt, you will find the co-ordinates.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/teleportname", true) == 0)
    {
        SetPlayerPos(playerid, X, Y, Z); //Replace X, Y and Z with your co-ordinates.
        return 1;
    }
    return 0;
}



Re: How To Create A Teleport? - Djole1337 - 24.08.2012

Ingame command
/rs (Raw Save) is like /save, but it only saves your current position and facing angle in rawpositions.txt in your user files directory. No extra information is saved.


Re: How To Create A Teleport? - MikkaVanBuuren - 24.08.2012

Say I have a mapping now
How WOuld I go to it if i dont know where it is Im Giving you an Example here
Quote:

CreateObject(19377,1840.29980469,-1721.59960938,5201.50000000,0.00000000,90.00000000 ,0.00000000)

How Do I take the coords from that object to go to it?