Multi-Function Command Help
#5

pawn Код:
CMD:i(playerid,params[])
{
    new usage[20],slot;
    if(GetPVarInt(playerid, "LoggedIn") == 0) return SendClientMessage(playerid, -1, "ERROR: You are not logged in.");
    if(isnull(params))  return SendClientMessage(playerid, -1, "Command Usage: /i [use/discard]");
    if(sscanf(params,"s[15]i",usage,slot) return SendClientMessage(playerid, -1, "Command Usage: /i [use/discard]");
    if(!strcmp(usage,"use",true)
    {
        //your command for the use parameter
        //remember ur value of the inventory slot is slot
    }
    else if(!strcmp(usage,"discard",true)
    {
   
            //your command for the discard param
            //remember ur value of the inventory slot is the slot variable
    }
    else
    {
        return SendClientMessage(playerid, -1, "Command Usage: /i [use/discard]");
    }
    return 1;
}
Reply


Messages In This Thread
Multi-Function Command Help - by DTV - 27.10.2014, 18:44
Re: Multi-Function Command Help - by DavidBilla - 27.10.2014, 18:55
Re: Multi-Function Command Help - by Jefff - 27.10.2014, 19:00
Re: Multi-Function Command Help - by DTV - 27.10.2014, 19:22
Re: Multi-Function Command Help - by Quickie - 28.10.2014, 01:04
Re: Multi-Function Command Help - by DavidBilla - 28.10.2014, 02:36
Re: Multi-Function Command Help - by Metroplex - 28.10.2014, 03:11

Forum Jump:


Users browsing this thread: 3 Guest(s)