14.03.2014, 11:14
(
Последний раз редактировалось LustcheR; 22.10.2014 в 20:12.
)
Deleted
if ( strlen ( the value (inputtext ..) ) > 10 ) return ..
ItemInfo[MAX_PLAYERS][ItemName][MAX_ITEMS];
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_ITEMS) // first you check if they went to your dialog
{
new list[1024], limit = GetLastItem(playerid); // defining the list lenght and the limit of your loop
for(new i = 0; i <= limit; i++) // loop, you can start with 0 or 1, depends when your item id starts
{
new TextPart[32]; // defining the item name
if(limit) //checks if it is the end of the loop
{
strmid(TextPart, ItemInfo[playerid][ItemName][i], 0, 32, 32); // copying the name to a string
format(list, sizeof(list), "%s\n%d Item: '%s'\nNext", list, i, TextPart); // formats the last time with the "Next" line
}
else format(list, sizeof(list), "%s\n%d Item: '%s'", list, i, ItemInfo[playerid][ItemName][i]); // this format is doing all the work putting down the items each line
}
ShowPlayerDialog(playerid, DIALOG_ITEMS, DIALOG_STYLE_LIST, "View Item Menu", list, "View", "Back"); // it show the next dialog, you will have to edit it accordingly
}