Stock - 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: Stock (
/showthread.php?tid=654748)
Stock -
KamilPolska - 04.06.2018
How to make a stock like GetPlayerMoney? example: if(GetPlayerMoney(playerid) >= 50)
All the time he shows me the message "You are poor!" even when I have 100 points in my wallet.
Код:
stock GetPlayerWallet(playerid)
{
if(Player[playerid][Wallet]) return true;
return true;
}
CMD:testwallet(playerid, params[])
{
if(GetPlayerWallet(playerid) >= 50)
{
SendClientMessage(playerid, -1, "You are rich!");
}
else
{
SendClientMessage(playerid, -1, "You are poor!");
}
return 1;
}
Re: Stock -
Eoussama - 04.06.2018
That function (It's called a funtion, not a stock) doesn't make any practical sense, here you go;
PHP код:
GetPlayerWallet(playerid) return Player[playerid][Wallet];
Re: Stock -
KamilPolska - 04.06.2018
Thanks!