Dialog messup
#5

Код:
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;
}
try this here. might work. (I don't really like strcat so better try it lol)

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.
Reply


Messages In This Thread
Dialog messup - by bleedis - 15.05.2012, 10:12
Re: Dialog messup - by TzAkS. - 15.05.2012, 10:18
Re: Dialog messup - by bleedis - 15.05.2012, 10:21
Re: Dialog messup - by bleedis - 16.05.2012, 13:28
AW: Dialog messup - by EthanR - 16.05.2012, 13:35
Re: AW: Dialog messup - by bleedis - 16.05.2012, 13:44
Re: Dialog messup - by SuperViper - 16.05.2012, 14:19
Re: Dialog messup - by bleedis - 16.05.2012, 14:28

Forum Jump:


Users browsing this thread: 5 Guest(s)