SA-MP Forums Archive
Simple Help [+rep for helpers] - 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 Help [+rep for helpers] (/showthread.php?tid=502730)



Simple Help [+rep for helpers] - HelpYou - 25.03.2014

I need command to do if someone dont have a money he can not to buy items... Thanks for helpers I will +rep them.


Re: Simple Help [+rep for helpers] - rangerxxll - 25.03.2014

Very basic. Can easily be implemented into your script.
pawn Код:
new money = GetPlayerMoney(playerid);
if(money < 5000) return SendClientMessage(playerid,COLOR, "You don't have enough money to buy this item.");



Re: Simple Help [+rep for helpers] - Redirect Left - 25.03.2014

Just put this (or similar) in the command to buy, as i assume you already have the command, you just need to get to not buy it if they can't afford it;

Код:
if(GetPlayerMoney(playerid) < YOUR_CAR_COST HERE) return SendClientMessage(playerid,COLOR_RED,"You cannot afford this!");



Re: Simple Help [+rep for helpers] - HelpYou - 25.03.2014

Thanks guys !


Re: Simple Help [+rep for helpers] - rangerxxll - 25.03.2014

Not a problem. Good luck.