Getting correct IDS from a dialog
#1

Hey,

PHP код:
for(new 0MAX_INVENTORY_SLOTSc++)
                                {
                                    if(
cActor[i][items][c] == -1format(string,sizeof(string),"%s\n{FFAF00}Empty",string);
                                    else 
format(string,sizeof(string),"%s\n{FFAF00}%s: %d",string,Itens[cActor[i][items][c]][item_nome],cActor[i][ia][c]);
                                } 
This is my code to get items from an actor which will be displayed in a dialog later.
The slot in which there is no item, I used the string "Empty" for that so that the listitem would be the itemid of cActor which I've to use to remove the item in OnDialogRepsonse. So what I wanted to ask is, it looks ugly with everywhere "Empty" in the dialog. Is there any way to just display only the items with correct IDS?
For example, if I display only the items in dialog and leave the slots which are empty, I won't be able to get the slot id in listitem on OnDialogResponse then.
If you don't know what I'm trying to say is this, I currently use listitem to get the ID of the selected item.
PHP код:
cActor[i][item][listitem]--; 
And if I remove the "Empty" string
PHP код:
cActor[i][ia][listitem]--; // the "listitem" won't give the correct slot ID so any other way. 
Reply


Messages In This Thread
Getting correct IDS from a dialog - by StrikerZ - 11.10.2017, 07:31
Re: Getting correct IDS from a dialog - by raydx - 11.10.2017, 07:48
Re: Getting correct IDS from a dialog - by StrikerZ - 11.10.2017, 08:20

Forum Jump:


Users browsing this thread: 1 Guest(s)