[Tutorial] Creating Teleport Commands
#1

Creating Teleport Commands

Introduction
Here's a tutorial that will teach you how to make teleport commands. I'll do my best to help newbies.


Getting Coordinates for the Teleport Command
On this part, I'll teach you how to get coordinates for your teleport position.
So, open "samp_debug" on your GTA San Andreas file directory.



So, when the game is started, find a place for the coordinates or the teleport position. After you found a place, type "/save", without the codes.



After that, quit the "samp_debug" and go to your GTA San Andreas user files, then go to "SAMP", and double click "savedpositions.txt". There you can find the coordinates that you saved on "samp_debug".



Coding
Let's start coding our command now!
By the way, we need "ZCMD" include by Zeex. We need it to help us make commands faster! You can download "ZCMD" here: https://sampforum.blast.hk/showthread.php?tid=91354
pawn Код:
// This are includes! It helps to make our scripts easier and faster! But "a_samp" include is mandatory.
#include <a_samp>
#include <zcmd>

main()
{

}

public OnGameModeInit()
{
    AddPlayerClass(0,1811.1185,-1810.0187,13.5419,32.6492,0,0,0,0,0,0); // We need to make a player to use our teleport command. And it is where the player is spawned.
    return 1;
}

CMD:tp1(playerid, params[])
{
    SetPlayerPos(playerid, 1333.9718,-984.8143,33.8966); // This is the script to teleport you to the coordinates when you type "/tp1", without the quotes.
    return 1;
}
Alright, that's all! You can create teleport commands with those simple steps! Thank you for reading my tutorial! God bless ya'll and have a very nice day!

Credits
Zeex - ZCMD Include
Me - This Tutorial
Reply
#2

If there are some errors or you guys didn't understand it, feel free to reply and comment.
Reply
#3

Thanks
Reply
#4

Nice Post!
Reply
#5

Nothing that hasn't been done before. I'm sorry.
Reply
#6

You donґt need to open samp debug to save ingame positions.
Nice that you made a tutorial, but next time try doing a tutorial about something that has no tutorial or very less tutorials.
+rep for your effort anyway.
Reply
#7

Quote:
Originally Posted by Andre02
Посмотреть сообщение
You donґt need to open samp debug to save ingame positions.
Nice that you made a tutorial, but next time try doing a tutorial about something that has no tutorial or very less tutorials.
+rep for your effort anyway.
I'm very sorry for posting a tutorial that already exist, I'll try my best to make other tutorials that are less. Thanks anyway!
Reply
#8

Well, guess someone will find this useful.
Reply
#9

never saw that before, lol
Reply
#10

Quote:
Originally Posted by Vince
Посмотреть сообщение
ok this makes me laugh.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)