Account is not saving
#1

The player's account is not saving properly. Sometime it saves their stats but sometime when they connect to the server, their stat's are gone.

pawn Code:
stock SaveStats(playerid)
{
    new file[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(file, sizeof(file), "Accounts/%s.ini", name);
    if(dini_Exists(file))
    {
        dini_IntSet(file,   "AdminLevel", pInfo[playerid][pAdmin]);
        dini_IntSet(file,   "VIPLevel", pInfo[playerid][pVIP]);
        dini_IntSet(file,   "Cash", GetPlayerCash(playerid));
        dini_IntSet(file,   "Score", GetPlayerScore(playerid));
        dini_IntSet(file,   "Kills", pInfo[playerid][pKills]);
        dini_IntSet(file,   "Death", pInfo[playerid][pDeaths]);
        dini_Set(file,      "IP", GetPlayerIP2(playerid));
        dini_IntSet(file,   "Banned", pInfo[playerid][pBanned]);
        dini_IntSet(file,   "Bank", pInfo[playerid][pBank]);
        dini_IntSet(file,   "Hours", pInfo[playerid][pHours]);
        dini_IntSet(file,   "Minutes", pInfo[playerid][pMinutes]);
        dini_IntSet(file,   "Second", pInfo[playerid][pSecond]);
       
    }
    return 1;
}
That is the stock i used everytime i need to save their accounts.
Reply


Messages In This Thread
Account is not saving - by ChandraLouis - 18.05.2020, 23:25
Re: Account is not saving - by v1k1nG - 19.05.2020, 00:08
Re: Account is not saving - by jasperschellekens - 19.05.2020, 00:11
Re: Account is not saving - by KevTheJoker - 19.05.2020, 00:11
Re: Account is not saving - by ChandraLouis - 19.05.2020, 00:20
Re: Account is not saving - by GameOvr - 19.05.2020, 06:48

Forum Jump:


Users browsing this thread: 1 Guest(s)