SA-MP Forums Archive
[HELP] About Money... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] About Money... (/showthread.php?tid=96315)



[HELP] About Money... - Smiths - 07.09.2009

Код:
GivePlayerWeapon(playerid, 30, 500);
        GivePlayerMoney(playerid, -10000);
i want something like, if the player doesn't got enough money then he can't buy the item.

what code i need?

Sorry for my english


Re: [HELP] About Money... - ilikepie2221 - 07.09.2009

pawn Код:
new money = GetPlayerMoney(playerid); // new variable which contains how much $ the player has
if(money >= 10000) // If they have more than or have 10000
{
  // your code
}
else // Else
{
  // Do something if they dont
}
Try that out.


Re: [HELP] About Money... - Smiths - 07.09.2009

thank you ^^


Re: [HELP] About Money... - Daslee - 07.09.2009

i have tutorial: http://forum.sa-mp.com/index.php?topic=120543.0