sscanf setting param to 114 if nothing is entered
#5

Quote:
Originally Posted by aRoach
Посмотреть сообщение
So what is the command that you want to do this ?

Give us the Code...
pawn Код:
if(strcmp(item, "pot") == 0)
        {
            new pot = CarInfo[car][vPot];
            //if no amount return SendClientMessage(playerid, COLOR_GREY, "* Usuage: /car get pot [amount]");
            if(amount < 0) return SendClientMessage(playerid, COLOR_GREY, "* Usuage: /car get pot [amount]");
            if(amount > pot) return SendClientMessage(playerid, COLOR_GREY, "* Your car does not have that much Pot !");

            CarInfo[car][vPot] -= amount;
            format(string, sizeof(string), "* %s takes out something from his vehicle.", PlayerName(playerid));
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

            PlayerInfo[playerid][pPot] += amount;

            format(string, sizeof(string), "New amount after taking %d pot: %d", amount, CarInfo[car][vPot]);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

            return 1;
        }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)