Not save if not need. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Not save if not need. (
/showthread.php?tid=267365)
Not save if not need. -
budelis - 08.07.2011
Hi people.I want to ask.Is it possible to do,when file is saved,and save is the same then not save for ex:
dini_IntSet(file,"Moneys",GetPlayerMoneyA(playerid ));
With this i save moneys when player disconnected.But when player disconnect and money from last time not change and then not save moneys,because they not change.I want to do that because server is to mach loaded.
Re: Not save if not need. -
Outcast - 08.07.2011
Try
pawn Код:
if(GetPlayerMoney(playerid) != dini_Int(file, "Moneys")){
dini_IntSet(file,"Moneys",GetPlayerMoneyA(playerid ));
}
It will save if the current player's money isn't the same as the one in the user file ( you can replace that with your variable for money ).
Re: Not save if not need. -
budelis - 08.07.2011
Thanks i will try.