14.03.2018, 11:56
Why, you can't put it by yourself? Which stuff is bothering you in this line?
PHP код:
stock ShowTargetInventory(playerid, targetid)
{
new str[180];
if(!IsPlayerNPC(targetid))
{
gItemList="";
for(new item;item<MAX_ITEMS;item++)
{
if(!strlen(_GetItemNamePVar(targetid,item))||!_GetItemAmountPVar(targetid,item))continue;
format(gItemList,sizeof(gItemList),"%s\n%d\t\t%s",gItemList,_GetItemAmountPVar(targetid,item),_GetItemNamePVar(targetid,item));
}
format(gItemList,sizeof(gItemList),"%s",gItemList);
format(str,sizeof(str),""COL_WHITE"%s "COL_GREEN"%i |"COL_WHITE" %i "COL_GREEN"Name Of The Target |"COL_WHITE" %s", GetBackpackName(targetid), pInfo[targetid][BackpackSlotsUsed], pInfo[targetid][BackpackSlots], GetPlayerName(targetid));
ShowPlayerDialog(playerid,INV_DIALOG_ID,DIALOG_STYLE_LIST,str,gItemList,"Select","Close");
}
return 1;
}