SA-MP Forums Archive
Get amounts - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Get amounts (/showthread.php?tid=657582)



Get amounts - ServerFiles - 11.08.2018

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'; "


Re: Get amounts - RedRex - 11.08.2018

Give us your codes to help you.


Re: Get amounts - ServerFiles - 11.08.2018

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


Re: Get amounts - KinderClans - 11.08.2018

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;
}