Why is not working ? [HELP +REP]
#1

What wrong code, When i clicked compiled i saw nothing error, And i came in game i did /items i can't use items

pawn Код:
stock ShowInventory(playerid)
{
    gItemList="";
    for(new item;item<MAX_ITEMS;item++)
    {
        if(!strlen(_GetItemNamePVar(playerid,item))||!_GetItemAmountPVar(playerid,item))continue;
        format(gItemList,sizeof(gItemList),"%s\n%s (%d)",gItemList,_GetItemNamePVar(playerid,item), _GetItemAmountPVar(playerid,item));
    }
    format(gItemList,sizeof(gItemList),"Amount\t\tItem Name%s",gItemList);
    ShowPlayerDialog(playerid,INV_DIALOG_ID,DIALOG_STYLE_LIST,"Your Inventory",gItemList,"Use","Close");
    SetPVarInt(playerid,"PUSINGDIALOG",1);
}

InventoryOnDialogResponse(playerid, dialogid, response, inputtext[])
{
    if(dialogid!=INV_DIALOG_ID)return 1;
    if(!GetPVarInt(playerid,"PUSINGDIALOG"))return 1;
    if(!response)return 1;
    if(!strcmp(inputtext,"Amount",true,6))
    {
        ShowInventory(playerid);
        return 1;
    }
    format(gItemList,MAX_ITEM_NAME,inputtext[strfind(inputtext,"\t")+2]);
    if(CallLocalFunction("OnPlayerUseItem","is",playerid,gItemList)) SaveInventory(playerid);
    else SetPVarInt(playerid,"PUSINGDIALOG",0);
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
        InventoryOnDialogResponse(playerid, dialogid, response, inputtext[]);
        return 1;
}

CMD:items(playerid, params[])
{
        ShowInventory(playerid);
        return 1;
}
Reply


Messages In This Thread
Why is not working ? [HELP +REP] - by MasonSFW - 14.10.2014, 11:04
Re: Why is not working ? [HELP +REP] - by MasonSFW - 14.10.2014, 11:42
Re: Why is not working ? [HELP +REP] - by MasonSFW - 15.10.2014, 00:13
Re: Why is not working ? [HELP +REP] - by MasonSFW - 15.10.2014, 11:46
Re: Why is not working ? [HELP +REP] - by CoaPsyFactor - 15.10.2014, 12:10

Forum Jump:


Users browsing this thread: 3 Guest(s)