SA-MP Forums Archive
Player spawning on their last position before disconnecting - 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: Player spawning on their last position before disconnecting (/showthread.php?tid=108613)



Player spawning on their last position before disconnecting - chaosnz - 14.11.2009

I have a general idea on how this works... involving a getplayerpos saving to the players file in onplayerdisconnect, then when a player connects it gets the position from the file and uses it as the players spawn..

Is that how it works?



Re: Player spawning on their last position before disconnecting - Donuts - 14.11.2009

That's the idea, When a player disconnects make their position save into a float, and when the player joins again, set their position OnPlayerSpawn.