SA-MP Forums Archive
SetPlayerPos - 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: SetPlayerPos (/showthread.php?tid=156958)



SetPlayerPos - xXiamCr4zyXx - 24.06.2010

Well, I've been trying to make a command /tph, which teleports you infront of the hospital. BUT when I tested it on the server, it teleports you somewhere else randomly.. I mean it randomly choses the position. Once I'm teleported to LV, then to LS etc etc. Oh and before that, I went in San Andreas, and did the command /save which saved the position. So, I copied it from the notepad which was in my San Andreas directory.

Here's my script.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/tph", cmdtext, true, 4) == 0)
	{
		SendClientMessage(playerid, 0x808080, "You have been teleported to the hospital!");
		SetPlayerPos(playerid, 270,1178.4508,-1323.8781,14.1207,89.2544,0,0,0,0,0,0);
		return 1;
	}
	return 0;
}




Re: SetPlayerPos - [HiC]TheKiller - 24.06.2010

SetPlayerPos has 3 argunaments, you have around 10. It should be

pawn Код:
SetPlayerPos(playerid, 270,1178.4508,-1323.8781,14.1207,89.2544);