SA-MP Forums Archive
Y_INI experience - 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: Y_INI experience (/showthread.php?tid=611206)



Y_INI experience - DusanInfinity - 03.07.2016

When player change just 1 variable, for ex Money, is it better to save like this:
Код:
new INI:File = INI_Open(Users(playerid));
INI_SetTag(File,"data");
INI_WriteString(File,"Cash",PlayerInfo[playerid][pCash]); 
INI_Close(File);
Can that cause problems, and is it better and faster than saving all users stats(when just 1 variable changed) ?


Re: Y_INI experience - DusanInfinity - 06.07.2016

Bump!


Re: Y_INI experience - sammp - 07.07.2016

That's fine, it will run quicker than saving everything. However, I suggest if you haven't already, to have a function that saves all stats every couple of minutes or so, incase the server crashes.


Re: Y_INI experience - DusanInfinity - 01.08.2016

Quote:
Originally Posted by sammp
Посмотреть сообщение
That's fine, it will run quicker than saving everything. However, I suggest if you haven't already, to have a function that saves all stats every couple of minutes or so, incase the server crashes.
Yes, but what about when player get ex: driving licence and he disconnect, then connect and driving licence isn't saved?