Lester.
Умник
Как сделать new info_donate, чтобы можно было всё вместе ,но по разным диалогам . пример 1. Диалог Лицо 2. Диалог голова и.т.д
C++:
const MAX_INV_OBJECT = 3;
//Переменные
enum e_info_donate
{
dID,
dName[15],
dPrice,
dItemID
}
new info_donate[MAX_INV_OBJECT][e_info_donate] =
{
{1, "Шляпу Ведьмы", 300, 19528},
{2, "Нимб", 20000, 19197},
{3, "Рога", 1000, 19314}
};
new info_donate1[MAX_INV_OBJECT][e_info_donate] =
{
{1, "Респиратор", 1000, 19528},
{2, "Маска демона", 2000, 19197},
{3, "Маска обезьяны", 3000, 19314}
};
case 0:
{
static const fmt_str[] = "\n"SE_R"%d. "WH_C"%s\t[%d Coins] %s";
new str[sizeof(fmt_str) + (-2 + 32) + (-2 + 6) + (-2 + 2)],string[sizeof(str)*MAX_INV_OBJECT];
strcat(string,"Аксессуары\tСтоимость");
for(new i = -1; ++i < MAX_INV_OBJECT;)
{
format(str,sizeof(str),fmt_str,info_donate[i][dID],info_donate[i][dName],info_donate[i][dPrice]);
strcat(string,str);
}
ShowPlayerDialog(playerid,2043,DIALOG_STYLE_TABLIST_HEADERS,!"Головные уборы",string,"Далее","Отмена");
}
case 1:
{
static const fmt_str[] = "\n"SE_R"%d. "WH_C"%s\t[%d Coins] %s";
new str[sizeof(fmt_str) + (-2 + 4) + (-2 + 32) + (-2 + 6) + (-2 + 2)],string[sizeof(str)*MAX_INV_OBJECT];
strcat(string,"Аксессуары\tСтоимость");
for(new i = -1; ++i < MAX_INV_OBJECT;)
{
format(str,sizeof(str),fmt_str,info_donate1[i][dID],info_donate1[i][dName],info_donate1[i][dPrice]);
strcat(string,str);
}
ShowPlayerDialog(playerid, 2044,DIALOG_STYLE_LIST,!"Предметы на лицо", string, !"Выбрать",!"Отмена");
}
