Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <YSI\y_commands>
- new nName[100], strc[100],stri[100],strb1[100],strb2[100], dstyle, inum;
- new nitem1[100], nitem2[100], nitem3[100], nitem4[100], nitem5[100], nitem6[100], nitem7[100], nitem8[100], nitem9[100], nitem10[100];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Dynamic Dialog Creator By AF(ArviFilter)");
- print("--------------------------------------\n");
- nitem1 = "";
- nitem2 = "";
- nitem3 = "";
- nitem4 = "";
- nitem5 = "";
- nitem6 = "";
- nitem7 = "";
- nitem8 = "";
- nitem9 = "";
- nitem10 = "";
- inum = 0;
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- }
- #define COLOR_RED 0xFF0000AA
- #define COLOR_DRED 0xE00000AA
- #define COLOR_BLUE 0x0DAAFFAA
- #define COLOR_DBLUE 0x002FBAAA
- #define COLOR_GREEN 0x4EF50CAA
- #define COLOR_LIME 0xF2F23DAA
- #define COLOR_ORANGE 0xFFAA21AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define max_items 10
- #define d_1 1001
- #define d_2 1002
- #define d_3 1003
- #define d_m_1 1101
- #define d_m_2 1102
- #define d_m_3 1103
- #define d_m_4 1104
- #define d_m_5 1105
- #define d_l_1 1301
- #define d_l_2 1302
- #define d_l_3 1303
- #define d_l_4 1304
- #define d_l_5 1305
- #define d_l_6 1306
- #define d_l_7 1307
- #define d_l_8 1308
- #define d_l_9 1309
- #define d_l_10 1310
- #define d_l_11 1311
- #define d_l_12 1312
- #define prev 1501
- #define prev2 1502
- #define e_1 2001
- CMD:dia(playerid, params[])
- {
- #pragma unused params
- ShowPlayerDialog(playerid, d_1, DIALOG_STYLE_LIST, "Dynamic dialog maker by AF","Create New Dialog\nEdit Existing Ones","Select","Close");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == d_1)
- {
- if(!response)
- {
- return 1;
- }
- else
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, d_2, DIALOG_STYLE_INPUT,"Dynamic dialog maker by AF","Choose Dialog's name","Select","Back");
- return 1;
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, e_1, 0,"Dynamic dialog maker by AF","This will be added at the next update","Okay","");
- return 1;
- }
- else
- {
- return 1;
- }
- }
- }
- if(dialogid == d_2)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_1, DIALOG_STYLE_LIST , "Dynamic dialog maker by AF","Create New Dialog\nEdit Existing Ones","Select","Close");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_2, DIALOG_STYLE_INPUT,"Dialog's name(Step 1)","Dialog's name can not be empty,please choose a name for the dialog","Select","Close");
- return 1;
- }
- else
- {
- format(nName,sizeof(nName),"%s.AF",inputtext);
- ShowPlayerDialog(playerid, d_3, DIALOG_STYLE_LIST ,"Dialog's style(Step 2)","Message Box Style\nInput Style\nList Style\nPassword Style","Select","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_3)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_2, DIALOG_STYLE_INPUT,"Dialog's name(Step 1)","Choose Dialog's name","Select","Back");
- return 1;
- }
- else
- {
- switch(listitem)
- {
- case 0:
- {
- dstyle = 0;
- ShowPlayerDialog(playerid, d_m_1, DIALOG_STYLE_INPUT,"Dialog's Header(Step 3)","Enter The Text you want to be diplayed as header of the dialog","Enter","Back");
- return 1;
- }
- case 1:
- {
- dstyle = 1;
- ShowPlayerDialog(playerid, d_m_1, DIALOG_STYLE_INPUT,"Dialog's Header(Step 3)","Enter The Text you want to be diplayed as header of the dialog","Enter","Back");
- return 1;
- }
- case 2:
- {
- ShowPlayerDialog(playerid, d_l_1, DIALOG_STYLE_INPUT,"Dialog's Header(Step 3)","Enter The Text you want to be diplayed as header of the dialog","Enter","Back");
- dstyle = 2;
- return 1;
- }
- case 3:
- {
- ShowPlayerDialog(playerid, d_m_1, DIALOG_STYLE_INPUT,"Dialog's Header(Step 3)","Enter The Text you want to be diplayed as header of the dialog","Enter","Back");
- dstyle = 3;
- return 1;
- }
- }
- }
- }
- if(dialogid == d_m_1)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_3, 2,"Dialog's style(Step 2)","Message Box Style\nInput Style\nList Style\nPassword Style","Select","Back");
- return 1;
- }
- else
- {
- format(strc,sizeof(strc),"%s",inputtext);
- ShowPlayerDialog(playerid, d_m_2, DIALOG_STYLE_INPUT,"Dialog's message(Step 4)","Enter The Text that you want to show as dialog's message","Enter","Back");
- return 1;
- }
- }
- if(dialogid == d_m_2)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_m_1, DIALOG_STYLE_INPUT,"Dialog's Header(Step 3)","Enter The Text you want to be diplayed as header of the dialog","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_2, DIALOG_STYLE_INPUT,"Dialog's Header(Step 3)","The Text Must contain at least one character/number","Enter","Back");
- return 1;
- }
- else
- {
- format(stri,sizeof(stri),"%s",inputtext);
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_m_3)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_m_2, DIALOG_STYLE_INPUT,"Dialog's message(Step 4)","Enter The Text that you want to show as dialog's message","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","This bottun must contain atleast one character.Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(strb1,sizeof(strb1),"%s",inputtext);
- ShowPlayerDialog(playerid, d_m_4, DIALOG_STYLE_INPUT,"Dialog's left bottun(step 6)","Enter the Text of left button of the dialog(The last button might be the only button if the next button be null)","Preview","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_m_4)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(strb2,sizeof(strb2),"%s",inputtext);
- if(dstyle == 2)
- {
- if(isnull(nitem2))
- {
- inum = 1;
- stri = nitem1;
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- if(isnull(nitem3))
- {
- inum = 2;
- format(stri,sizeof(stri),"%s\n%s",nitem1,nitem2);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- if(isnull(nitem4))
- {
- inum = 3;
- format(stri,sizeof(stri),"%s\n%s\n%s",nitem1,nitem2,nitem3);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- if(isnull(nitem5))
- {
- inum = 4;
- format(stri,sizeof(stri),"%s\n%s\n%s\n%s",nitem1,nitem2,nitem3,nitem4);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- if(isnull(nitem6))
- {
- inum = 5;
- format(stri,sizeof(stri),"%s\n%s\n%s\n%s\n%s",nitem1,nitem2,nitem3,nitem4,nitem5);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- if(isnull(nitem7))
- {
- inum = 6;
- format(stri,sizeof(stri),"%s\n%s\n%s\n%s\n%s\n%s",nitem1,nitem2,nitem3,nitem4,nitem5,nitem6);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- if(isnull(nitem8))
- {
- inum = 7;
- format(stri,sizeof(stri),"%s\n%s\n%s\n%s\n%s\n%s\n%s",nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,nitem7);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- if(isnull(nitem9))
- {
- inum = 8;
- format(stri,sizeof(stri),"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,nitem7,nitem8);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- if(isnull(nitem10))
- {
- inum = 9;
- format(stri,sizeof(stri),"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,nitem7,nitem8,nitem9);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- else
- {
- inum = 10;
- format(stri,sizeof(stri),"%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,nitem7,nitem8,nitem9,nitem10);
- ShowPlayerDialog(playerid, prev, dstyle, strc, stri, strb1, strb2);
- return 1;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- else
- {
- ShowPlayerDialog(playerid, prev, dstyle, strc,stri,strb1,strb2);
- return 1;
- }
- }
- }
- if(dialogid == d_l_1)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_3, 2,"Dialog's style(Step 2)","Massage Box Style\nInput Style\nList Style\nPassword Style","Select","Back");
- return 1;
- }
- else
- {
- format(strc,sizeof(strc),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_2, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The first item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- }
- if(dialogid == d_l_2)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_1, DIALOG_STYLE_INPUT,"Dialog's Header(Step 3)","Enter The Text you want to be diplayed as header of the dialog","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_l_2, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","This Part at least needs one character.Enter The first item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem1,sizeof(nitem1),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_3, 1,"Dialog's items(Step 4)","Enter The second item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_3)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_2, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The first item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem2,sizeof(nitem2),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_4, 1,"Dialog's items(Step 4)","Enter The third item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_4)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_3, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The second item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem3,sizeof(nitem3),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_5, 1,"Dialog's items(Step 4)","Enter The fourth item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_5)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_4, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The third item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem4,sizeof(nitem4),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_6, 1,"Dialog's items(Step 4)","Enter The fourth item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_6)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_5, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The fourth item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem5,sizeof(nitem5),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_7, 1,"Dialog's items(Step 4)","Enter The fifth item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_7)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_6, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The fifth item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem6,sizeof(nitem6),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_8, 1,"Dialog's items(Step 4)","Enter The seventh item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_8)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_7, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The sixth item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem7,sizeof(nitem7),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_9, 1,"Dialog's items(Step 4)","Enter The eighth item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_9)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_8, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The eighth item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem8,sizeof(nitem8),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_10, 1,"Dialog's items(Step 4)","Enter The ninth item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_10)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_9, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The ninth item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem9,sizeof(nitem9),"%s",inputtext);
- ShowPlayerDialog(playerid, d_l_11, 1,"Dialog's items(Step 4)","Enter The tenth item that you want to show in the dialog (leave the box empty if you don't want to any other item)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == d_l_11)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, d_l_9, DIALOG_STYLE_INPUT,"Dialog's items(Step 4)","Enter The ninth item that you want to show in the dialog (This systems does not support more than 10 items)","Enter","Back");
- return 1;
- }
- else
- {
- if(strlen(inputtext) < 1)
- {
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- else
- {
- format(nitem10,sizeof(nitem10),"%s",inputtext);
- ShowPlayerDialog(playerid, d_m_3, DIALOG_STYLE_INPUT,"Dialog's right bottun(step 5)","Enter the Text of right bottun of the dialog(it might be the only bottun if the next bottun be null)","Enter","Back");
- return 1;
- }
- }
- }
- if(dialogid == prev)
- {
- if(!response)
- {
- ShowPlayerDialog(playerid, prev2, DIALOG_STYLE_LIST,"What do you want to do with the dialog?","Save it\nDelete it","Select","");
- return 1;
- }
- else
- {
- ShowPlayerDialog(playerid, prev2, DIALOG_STYLE_LIST,"What do you want to do with the dialog?","Save it\nDelete it","Select","");
- return 1;
- }
- }
- if(dialogid == prev2)
- {
- if(!response)
- {
- return 1;
- }
- else
- {
- switch(listitem)
- {
- case 0:
- {
- if(dstyle == 2)
- {
- switch(inum)
- {
- case 1:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\", \"%s\", \"%s\");",dstyle,strc,stri,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 2:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 3:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,nitem3,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 4:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\\n%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,nitem3,nitem4,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 5:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\\n%s\\n%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,nitem3,nitem4,nitem5,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 6:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\\n%s\\n%s\\n%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 7:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,nitem7,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 8:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,nitem7,nitem8,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 9:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,nitem7,nitem8,nitem9,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- case 10:
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", \"%s\", \"%s\");",dstyle,strc,nitem1,nitem2,nitem3,nitem4,nitem5,nitem6,nitem7,nitem8,nitem9,nitem10,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- }
- }
- else
- {
- new fi[1024];
- format(fi, sizeof(fi),"ShowPlayerDialog(playerid, dialogid, %d, \"%s\", \"%s\", \"%s\", \"%s\");",dstyle,strc,stri,strb1,strb2);
- new File:dialog = fopen(nName, io_write);
- if(dialog)
- {
- fwrite(dialog, fi);
- fclose(dialog);
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully made");
- return 1;
- }
- }
- }
- case 1:
- {
- SendClientMessage(playerid, COLOR_WHITE, "The file have been succesfully deleted");
- return 1;
- }
- }
- }
- }
- if(dialogid == e_1)
- {
- ShowPlayerDialog(playerid, d_1, DIALOG_STYLE_LIST, "Dynamic dialog maker by AF","Create New Dialog\nEdit Existing Ones","Select","Close");
- return 1;
- }
- else
- {
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement