Not save if not need.
#1

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.
Reply
#2

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 ).
Reply
#3

Thanks i will try.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)