[Tutorial] Creating Teleport Commands - 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)
+---- Forum: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Creating Teleport Commands (
/showthread.php?tid=589847)
Creating Teleport Commands -
Crusade - 23.09.2015
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
Re: Creating Teleport Commands -
Crusade - 23.09.2015
If there are some errors or you guys didn't understand it, feel free to reply and comment.
Re : Creating Teleport Commands -
BatTom - 23.09.2015
Thanks
Re: Creating Teleport Commands -
Donpkniz - 24.09.2015
Nice Post!
Re: Creating Teleport Commands -
Vince - 24.09.2015
Nothing that hasn't been done before. I'm sorry.
Re: Creating Teleport Commands -
Andre02 - 24.09.2015
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.
Re: Creating Teleport Commands -
Crusade - 25.09.2015
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!
Re: Creating Teleport Commands -
rappy93 - 25.09.2015
Well, guess someone will find this useful.
Re: Creating Teleport Commands -
HydraHumza - 25.09.2015
never saw that before, lol
Re: Creating Teleport Commands -
Team_PRO - 26.09.2015
Quote:
Originally Posted by Vince
|
ok this makes me laugh.