Money Issue - 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 Issue (
/showthread.php?tid=362671)
Money Issue -
Akcent_Voltaj - 25.07.2012
i have GivePlayerMoney and at each spawn i have -50 ... if i relog still -50 or 100..i have nothing in gm that is minus please help!its annoying the money doesent save but i have
PHP код:
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
if i give myself 9000 at each spawn -50..
Re: Money Issue -
RedJohn - 25.07.2012
Hmm. You are using dini or y_ini to save players money?
Re: Money Issue -
Akcent_Voltaj - 25.07.2012
var fwrite..
Re: Money Issue -
Jstylezzz - 25.07.2012
pawn Код:
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
i assume this is the loading function..
could you show us the saving function?
the loading function looks ok to me
Re: Money Issue -
Akcent_Voltaj - 25.07.2012
PHP код:
format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
Re: Money Issue -
Jstylezzz - 25.07.2012
And, when do you set PlayerInfo[playerid][pCash]?
only on loading, or also when you did the command?
Re: Money Issue -
Akcent_Voltaj - 25.07.2012
i have cash functions..i have it set onplayerconnect.
Re: Money Issue -
Jstylezzz - 25.07.2012
Yeah, but if you /givemoney, you should also set the PlayerInfo[playerid][pCash], else it won't save the right variables
Re: Money Issue -
Akcent_Voltaj - 25.07.2012
at each time i come on server -50 or -100... i had dollah at new..
PHP код:
new dollah = 11000; // Amount player recieves on spawn.
but i want to spawn with last money ...please help!
Re: Money Issue -
Jstylezzz - 25.07.2012
can you show me the /givemoney command, and the thing where you set the money with the var dollah?