20.07.2015, 07:34
Store a global integer, something like;
Now, every time you use strcat (new listitem), add to these;
OnDialogResponse
There might be a way better way to do this, but this is what my brains worked out when I needed a way :P
I think It's faster than strfind, well atleast now when It doesn't work for you.
pawn Код:
new numberofitems;
new ListItemIsItemNo[MAXITEMS];
pawn Код:
numberofitems++;
ListItemIsItemNo[numberofitems-1] = ITEMID; // -1 because the array will be our dialog listitem ID (First listitem is 0 and so on)
pawn Код:
// To retrieve the integer (ID of "ITEM")
new ITEMID = ListItemIsItemNo[listitem];
format(str,sizeof(str),"You selected item %s",ItemName[ITEMID]);
I think It's faster than strfind, well atleast now when It doesn't work for you.