SA-MP Forums Archive
Problem... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem... (/showthread.php?tid=626285)



Problem... - MarkNelson - 13.01.2017

Hello all samp forums users, i have a problem today with my login and register system,
it's included with dini and dudb
Dini and dudb won't save the account stats they the account password and name and create the acc file only.
i added the score and money in the enums and when player disconnects but i failed, i hope you to help me,
here is codes :

Код:
#define PATH "/Users/%s.ini"
Код:
enum pInfo
{
    pKills,
    pDeaths,
	pScore,
	pFac,
	pLead,
	pMoney

}
Код:
  new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), PATH, name);
    if(gPlayerLogged[playerid] == 1)
    {
        dini_IntSet(file, "Kills",PlayerInfo[playerid][pKills]); // His Kills
        dini_IntSet(file, "Deaths",PlayerInfo[playerid][pDeaths]); // His Deaths
        dini_IntSet(file,"Level",PlayerInfo[playerid][pScore]);//His Score
        dini_IntSet(file,"Faction",PlayerInfo[playerid][pFac]);//His Faction
        dini_IntSet(file,"Leader",PlayerInfo[playerid][pLead]);//His Faction Leader
        dini_IntSet(file,"Money",PlayerInfo[playerid][pMoney]);// His Money
    }
    gPlayerLogged[playerid] = 0;
	return 1;
}
So can someone help me? (?.?)


Re: Problem... - MarkNelson - 13.01.2017

comeon!


Re: Problem... - darkdrago - 13.01.2017

Did you put
Код:
gPlayerLogged[playerid] = 1;
in your login system?


Re: Problem... - Vince - 13.01.2017

Is this a new script? Because, really, you shouldn't be using dini and dudb in this day and age anymore. Sure it's easy compared to other systems but that does not outweigh its huge performance impact. This gets exponentially worse the more data is stored.


Re: Problem... - MarkNelson - 13.01.2017

I Already Fixed this by myself . but i have another problem. i posted a post about it.