Positions don't seem to be loading.
#5

I've got a problem, when the server restarts it resets your coords to 0.0000
Loading:
pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Float("Positon-PosX",PlayerInfo[playerid][PosX]);
    INI_Float("Positon-PosY",PlayerInfo[playerid][PosY]);
    INI_Float("Positon-PosZ",PlayerInfo[playerid][PosZ]);
    INI_Int("Interior",PlayerInfo[playerid][pInterior]);
    INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    return 1;
}
Saving:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x,y,z);
    INI_WriteFloat(File,"Position-PosX",PlayerInfo[playerid][PosX]=x);
    INI_WriteFloat(File,"Position-PosY",PlayerInfo[playerid][PosY]=y);
    INI_WriteFloat(File,"Position-PosZ",PlayerInfo[playerid][PosZ]=z);
    new interior = GetPlayerInterior(playerid);
    INI_WriteInt(File,"Interior", PlayerInfo[playerid][pInterior]=interior);
    new skin = GetPlayerSkin(playerid);
    INI_WriteInt(File,"Skin", PlayerInfo[playerid][pSkin]=skin);
   
    INI_Close(File);

    return 1;
}
Reply


Messages In This Thread
Positions don't seem to be loading. - by Jernu - 20.07.2013, 16:16
Re: Positions don't seem to be loading. - by Alternative112 - 20.07.2013, 16:22
Re: Positions don't seem to be loading. - by IceBilizard - 20.07.2013, 16:23
Re: Positions don't seem to be loading. - by Jernu - 20.07.2013, 16:27
Re: Positions don't seem to be loading. - by Jernu - 20.07.2013, 17:46
Re: Positions don't seem to be loading. - by Lordzy - 20.07.2013, 17:49
Re: Positions don't seem to be loading. - by Jernu - 20.07.2013, 17:50
Re: Positions don't seem to be loading. - by Lordzy - 20.07.2013, 17:54
Re: Positions don't seem to be loading. - by Jernu - 20.07.2013, 18:02
Re: Positions don't seem to be loading. - by Lordzy - 20.07.2013, 18:08

Forum Jump:


Users browsing this thread: 1 Guest(s)