03.10.2010, 21:57
pawn Code:
PlayerInventItems[MAX_PLAYERS][128]; // 128 is the maximum items, change if needed.
//When creating the dialog
for(new items; items <= 128; items++) // Again, 128 being the maximim items, change if needed.
{
if(/*Item variable...*/ > 0) {
//Add item name to list
PlayerInventItems[playerid][items] = 1;
}
}
//Once the player has selected the item...
new count;
for(new items; items <= 128) items++) // Again, 128 being the maximim items, change if needed.
{
if(PlayerInventItems[playerid][items] > 0) count++;
if(count == listitem) {
// Do your code...
break;
}
}

