SA-MP Forums Archive
Return to previous pos? - 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)
+--- Thread: Return to previous pos? (/showthread.php?tid=401603)



Return to previous pos? - NicholasA - 23.12.2012

Hey guys im working on some stuff where you can type a command and it'll teleport you to some place.
When youre done doing your thing at that place you type another command to get to your previous position..

How can I do this? (Fat letters)


Re: Return to previous pos? - YoYo123 - 23.12.2012

Get the player position into these variables before teleporting him:
pawn Код:
new LastX[MAX_PLAYERS], LastY[MAX_PLAYERS], LastZ[MAX_PLAYERS];
Make a /back command that will set his coordinates to the above.