Help with Mini-Pizza script.
#2

pawn Код:
if (strcmp("/buypizza", cmdtext, true) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.843)
    {
        if(pizza[playerid] == 1)
        {
            return SendClientMessage(playerid,COLOR_GREY,"You've already bought a pizza!");
        } else        
        {
            SendClientMessage(playerid,COLOR_GREY,"You bought a pizza!");
            GivePlayerMoney(playerid, -50);
            pizza[playerid]=1;            
        }
    }
    return 1;
}
The code was a bit messy, so I cleaned it up and corrected the bugs. You placed some {} wrong, so that the if-else stuff didnt work correctly. Compare it to yours to see what I changed in detail.
Reply


Messages In This Thread
Help with Mini-Pizza script. - by Chrillzen - 06.12.2010, 18:25
Re: Help with Mini-Pizza script. - by Mauzen - 06.12.2010, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)