/Shop issues
#1

Ok, so i have it set up, to where if you don't have a certain amount of money, the sale shouldn't go threw, but it does. What am i doing wrong here?

Код:
	            case 0:
	            {
	                if(AC_GetPlayerMoney(playerid < 2000))
	                {
	                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "You do not have enough money!");
	                    return 1;
					}
					else
					{
	          			SetPlayerArmour(playerid, 100);
						GivePlayerMoney(playerid, -2000);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased Armor!");
					}
	                return 1;
				}
Reply
#2

pawn Код:
if(AC_GetPlayerMoney(playerid) < 2000)
Reply
#3

id do it like this:
pawn Код:
case 0:
{
    if(AC_GetPlayerMoney(playerid < 2000))return SendClientMessage(playerid,COLOR_LIGHTBLUE,"You do not have enough money");
    else
    {
        SetPlayerArmour(playerid, 100);
        GivePlayerMoney(playerid, -2000);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have purchased Armor!");
    }
    return 1;
}
Not on my PC so i cant check Sorry if it fails.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)