13.01.2011, 16:00
Well, when I log out and log in to the server it works. Position is saved and player spawns on the place where he logged out. But when I restart the server, player gets spawned somewhere in the air, the screen is all white and there's a message saying "Stay within the world boundaries". When I check saved position in the .ini file it says:
PosX=0.000000
PosY=0.000000
PosZ=-95.604408
I don't get it, what is the problem here. I uploaded my whole GM code in hope you guys would help. I know the GM is shit atm but I plan to improve it.
Also, the position is loaded on login and put in AddPlayerClass on playerspawn. OnPlayerDisconnect is the position saving code.
EDIT: Pastebin http://pastebin.com/AgcWz68k
PosX=0.000000
PosY=0.000000
PosZ=-95.604408
I don't get it, what is the problem here. I uploaded my whole GM code in hope you guys would help. I know the GM is shit atm but I plan to improve it.
Also, the position is loaded on login and put in AddPlayerClass on playerspawn. OnPlayerDisconnect is the position saving code.
EDIT: Pastebin http://pastebin.com/AgcWz68k