simple question - 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: simple question (
/showthread.php?tid=620975)
simple question -
TobiasJones - 05.11.2016
So, I have this
PHP код:
CMD:test(playerid, params[])
{
PlayerInfo[playerid][pCash]++;
return 1;
}
This
PHP код:
PlayerInfo[playerid][pCash]++;
This
PHP код:
PlayerInfo[playerid][pCash] = 50;
Sets the cash to 50, if you had 100 cash then it sets to 50.
I want to give 50$, not give 1$ or set the cash, how?
Gives only 1$, how to give more than 1$? Don't ask me to use GivePlayerMoney or SetPlayerMoney because I made a custom system that shows custom money, not the regular gta cash.
Re: simple question -
GoldenLion - 05.11.2016
You do it with += amount.
For example:
Код:
PlayerInfo[playerid][pCash] += 50;
Re: simple question - justice96 - 05.11.2016
Код:
GiveTobiasJones_Money(playerid,cash)
{
PlayerInfo[playerid][pCash] += cash;
GivePlayerMoney(playerid,cash);
return 1;
}