Strval or sscanf?
#7

try this, I am not sure though...

pawn Код:
CMD:inv(playerid, params[])
{
    new option[20];
    if(isnull(params))
    {
        return cmd_inventory(playerid, params);
    }
    if(strcmp(option, "use", true) == 0) // <-- This edited
    {
        new invid;
       
        if(sscanf(params, "i", invid))
        {
            if (invid == 1)
            {
                SendClientMessage(playerid, USAGE, "1 Working.");
            }
            if (invid == 2)
            {
                SendClientMessage(playerid, USAGE, "2 Working.");
            }
        }
        return 1;
    }
    if(!strcmp(option, "usetool", true))
    {
        return 1;
    }
return 1;
}
Reply


Messages In This Thread
Inventory use help. - by dholmes7512 - 17.07.2012, 13:51
Re: Strval or sscanf? - by Vince - 17.07.2012, 14:08
Re: Strval or sscanf? - by dholmes7512 - 17.07.2012, 17:09
Re: Strval or sscanf? - by dholmes7512 - 18.07.2012, 13:19
Re: Strval or sscanf? - by Andi_Evandy - 18.07.2012, 13:29
Re: Strval or sscanf? - by dholmes7512 - 18.07.2012, 13:52
Re: Strval or sscanf? - by L.Hudson - 18.07.2012, 13:54
Re: Strval or sscanf? - by dholmes7512 - 18.07.2012, 13:59
Re: Strval or sscanf? - by IstuntmanI - 18.07.2012, 13:59
Re: Strval or sscanf? - by dholmes7512 - 18.07.2012, 14:03

Forum Jump:


Users browsing this thread: 1 Guest(s)