14.03.2018, 12:12
Try it now
PHP код:
stock ShowTargetInventory(playerid, targetid)
{
new str[180], NameTarget[MAX_PLAYER_NAME];
GetPlayerName(targetid, NameTarget, sizeof(NameTarget));
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], NameTarget);
ShowPlayerDialog(playerid,INV_DIALOG_ID,DIALOG_STYLE_LIST,str,gItemList,"Select","Close");
}
return 1;
}