Get amounts
#1

How can I do this?

When player type /order
He gets 'amount' order

When player type /buyorder
The order amount removed
The order amount then added to vehicle like for example " HasOrderStuffs[pCar] += 'amount he order'; "
Reply
#2

Give us your codes to help you.
Reply
#3

Sorry i don't have code, i just need some example code to do it then I'll do my ownway.
Reply
#4

pawn Код:
CMD:order(playerid, params[])
{
        new amount;
    if (sscanf(params, "i", amount)) return SendClientMessage(playerid, -1, "USAGE: /order [amount]");

    Player[playerid][Order] += amount; //Change it with your user system.

    new string[80];
    format(string, sizeof(string), "* You got %i of amount", amount);
    SendClientMessage(playerid, -1, string);
    return 1;
}

CMD:removeorder(playerid, params[])
{
        new amount;
    if (sscanf(params, "i", amount)) return SendClientMessage(playerid, -1, "USAGE: /removeorder [amount]");

    Player[playerid][Order] -= amount; //Change it with your user system.

    new string[80];
    format(string, sizeof(string), "* You removed %i of amount", amount);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)