Saving problem
#3

Quote:
Originally Posted by leo3412
Посмотреть сообщение
please replace
pawn Код:
GetPlayerHealth(playerid, P_Health);
       GetPlayerArmour(playerid, P_Armour);
By
pawn Код:
GetPlayerHealth(playerid, PlayerInfo[playerid][P_Health]);
GetPlayerArmour(playerid, PlayerInfo[playerid][P_Armour]);
(sorry for my bad english)
Indeed, that looks fine.

@Thread maker, you also forgot to GetPlayerHealth AND GetPlayerArmour BEFORE setting it into the file.

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(P_Logged[playerid] == 1)
    {
        new INI:File = INI_Open(UserPath(playerid));
        GetPlayerHealth(playerid, PlayerInfo[playerid][P_Health]);
        GetPlayerArmour(playerid, PlayerInfo[playerid][P_Armour]);
        INI_SetTag(File,"Account Data");
        INI_WriteInt(File,"Admin",PlayerInfo[playerid][P_Admin]);
        INI_WriteInt(File,"Kills",PlayerInfo[playerid][P_Kills]);
        INI_WriteInt(File,"Deaths",PlayerInfo[playerid][P_Deaths]);
        INI_WriteInt(File,"Money",GetPlayerMoney(playerid));
        INI_WriteInt(File,"Interior",GetPlayerInterior(playerid));
        INI_WriteInt(File,"VirtualWorld",GetPlayerVirtualWorld(playerid));
        INI_WriteFloat(File,"Health",PlayerInfo[playerid][P_Health]);
        INI_WriteFloat(File,"Armour",PlayerInfo[playerid][P_Armour]);
        INI_Close(File);
    }
    return 1;
}
Reply


Messages In This Thread
Saving problem - by Nicholas. - 23.07.2012, 21:43
Re : Saving problem - by Varkoll_ - 23.07.2012, 22:20
Re: Re : Saving problem - by Kindred - 23.07.2012, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)