Score/money isnt saving - 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: Score/money isnt saving (
/showthread.php?tid=482772)
Score/money isnt saving -
Acres - 22.12.2013
hey guys i got this problem i have reg system it saves your acc you have the PW and stuff but the worst thing your money and your Score wont be saved may i ask why i looked into but nothing.
Re: Score/money isnt saving -
TheOriginal1337 - 22.12.2013
What saving system do you use? dini?
Re: Score/money isnt saving -
CutX - 22.12.2013
you managed to save the PW, what's so difficult about saving money pal?
PHP код:
enum e_pInfo
{
pSQLid,
pPass[129],
pSalt[30],
pScore,
pMoney
}
new Pi[MAX_PLAYERS][e_pInfo];
//now when a player earns some money, just do
GivePlayerMoney(playerid, 500);
Pi[playerid][pMoney] += 500;
//and just add it to the playerfile or mysql table on disconnect, just like your PW
it's that simple if you're using enum's to store the stats
Re: Score/money isnt saving -
Acres - 22.12.2013
i am using dini