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



Money help - Blunt - 03.03.2012

Alright well, I'm making a /buygun command with dialogs and stuff, So i've got the dialog and stuff all done.

GivePlayerWeapon(playerid, 24, 1)
//The function that would take away my desired cash would be here.

If anyone could help me with a code or something, ill be extremely greatful.


Re: Money help - Chrillzen - 03.03.2012

Код:
if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough money!");
GivePlayerWeapon(playerid, 24, 1);
GivePlayerMoney(playerid, -500);