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



Strange - Roko_foko - 29.06.2011

pawn Код:
format(string,sizeof(string),"$%d",gPLAYER_POCKET_MONEY[playerid]);
SendClientMessage(playerid,COLOUR_ORANGE,string);
SetPlayerMoney(playerid,gPLAYER_POCKET_MONEY[playerid]);
Hey, I've got this problem.
I don't understand why this desn't show the same number.

but this does :
pawn Код:
format(string,sizeof(string),"$%d",gPLAYER_POCKET_MONEY[playerid]);
SendClientMessage(playerid,COLOUR_ORANGE,string);
SetPlayerMoney(playerid,gPLAYER_POCKET_MONEY[playerid]+100);
There is nothing between this lines. If anyone has an answer?
Thanks in advance.


Re: Strange - Roko_foko - 29.06.2011

This SetPlayerMoney function is a bit bugged. I have fixed the problem by setting the function on OnPlayerUpdate.