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



Help needed. - Buwla - 26.03.2010

Hello.
Lets say i drove thru a checkpoint 1min ago, now i want to get back to its location by using a cmd that teleports you back to the last checkpoint you've gone thru.
How can i do that?

Regards. Buwla.


Re: Help needed. - RawrTheory - 26.03.2010

Use SetPlayerPos.


Re: Help needed. - Finn - 26.03.2010

pawn Код:
new Float:LastCPPos[MAX_PLAYERS][3];
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  GetPlayerPos(playerid, LastCPPos[playerid][0], LastCPPos[playerid][1], LastCPPos[playerid][2]);
  return 1;
}
pawn Код:
SetPlayerPos(playerid, LastCPPos[playerid][0], LastCPPos[playerid][1], LastCPPos[playerid][2]);



Re: Help needed. - Buwla - 26.03.2010

Thanks for the answer, it works great. =)