Spawn Last Location
#1

Hello, I've been looking for a FS or some sort of coding that allows players to return to their last location when they login, can somebody help me please?
Reply
#2

Wiki and ****** is your friend. Go learn scripting and then you will get it. Plus, if you scroll down to the bottom, you will see some related threads on this topic.

P.S. Its very easy but I am not gonna tell it to you. Best of Luck.
Reply
#3

As Faisal told you, You could do search, i will not code it for you to make you script it yourself :P, Just details:
1. In your user's variable, Insert X, Y, Z Coordinates with Float tag (at the enum)

2. OnPlayerDisconnect, Save them with your saving system you use and use GetPlayerPos to get last position of player

3.OnPlayerSpawn Load the coordinates with your saving / loading system and Set player position with them ( SetPlayerPos )

easy :P
Reply
#4

Thank you once again to both of you, I just wanted to know the basics, I didn't expect anybody to code it for me :P
Reply
#5

here check this Post out , it will gonna help you : https://sampforum.blast.hk/showthread.php?tid=299791
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)