Possible inputtext bug.
#4

Store a global integer, something like;

pawn Код:
new numberofitems;
new ListItemIsItemNo[MAXITEMS];
Now, every time you use strcat (new listitem), add to these;

pawn Код:
numberofitems++;
ListItemIsItemNo[numberofitems-1] = ITEMID; // -1 because the array will be our dialog listitem ID (First listitem is 0 and so on)
OnDialogResponse
pawn Код:
// To retrieve the integer (ID of "ITEM")
new ITEMID = ListItemIsItemNo[listitem];
format(str,sizeof(str),"You selected item %s",ItemName[ITEMID]);
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.
Reply


Messages In This Thread
Possible inputtext bug. - by mirou123 - 19.07.2015, 06:58
Re: Possible inputtext bug. - by ][Noname][ - 19.07.2015, 07:57
Re: Possible inputtext bug. - by mirou123 - 19.07.2015, 08:04
Re: Possible inputtext bug. - by liquor - 20.07.2015, 07:34

Forum Jump:


Users browsing this thread: 1 Guest(s)