16.05.2012, 13:35
Код:
if(!strcmp(cmdtext[1],"myitems",true)) { new idx, amount,itemname[MAX_ITEM_NAME]; new tmp[128], string[256]; while(GetPlayerItemInfo(playerid,idx,itemname,_,amount)) { if(strlen(itemname)) { format(tmp,128,"%s -- %d\n",itemname,amount); strcat(string, tmp); } } ShowPlayerDialog(playerid, INVENTORY, DIALOG_STYLE_MSGBOX, "{6199D4}Inventars.", tmp,"Aizvert", ""); return 1; }
EDIT: For you to understand, strcat moves 1 string into another. You first have to make a string with all Information before you can display the dialog. So first you collect the information in the while(GetPlayerItemInfo loop and then you display the dialog after it.