This works in another script but not mine?
#10

Can't you just do something like this?

pawn Код:
CMD:store(playerid, params[])
{
    new control[32], item[32], amount[32];
    if(sscanf(params, "s[32]S[32]S[32]", control, item, amount)) //error / usage here
    if(!strcmp(control, "store", true))
    {
        if(isnull(item))
        {
            SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk store [item]");
            SendClientMessage(playerid, COLOUR_GREY, "Available Items: Weapon, Weed, Cocaine, Money, Armour")
        }
        else if(!strcmp(item, "Weapon", true))
        {
            //do shit
        }
        else if(!strcmp(item, "Weed", true))
        {
            if(isnull(amount)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk store weed <amount>");
            new Amount = strval(amount);
            if(Amount > MYAMOUNT) return SendClientMessage(playerid, COLOUR_GREY, "You don't have that much!");
            //the rest of the code
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)