Set money not appearing on hud. - 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: Set money not appearing on hud. (
/showthread.php?tid=512137)
Set money not appearing on hud. -
Cena44 - 09.05.2014
Hi,
I have created a custom GivePlayerMoney to avoid money hackers and such, I'm using Y_INI to load/save my player's profiles. Here's the problem:
Whenever I go in game and set my money, the money is set in the player's file, but the GTA:SA hud is still showing 0. It is fixed when I relog though.
pawn Код:
stock SetRPGMoney(playerid, amount)
{
pInfo[playerid][Money] = amount;
return 1;
}
Anything I could do to make it appear on the hud without relogging?
Re: Set money not appearing on hud. -
Konstantinos - 09.05.2014
You need to reset the money and give them back so it will update the money on the hud too.
pawn Код:
SetRPGMoney(playerid, amount)
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, (pInfo[playerid][Money] = amount));
}