SA-MP Forums Archive
Money/Score 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: Money/Score Saving. (/showthread.php?tid=463472)



Money/Score Saving. - Beckett - 12.09.2013

------


Re: Money/Score Saving. - Beckett - 12.09.2013

------


Re: Money/Score Saving. - -=Dar[K]Lord=- - 12.09.2013

i think the problem is with the timer , if you update the players account time to time , you will ofcourse have bugs in Y_INI ... well you need to store the variable as his money rather than writing in file as he disconnects his file will be resaved

like on update the variable will store the current money and onplayerdisconnect it will be saved in file


Re: Money/Score Saving. - xVIP3Rx - 12.09.2013

Try to put "GivePlayerMoney(playerid,pInfo[playerid][Money]);" on Onplayerspawn instead, And same for the score.


Re: Money/Score Saving. - Weponz - 12.09.2013

When saving the money and score, set the values to variables first and then save them. It tends not to work unless you do so.


Re: Money/Score Saving. - Swindle - 12.09.2013

pawn Код:
public OnPlayerSpawn(playerid)
{
    GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]);
    return 1;
}



Re: Money/Score Saving. - Beckett - 12.09.2013

------


Re: Money/Score Saving. - Beckett - 12.09.2013

------