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



Money Hud - Kevin FOx - 25.06.2013

Hello there, I've got a proplem.. The money hud is not showing the money I have..

Check my stats.. i got 10k. but i got 0 in my hud and when i use textdraw it works good but with paynspray/sprunk machines.. So i need a help please. Its for all the server..!




Re: Money Hud - RedFusion - 25.06.2013

The money hud is not showing the money because you don't have the money


Re: Money Hud - Kevin FOx - 25.06.2013

Quote:
Originally Posted by RedFusion
Посмотреть сообщение
The money hood is not showing the money because you don't have the money
Did you check the stats?


Re: Money Hud - RedFusion - 25.06.2013

The stats are wrong, not the hud


Re: Money Hud - Knappen - 26.06.2013

My guess is that you are saving the money to a variable, but forget using the original GivePlayerMoney function.

A lot of people do it like this (Prevents people from using money that have been spawned/created by cheats)
pawn Код:
forward _GivePlayerMoney(playerid, amount);
public _GivePlayerMoney(playerid, amount)
{
    Cash[playerid] += amount;
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, amount);
}

forward _GetPlayerMoney(playerid);
public _GetPlayerMoney(playerid);
{
    return Cash[playerid];
}
I believe you might've forgotten the GivePlayerMoney, if you are using a function like this at all. Just a guess though.