SA-MP Forums Archive
Some help please? :D - 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: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some help please? :D (/showthread.php?tid=109050)



Some help please? :D - yoennie - 17.11.2009

Ok so i want to make a teleport with a coordinate i dont understand the tutorials so please help me

How do i convert the coordinates from the savedposistions.txd
and how do i make a command with it thanks already.
Examples are really welcome


Re: Some help please? :D - *ToM* - 17.11.2009

Quote:
Originally Posted by yoennie
Ok so i want to make a teleport with a coordinate i dont understand the tutorials so please help me

How do i convert the coordinates from the savedposistions.txd
and how do i make a command with it thanks already.
Examples are really welcome

To make a tp command :

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/teleport", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, coordsX,coordsY,coordsZ);
		return 1;
	}
	return 0;
}
Get your coords by typing /save in game. Then open up savedpositions.cfg

now you'll see something like this :

AddPlayerClass(0,836.2362,-894.5684,68.7689,146.9268,0,0,0,0,0,0);


The colored numbers are the coords you need, coordsX, coordsY, coordsZ

get yourown coords and copy/paste them into the command


Re: Some help please? :D - _Vortex - 18.11.2009

Quote:
Originally Posted by Toniu_
Quote:
Originally Posted by yoennie
Ok so i want to make a teleport with a coordinate i dont understand the tutorials so please help me

How do i convert the coordinates from the savedposistions.txd
and how do i make a command with it thanks already.
Examples are really welcome

To make a tp command :

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/teleport", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, coordsX,coordsY,coordsZ);
		return 1;
	}
	return 0;
}
Get your coords by typing /save in game. Then open up savedpositions.cfg

now you'll see something like this :

AddPlayerClass(0,836.2362,-894.5684,68.7689,146.9268,0,0,0,0,0,0);


The colored numbers are the coords you need, coordsX, coordsY, coordsZ

get yourown coords and copy/paste them into the command
Wrong, you have 4 numbers highlighted, the last one being the angle. You only need the first 3.


Re: Some help please? :D - Benne - 18.11.2009

You're only going to use these cordinates:

836.2362,-894.5684,68.7689
| | |
X Y Z


Re: Some help please? :D - yoennie - 18.11.2009

thx solved