23.12.2012, 17:12
Hey guys i got this command and i want players that have less then $175 not be able to do it..... But how?
new cash = GetPlayerMoney(playerid);// Gets the player cash
if(cash <= 175) // Makes sure you have 175$ or more. If this doesn't work, do >= instead.
{
SendClientMessage(playerid, 0xFFFFFF, " You do not have the funds.");// Sends the error message
return 1;
}
else // If they have the cash then....
{
// Do stuff here. Allows you to purchase the item
}
new money = GetPlayerMoney(playerid);
if (money >= 175)
{
// able to do it
}
Add this in your command.
Since you didn't post the command, you'll have to work it in it. pawn Код:
|
if(GetPlayerMoney(playerid) < 175) return SendClientMessage(playerid, COLOR_RED, "You need $175.");
// Purchase here