07.06.2012, 14:30
This is how i'm saving and loading position. It should help you.
pawn Code:
// saving
GetPlayerPos(playerid, PlayerInfo[playerid][pLastX], PlayerInfo[playerid][pLastY], PlayerInfo[playerid][pLastZ]);
INI_WriteFloat(playerFile, "LastX", PlayerInfo[playerid][pLastX]);
INI_WriteFloat(playerFile, "LastY", PlayerInfo[playerid][pLastY]);
INI_WriteFloat(playerFile, "LastZ", PlayerInfo[playerid][pLastZ]);
PlayerInfo[playerid][pInterior]= GetPlayerInterior(playerid);
INI_WriteInt(playerFile, "Interior", PlayerInfo[playerid][pInterior]);
PlayerInfo[playerid][pVirtualWorld]= GetPlayerVirtualWorld(playerid);
INI_WriteInt(playerFile, "VirtualWorld", PlayerInfo[playerid][pVirtualWorld]);
pawn Code:
// Load it somewhere i use it on player spawn
SetPlayerPos(playerid, PlayerInfo[playerid][pLastX], PlayerInfo[playerid][pLastY], PlayerInfo[playerid][pLastZ]);
SetPlayerInterior(playerid,PlayerInfo[playerid][pInterior]);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirtualWorld]);