Set money not appearing on hud.
#1

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

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));
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)