Y_INI Position saving
#3

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]);
Reply


Messages In This Thread
Y_INI Position saving - by Everybody - 07.06.2012, 11:52
Re: Y_INI Position saving - by alpha500delta - 07.06.2012, 12:31
Re: Y_INI Position saving - by caki - 07.06.2012, 14:30

Forum Jump:


Users browsing this thread: 1 Guest(s)