CODE:
int pos_size_button0[1][4];
string text_button0[1];
int flag_button0[1];
pos_size_button0[0][0]=56; pos_size_button0[0][1]=169; pos_size_button0[0][2]=100; pos_size_button0[0][3]=20;
text_button0[0]="Êíîïêà 0"; text_button0[1]="Êíîïêà 1";
//////////
int pos_size_check0[1][4];
string text_check0[1];
int flag_check0[1];
pos_size_check0[0][0]=49; pos_size_check0[0][1]=82; pos_size_check0[0][2]=60; pos_size_check0[0][3]=20;
text_check0[0]="Ãàëêà 0";
flag_check0[0]=0;
//////////
int pos_size_button1[1][4];
string text_button1[1];
int flag_button1[1];
pos_size_button1[0][0]=90; pos_size_button1[0][1]=133; pos_size_button1[0][2]=100; pos_size_button1[0][3]=20;
text_button1[0]="Êíîïêà 0";
//////////
int pos_size_check1[1][4];
string text_check1[1];
int flag_check1[1];
pos_size_check1[0][0]=43; pos_size_check1[0][1]=62; pos_size_check1[0][2]=60; pos_size_check1[0][3]=20;
text_check1[0]="Ãàëêà 0";
flag_check1[0]=0;
//////////
int save_chek_dialog0=0;
int save_chek_dialog1=0;
//////////
sleep(500);
dialog0();
loop()
{
if(flag_button0[0]==1)
{
flag_button0[0]=0;
destroydialog(0);
sleep(100);
flag_check1[0]=1;
dialog1();
}
if(flag_button1[0]==1)
{
flag_button1[0]=0;
destroydialog(1);
sleep(100);
dialog0();
}
sleep(100);//Óáðàòü ïîñëå òåñòà
}
function dialog1()
{
createdialog(1, BUTTON, #pos_size_button1[0][0], #text_button1[0], #flag_button1[0] |
CHECK, #pos_size_check1[0][0], #text_check1[0], #flag_check1[0]);
//////////
showdialog(1, "Äèàëîã1", 835, 390, 250, 300, 1, 1);
}
function dialog0()
{
createdialog(0, BUTTON, #pos_size_button0[0][0], #text_button0[0], #flag_button0[0] |
CHECK, #pos_size_check0[0][0], #text_check0[0], #flag_check0[0]);
//////////
showdialog(0, "Äèàëîã0", 835, 390, 250, 300, 1, 1);
}
string text_button0[1];
int flag_button0[1];
pos_size_button0[0][0]=56; pos_size_button0[0][1]=169; pos_size_button0[0][2]=100; pos_size_button0[0][3]=20;
text_button0[0]="Êíîïêà 0"; text_button0[1]="Êíîïêà 1";
//////////
int pos_size_check0[1][4];
string text_check0[1];
int flag_check0[1];
pos_size_check0[0][0]=49; pos_size_check0[0][1]=82; pos_size_check0[0][2]=60; pos_size_check0[0][3]=20;
text_check0[0]="Ãàëêà 0";
flag_check0[0]=0;
//////////
int pos_size_button1[1][4];
string text_button1[1];
int flag_button1[1];
pos_size_button1[0][0]=90; pos_size_button1[0][1]=133; pos_size_button1[0][2]=100; pos_size_button1[0][3]=20;
text_button1[0]="Êíîïêà 0";
//////////
int pos_size_check1[1][4];
string text_check1[1];
int flag_check1[1];
pos_size_check1[0][0]=43; pos_size_check1[0][1]=62; pos_size_check1[0][2]=60; pos_size_check1[0][3]=20;
text_check1[0]="Ãàëêà 0";
flag_check1[0]=0;
//////////
int save_chek_dialog0=0;
int save_chek_dialog1=0;
//////////
sleep(500);
dialog0();
loop()
{
if(flag_button0[0]==1)
{
flag_button0[0]=0;
destroydialog(0);
sleep(100);
flag_check1[0]=1;
dialog1();
}
if(flag_button1[0]==1)
{
flag_button1[0]=0;
destroydialog(1);
sleep(100);
dialog0();
}
sleep(100);//Óáðàòü ïîñëå òåñòà
}
function dialog1()
{
createdialog(1, BUTTON, #pos_size_button1[0][0], #text_button1[0], #flag_button1[0] |
CHECK, #pos_size_check1[0][0], #text_check1[0], #flag_check1[0]);
//////////
showdialog(1, "Äèàëîã1", 835, 390, 250, 300, 1, 1);
}
function dialog0()
{
createdialog(0, BUTTON, #pos_size_button0[0][0], #text_button0[0], #flag_button0[0] |
CHECK, #pos_size_check0[0][0], #text_check0[0], #flag_check0[0]);
//////////
showdialog(0, "Äèàëîã0", 835, 390, 250, 300, 1, 1);
}
один раз переключился на диалог1 галка стоит второй раз нет галки третий раз есть и тд...
в итоге я в боте не могу запомнить галки или восстановить....
в параметрах создания диалога
flag_check1[0]=1;
все равно будет 0