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



Money Bug - Vizi - 18.02.2013

Hi
In my gamemode....
When i add money /givemoney ID 5000000 and buy something for 150(Example) my money go down until -150 WHY ??

Please help

Thanks



Re: Money Bug - S0n1COwnsYou - 18.02.2013

buy something for 150(Example)

what do you buy ??


Re: Money Bug - Vizi - 18.02.2013

everything.I mean when i buy something for 50 it will go -50 and if i add money to bank the money that i still have will go 000


Re: Money Bug - bensmart469 - 18.02.2013

We cannot help you if you do not supply us with any code. Post some so we can have a look.


Re: Money Bug - Vizi - 18.02.2013

whole script or ?


Re: Money Bug - bensmart469 - 18.02.2013

No, just a portion of your part which is bugged.


Re: Money Bug - DaRk_RaiN - 18.02.2013

Actually just the part where you buy something and it takes the money from you.


Re: Money Bug - Vizi - 18.02.2013

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
Actually just the part where you buy something and it takes the money from you.
It takes money and when i /pay ID Money . (I give money to somebody)

caN this be something??

PHP код:
new Cash[MAX_PLAYERS];
stock GivePlayerCash(playeridmoney)
{
    
Cash[playerid] += money;
    
ResetMoneyBar(playerid);//Reseta novac u originalni bar
    
UpdateMoneyBar(playerid,Cash[playerid]);//Stavlja novac u originalni bar
    
return Cash[playerid];
}
stock SetPlayerCash(playeridmoney)
{
    
Cash[playerid] = money;
    
ResetMoneyBar(playerid);//Reseta novac u originalni bar
    
UpdateMoneyBar(playerid,Cash[playerid]);//Stavlja novac u originalni bar
    
return Cash[playerid];
}
stock ResetPlayerCash(playerid)
{
    
Cash[playerid] = 0;
    
ResetMoneyBar(playerid);//Reseta novac u originalni bar
    
UpdateMoneyBar(playerid,Cash[playerid]);//Stavlja novac u originalni bar
    
return Cash[playerid];
}
stock GetPlayerCash(playerid)
{
    return 
Cash[playerid];




Re: Money Bug - DaRk_RaiN - 18.02.2013

Yes i know, give us the that code where it takes money from you when you buy!


Re: Money Bug - Vizi - 18.02.2013

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
Yes i know, give us the that code where it takes money from you when you buy!
i dont understand you

Look the post up !