Advertisement
Guest User

Untitled

a guest
Dec 25th, 2013
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 56.20 KB | None | 0 0
  1. // This is a comment
  2. // Scripted by battlezone (aka seif), do not remove da credits!!
  3. //That's only for reading , if you need full filterscript check back topic.
  4. #define FILTERSCRIPT
  5.  
  6. #include <a_samp>
  7. #include <zcmd>
  8.  
  9. new str_news[128];
  10. new str_reported[20];
  11. new room1status[15];
  12. new room2status[15];
  13. new room3status[15];
  14. new room4status[15];
  15. new room5status[15];
  16. new room6status[15];
  17. new room1used;
  18. new room1topic[128];
  19. new room1reply[128];
  20. new room2used;
  21. new room2topic[128];
  22. new room2reply[128];
  23. new room3used;
  24. new room3topic[128];
  25. new room3reply[128];
  26. new room4used;
  27. new room4topic[128];
  28. new room4reply[128];
  29. new room5used;
  30. new room5topic[128];
  31. new room5reply[128];
  32. new room6used;
  33. new room6topic[128];
  34. new room6reply[128];
  35. new users1readings, users2readings, users3readings, users4readings;
  36. new main1readings, main2readings, main4readings;
  37. new server1readings, server2readings, server3readings;
  38. new off1readings, off2readings, off3readings, off4readings, off5readings, off6readings;
  39.  
  40. #if defined FILTERSCRIPT
  41.  
  42. public OnFilterScriptInit()
  43. {
  44. room1status = "{00C700}Free";
  45. room2status = "{00C700}Free";
  46. room3status = "{00C700}Free";
  47. room4status = "{00C700}Free";
  48. room5status = "{00C700}Free";
  49. room6status = "{00C700}Free";
  50.  
  51. room1topic = "";
  52. room1reply = "";
  53. room1used = 0;
  54.  
  55. room2topic = "";
  56. room2reply = "";
  57. room2used = 0;
  58.  
  59. room3topic = "";
  60. room3reply = "";
  61. room3used = 0;
  62.  
  63. room4topic = "";
  64. room4reply = "";
  65. room4used = 0;
  66.  
  67. room5topic = "";
  68. room5reply = "";
  69. room5used = 0;
  70.  
  71. room6topic = "";
  72. room6reply = "";
  73. room6used = 0;
  74.  
  75. main1readings = 0;
  76. main2readings = 0;
  77. main4readings = 0;
  78. server1readings =0;
  79. server2readings =0;
  80. server3readings =0;
  81. users1readings =0;
  82. users2readings =0;
  83. users3readings =0;
  84. users4readings =0;
  85. off1readings =0;
  86. off2readings =0;
  87. off3readings =0;
  88. off4readings =0;
  89. off5readings =0;
  90. off6readings =0;
  91. print("\n--------------------------------------");
  92. print(" In-Game Forum by battlezone");
  93. print("--------------------------------------\n");
  94.     return 1;
  95. }
  96.  
  97. public OnFilterScriptExit()
  98. {
  99. room1status = "";
  100. room2status = "";
  101. room3status = "";
  102. room4status = "";
  103. room5status = "";
  104. room6status = "";
  105. room1topic = "";
  106. room1reply = "";
  107. room1used = 0;
  108. room2topic = "";
  109. room2reply = "";
  110. room2used = 0;
  111. room3topic = "";
  112. room3reply = "";
  113. room3used = 0;
  114. room4topic = "";
  115. room4reply = "";
  116. room4used = 0;
  117. room5topic = "";
  118. room5reply = "";
  119. room5used = 0;
  120. room6topic = "";
  121. room6reply = "";
  122. room6used = 0;
  123. main1readings = 0;
  124. main2readings = 0;
  125. main4readings = 0;
  126. server1readings =0;
  127. server2readings =0;
  128. server3readings =0;
  129. users1readings =0;
  130. users2readings =0;
  131. users3readings =0;
  132. users4readings =0;
  133. off1readings =0;
  134. off2readings =0;
  135. off3readings =0;
  136. off4readings =0;
  137. off5readings =0;
  138. off6readings =0;
  139.     return 1;
  140. }
  141.  
  142.  
  143. #endif
  144.  
  145.  
  146. public OnPlayerRequestClass(playerid, classid)
  147. {
  148.  
  149.     return 1;
  150. }
  151.  
  152.  
  153. public OnPlayerDeath(playerid, killerid, reason)
  154. {
  155.     return 1;
  156. }
  157.  
  158. stock AddLogLine(field[ ],file[ ], input[ ] )
  159. {
  160.     new string[128];
  161.     format(string, 128, "%s : %s\r\n", field, input);
  162.  
  163.     new File:fhandle;
  164.  
  165.     if(fexist(file)) {
  166.         printf("Creating file '%s' because theres no file created with that name.", file);
  167.     }
  168.  
  169.     fhandle = fopen(file,io_append);
  170.  
  171.     fwrite(fhandle,string);
  172.     fclose(fhandle);
  173.     return 1;
  174. }
  175. stock AddLogLineName(field[ ],file[ ], input[ ] )
  176. {
  177.     new string[128];
  178.     format(string, 128, "%s : %s was reported as below\r\n", field, input);
  179.  
  180.     new File:fhandle;
  181.  
  182.     if(fexist(file)) {
  183.         printf("Creating file '%s' because theres no file created with that name.", file);
  184.     }
  185.  
  186.     fhandle = fopen(file,io_append);
  187.  
  188.     fwrite(fhandle,string);
  189.     fclose(fhandle);
  190.     return 1;
  191. }
  192. stock AddLogLineForReport(field[ ], field2[ ],file[ ], input[ ] )
  193. {
  194.     new string[128];
  195.     format(string, 128, "%s reported %s : %s\r\n", field,field2,  input);
  196.  
  197.     new File:fhandle;
  198.  
  199.     if(fexist(file)) {
  200.         printf("Creating file '%s' because theres no file created with that name.", file);
  201.     }
  202.  
  203.     fhandle = fopen(file,io_append);
  204.  
  205.     fwrite(fhandle,string);
  206.     fclose(fhandle);
  207.     return 1;
  208. }
  209.  
  210. CMD:forum(playerid,params [])
  211. {
  212.     #pragma unused params
  213.     new String[200];
  214.     format(String, sizeof(String),"{FF0000}Server {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Users {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Off Topic {0276FF}[Views:%d]",main1readings, main2readings, main4readings);
  215.     ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  216. return 1;
  217. }
  218. CMD:cr1(playerid,params [])
  219. {
  220.     #pragma unused params
  221.     if(IsPlayerAdmin(playerid))
  222.     {
  223.     room1status = "{00C700}Free";
  224.     room1topic = "";
  225.     room1reply = "";
  226.     room1used = 0;
  227.     new str[25];
  228.     GetPlayerName(playerid, str, sizeof(str));
  229.     new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 1", str);
  230.     SendClientMessageToAll(0x375FFFFF, string);
  231.     }
  232.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  233. return 1;
  234. }
  235. CMD:cr2(playerid,params [])
  236. {
  237.     #pragma unused params
  238.     if(IsPlayerAdmin(playerid))
  239.     {
  240.     room2status = "{00C700}Free";
  241.     room2topic = "";
  242.     room2reply = "";
  243.     room2used = 0;
  244.     new str[25];
  245.     GetPlayerName(playerid, str, sizeof(str));
  246.     new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 2", str);
  247.     SendClientMessageToAll(0x375FFFFF, string);
  248.     }
  249.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  250. return 1;
  251. }
  252. CMD:cr3(playerid,params [])
  253. {
  254.     #pragma unused params
  255.     if(IsPlayerAdmin(playerid))
  256.     {
  257.     room3status = "{00C700}Free";
  258.     room3topic = "";
  259.     room3reply = "";
  260.     room3used = 0;
  261.     new str[25];
  262.     GetPlayerName(playerid, str, sizeof(str));
  263.     new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 3", str);
  264.     SendClientMessageToAll(0x375FFFFF, string);
  265.     }
  266.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  267. return 1;
  268. }
  269. CMD:cr4(playerid,params [])
  270. {
  271.     #pragma unused params
  272.     if(IsPlayerAdmin(playerid))
  273.     {
  274.     room4status = "{00C700}Free";
  275.     room4topic = "";
  276.     room4reply = "";
  277.     room4used = 0;
  278.     new str[25];
  279.     GetPlayerName(playerid, str, sizeof(str));
  280.     new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 4", str);
  281.     SendClientMessageToAll(0x375FFFFF, string);
  282.     }
  283.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  284. return 1;
  285. }
  286. CMD:cr5(playerid,params [])
  287. {
  288.     #pragma unused params
  289.     if(IsPlayerAdmin(playerid))
  290.     {
  291.     room5status = "{00C700}Free";
  292.     room5topic = "";
  293.     room5reply = "";
  294.     room5used = 0;
  295.     new str[25];
  296.     GetPlayerName(playerid, str, sizeof(str));
  297.     new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 5", str);
  298.     SendClientMessageToAll(0x375FFFFF, string);
  299.     }
  300.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  301. return 1;
  302. }
  303. CMD:cr6(playerid,params [])
  304. {
  305.     #pragma unused params
  306.     if(IsPlayerAdmin(playerid))
  307.     {
  308.     room6status = "{00C700}Free";
  309.     room6topic = "";
  310.     room6reply = "";
  311.     room6used = 0;
  312.     new str[25];
  313.     GetPlayerName(playerid, str, sizeof(str));
  314.     new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 6", str);
  315.     SendClientMessageToAll(0x375FFFFF, string);
  316.     }
  317.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  318. return 1;
  319. }
  320. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  321. {
  322. if(dialogid == 558)
  323. {
  324.     if(!response)
  325.         {
  326.         new String[200];
  327.         format(String, sizeof(String),"{FF0000}Server {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Users {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Off Topic {0276FF}[Views:%d]",main1readings, main2readings, main4readings);
  328.         ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  329.         }
  330.     if(response)
  331.         {
  332.             switch(listitem)
  333.             {
  334.                 case 0:
  335.                 {
  336.                 new String[200];
  337.                 format(String, sizeof(String),"{FF0000}Suggest\n{EB7608}View the recent Suggestion");
  338.                 ShowPlayerDialog(playerid, 202, DIALOG_STYLE_LIST, "In-Game forum - Users - Suggestion",String,"Select","Exit");
  339.                 users1readings ++;
  340.                 return 1;
  341.                 }
  342.                 case 1:
  343.                 {
  344.                 new String[200];
  345.                 format(String, sizeof(String),"{FF0000}Report a bug\n{EB7608}View the recent report");
  346.                 ShowPlayerDialog(playerid, 212, DIALOG_STYLE_LIST, "In-Game forum - Users - Bug Report",String,"Select","Exit");
  347.                 users2readings ++;
  348.                 return 1;
  349.                 }
  350.                 case 2:
  351.                 {
  352.                 new String[200];
  353.                 format(String, sizeof(String),"{FF0000}Report a player/admin\n{EB7608}View the recent report");
  354.                 ShowPlayerDialog(playerid, 222, DIALOG_STYLE_LIST, "In-Game forum - Users - Report a player/admin",String,"Select","Exit");
  355.                 users3readings ++;
  356.                 return 1;
  357.                 }
  358.                 case 3:
  359.                 {
  360.                 ShowPlayerDialog(playerid, 240, DIALOG_STYLE_INPUT, "Ask Something Here (128 character max)", "Type your question and you will be answered within 24 hours.", "Submit", "Cancel");
  361.                 users4readings ++;
  362.                 return 1;
  363.                 }
  364.             }
  365.   }
  366. return 1;
  367. }
  368. if(dialogid == 222)
  369.         {
  370.         if(!response)
  371.         {
  372.         new String[200];
  373.         format(String, sizeof(String),"{FF0000}Server {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Users {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Off Topic {0276FF}[Views:%d]",main1readings, main2readings, main4readings);
  374.         ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  375.         }
  376.         if(response)
  377.         {
  378.             switch(listitem)
  379.             {
  380.                 case 0:
  381.                 {
  382.                 new String[200];
  383.                 format(String, sizeof(String),"{FF0000}Admin Report\n{FF0000}Player Report");
  384.                 ShowPlayerDialog(playerid, 226, DIALOG_STYLE_LIST, "In-Game forum - Users - Report Admin/Player",String,"Select","Exit");
  385.                 return 1;
  386.                 }
  387.                 case 1:
  388.                 {
  389.                 new string[128];
  390. new File:ftw2 = fopen("players-admins-reports.txt", io_read); // Open the file
  391.  while(fread(ftw2, string)) //reads the file line-by-line
  392.  {
  393.         ShowPlayerDialog(playerid, 280, DIALOG_STYLE_MSGBOX, "Recent Report",string,"Close","");
  394.  }
  395.   fclose(ftw2);
  396.                 return 1;
  397.                 }
  398.             }
  399.             }
  400. return 1;
  401. }
  402. if(dialogid == 226)
  403.         {
  404.         if(!response)
  405.         {
  406.         new String[200];
  407.         format(String, sizeof(String),"{FF0000}Server {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Users {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Off Topic {0276FF}[Views:%d]",main1readings, main2readings, main4readings);
  408.         ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  409.         }
  410.         if(response)
  411.         {
  412.             switch(listitem)
  413.             {
  414.                 case 0:
  415.                 {
  416.                 ShowPlayerDialog(playerid, 230, DIALOG_STYLE_INPUT, "Admin Report (128 character max)", "Type the admin's name here.", "Submit", "Cancel");
  417.                 return 1;
  418.                 }
  419.                 case 1:
  420.                 {
  421.                 ShowPlayerDialog(playerid, 229, DIALOG_STYLE_INPUT, "Player Report (128 character max)", "Type the player's name here.", "Submit", "Cancel");
  422.                 return 1;
  423.                 }
  424.             }
  425.         }
  426. return 1;
  427. }
  428. if(dialogid == 240) //room 1 new topic
  429.         {
  430.             if(response)
  431.         {
  432.         new str[25];
  433.         GetPlayerName(playerid, str, sizeof(str));
  434.         new strdate[30], year,month,day;    getdate(year, month, day);
  435.         format(strdate, sizeof(strdate), "[%d/%d/%d] %s",day,month,year, str);
  436.             if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  437.                  {
  438.                  AddLogLine(strdate , "questions.txt", inputtext );
  439.                  }
  440.                  else if(strlen(inputtext) < 10)
  441.                  {
  442.                      SendClientMessage(playerid,0xFAFFBFAA,"Your question was too short, retype it.");
  443.                  }
  444.                  else if(strlen(inputtext) >= 128)
  445.                  {
  446.                     ShowPlayerDialog(playerid, 240, DIALOG_STYLE_INPUT, "Need Help? (128 character max)", "Your question: ( DO NOT EXCEED THE MAX CHARACTERS LIMIT )", "Submit", "Cancel");
  447.                     }
  448.         }
  449.         return 1;
  450.         }
  451. if(dialogid == 229) //room 1 new topic
  452.         {
  453.             if(response)
  454.         {
  455.         new strdate[20], year,month,day;    getdate(year, month, day);
  456.         format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
  457.             if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  458.                  {
  459.                  AddLogLineName(strdate , "players-admins-reports.txt", inputtext );
  460.                  format(str_reported, sizeof(str_reported), "%s",inputtext);
  461.                  ShowPlayerDialog(playerid, 228, DIALOG_STYLE_INPUT, "Report (128 character max)", "Now type your report here.", "Submit", "Cancel");
  462.                  }
  463.                  else if(strlen(inputtext) < 2)
  464.                  {
  465.                      SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  466.                  }
  467.                  else if(strlen(inputtext) >= 128)
  468.                  {
  469.                     ShowPlayerDialog(playerid, 229, DIALOG_STYLE_INPUT, "Player's name (128 character max)", "Type players's name here.", "Submit", "Cancel");
  470.                     }
  471.         }
  472.         return 1;
  473.         }
  474. if(dialogid == 228) //room 1 new topic
  475.         {
  476.             if(response)
  477.         {
  478.         new str[128];
  479.         GetPlayerName(playerid, str, sizeof(str));
  480.             if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  481.                  {
  482.                  AddLogLineForReport(str , str_reported, "players-admins-reports.txt", inputtext );
  483.                  SendClientMessage(playerid,0xFFFFBFAA,"Player reported successfully.");
  484.                  }
  485.                  else if(strlen(inputtext) < 2)
  486.                  {
  487.                      SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  488.                  }
  489.                  else if(strlen(inputtext) >= 128)
  490.                  {
  491.                     ShowPlayerDialog(playerid, 228, DIALOG_STYLE_INPUT, "Player report (128 character max)", "Type your report here.", "Submit", "Cancel");
  492.                     }
  493.         }
  494.         return 1;
  495.         }
  496. if(dialogid == 230) //room 1 new topic
  497.         {
  498.             if(response)
  499.         {
  500.         new strdate[20], year,month,day;    getdate(year, month, day);
  501.         format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
  502.             if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  503.                  {
  504.                  AddLogLineName(strdate , "players-admins-reports.txt", inputtext );
  505.                  format(str_reported, sizeof(str_reported), "%s",inputtext);
  506.                  ShowPlayerDialog(playerid, 231, DIALOG_STYLE_INPUT, "Report (128 character max)", "Now type your report here.", "Submit", "Cancel");
  507.                  }
  508.                  else if(strlen(inputtext) < 2)
  509.                  {
  510.                      SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  511.                  }
  512.                  else if(strlen(inputtext) >= 128)
  513.                  {
  514.                     ShowPlayerDialog(playerid, 230, DIALOG_STYLE_INPUT, "Admin's name (128 character max)", "Type admin's name here.", "Submit", "Cancel");
  515.                     }
  516.         }
  517.         return 1;
  518.         }
  519. if(dialogid == 231) //room 1 new topic
  520.         {
  521.             if(response)
  522.         {
  523.         new str[128];
  524.         GetPlayerName(playerid, str, sizeof(str));
  525.             if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  526.                  {
  527.                  AddLogLineForReport(str , str_reported, "players-admins-reports.txt", inputtext );
  528.                  SendClientMessage(playerid,0xFAFFBFAA,"Admin reported successfully.");
  529.                  }
  530.                  else if(strlen(inputtext) < 2)
  531.                  {
  532.                      SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  533.                  }
  534.                  else if(strlen(inputtext) >= 128)
  535.                  {
  536.                     ShowPlayerDialog(playerid, 231, DIALOG_STYLE_INPUT, "Admin report (128 character max)", "Type your report here.", "Submit", "Cancel");
  537.                     }
  538.         }
  539.         return 1;
  540.         }
  541. if(dialogid == 212)
  542.         {
  543.         if(!response)
  544.         {
  545.         new String[200];
  546.         format(String, sizeof(String),"{FF0000}Server {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Users {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Off Topic {0276FF}[Views:%d]",main1readings, main2readings, main4readings);
  547.     ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  548.         }
  549.         if(response)
  550.         {
  551.             switch(listitem)
  552.             {
  553.                 case 0:
  554.                 {
  555.                 ShowPlayerDialog(playerid, 210, DIALOG_STYLE_INPUT, "New Bug Report (128 character max)", "Type your report here.", "Submit", "Cancel");
  556.                 return 1;
  557.                 }
  558.                 case 1:
  559.                 {
  560.                 new str[128];
  561.                 GetPlayerName(playerid, str, sizeof(str));
  562. new File:ftw = fopen("bug-reports.txt", io_read); // Open the file
  563.  while(fread(ftw, str)) //reads the file line-by-line
  564.  {
  565.         ShowPlayerDialog(playerid, 211, DIALOG_STYLE_MSGBOX, "Recent Report",str,"Close","");
  566.  }
  567.   fclose(ftw);
  568.                 return 1;
  569.                 }
  570.             }
  571.               }
  572.          return 1;
  573.          }
  574. if(dialogid == 202)
  575.         {
  576.         if(!response)
  577.         {
  578.         new String[200];
  579.         format(String, sizeof(String),"{FF0000}Server {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Users {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Off Topic {0276FF}[Views:%d]",main1readings, main2readings, main4readings);
  580.     ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  581.         }
  582.         if(response)
  583.         {
  584.             switch(listitem)
  585.             {
  586.                 case 0:
  587.                 {
  588.                 ShowPlayerDialog(playerid, 200, DIALOG_STYLE_INPUT, "New Suggestion (128 character max)", "Type your suggestion here.", "Submit", "Cancel");
  589.                 return 1;
  590.                 }
  591.                 case 1:
  592.                 {
  593.                 new string[256];
  594. new File:ftw = fopen("suggestions.txt", io_read); // Open the file
  595.  while(fread(ftw, string)) //reads the file line-by-line
  596.  {
  597.         ShowPlayerDialog(playerid, 201, DIALOG_STYLE_MSGBOX, "Recent Suggestion",string,"Close","");
  598.  }
  599.   fclose(ftw);
  600.                 return 1;
  601.                 }
  602.             }
  603.               }
  604.          return 1;
  605.          }
  606. if(dialogid == 557)
  607.         {
  608.         if(!response)
  609.         {
  610.         new String[200];
  611.         format(String, sizeof(String),"{FF0000}Server {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Users {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Off Topic {0276FF}[Views:%d]",main1readings, main2readings, main4readings);
  612.     ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  613.         }
  614.         if(response)
  615.         {
  616.             switch(listitem)
  617.             {
  618.                 case 0:
  619.                 {
  620.                 if(IsPlayerAdmin(playerid))
  621.                 {
  622.                 new String[100];
  623.                 format(String, sizeof(String),"{FF0000}News {0276FF}\nEdit News [ONLY ADMINS]");
  624.                 ShowPlayerDialog(playerid, 290, DIALOG_STYLE_LIST, "In-Game forum : Server - News",String,"Select","Back");
  625.                 }
  626.                 else
  627.                 {
  628.                 new String[100];
  629.                 format(String, sizeof(String),"{FF0000}News");
  630.                 ShowPlayerDialog(playerid, 290, DIALOG_STYLE_LIST, "In-Game forum : Server - News",String,"Select","Back");
  631.                 }
  632.                 server1readings ++;
  633.                 return 1;
  634.                 }
  635.                 case 1:
  636.                 {
  637.                 server2readings ++;
  638.                 ShowPlayerDialog(playerid, 250, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply For The Community Tag", "Type your full name - age - region below.", "Submit", "Cancel");
  639.                 return 1;
  640.                 }
  641.                 case 2:
  642.                 {
  643.                 ShowPlayerDialog(playerid, 250, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply To be Admin", "Type your full name - age - region below.", "Submit", "Cancel");
  644.                 server3readings ++;
  645.                 return 1;
  646.                 }
  647.             }
  648.   }
  649.          return 1;
  650.          }
  651.  
  652. if(dialogid == 290 && response)
  653.         {
  654.         switch(listitem)
  655.             {
  656.                 case 0: ShowPlayerDialog(playerid, 291, DIALOG_STYLE_MSGBOX, "In-Game Forum: Server - News & Info", str_news, "ok" , "cancel");
  657.                 case 1: ShowPlayerDialog(playerid, 292, DIALOG_STYLE_INPUT, "Server Updates", "Type The Updates Below.", "Submit", "Cancel");
  658.             }
  659.         return 1;
  660.         }
  661. if(dialogid == 250 && response)
  662.         {
  663.         new strdate[30], year,month,day;    getdate(year, month, day);
  664.         format(strdate, sizeof(strdate), "[%d/%d/%d]",day,month,year);
  665.         AddLogLine(strdate , "admin-requests.txt", inputtext );
  666.         ShowPlayerDialog(playerid, 251, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply", "How long have you been a part of the Community? How active are you? Do You respect rules?", "Submit", "Cancel");
  667.         return 1;
  668.         }
  669. if(dialogid == 251 && response)
  670.         {
  671.         new strr[25];
  672.         GetPlayerName(playerid, strr, sizeof(strr));
  673.         AddLogLine(strr , "admin-requests.txt", inputtext );
  674.         ShowPlayerDialog(playerid, 252, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply", "Why do you want the tag? Why should we accept you?", "Submit", "Cancel");
  675.         return 1;
  676.         }
  677. if(dialogid == 252 && response)
  678.         {
  679.         new strr[128];
  680.         GetPlayerName(playerid, strr, sizeof(strr));
  681.         AddLogLine(strr , "admin-requests.txt", inputtext );
  682.         ShowPlayerDialog(playerid, 253, DIALOG_STYLE_MSGBOX, "In-Game Forum : Server - Apply", "You have applied successfully", "ok", "exit");
  683.         return 1;
  684.         }
  685. if(dialogid == 292 && response)
  686.         {
  687.         format(str_news , sizeof(str_news),inputtext);
  688.         return 1;
  689.         }
  690.  
  691. // --> Mains               
  692.  
  693.  
  694. if(dialogid == 556)
  695.         {
  696.          if(response)
  697.         {
  698.             switch(listitem)
  699.             {
  700.                 case 0:
  701.                         {
  702.                         main1readings ++;
  703.                         new String[200];
  704.                         format(String, sizeof(String),"{FF0000}News & Info {0276FF}[Views:%d]\n{FF0000}Apply for the community tag {0276FF}[Views:%d]\n{FF0000}Apply as a staff member {0276FF}[Views:%d]",server1readings, server2readings, server3readings);
  705.                         ShowPlayerDialog(playerid, 557, DIALOG_STYLE_LIST, "In-Game forum : Server",String,"Select","Back");
  706.                         return 1;
  707.                         }
  708.                 case 2:
  709.                 {
  710.                 main2readings ++;
  711.                 new String[200];
  712.                 format(String, sizeof(String),"{FF0000}Suggestions {0276FF}[Views:%d]\n{FF0000}Bugs Reports {0276FF}[Views:%d]\n{FF0000}Report a player/admin {0276FF}[Views:%d]\n{FF0000}Administrative help & support {0276FF}[Views:%d]",users1readings, users2readings, users3readings, users4readings);
  713.                 ShowPlayerDialog(playerid, 558, DIALOG_STYLE_LIST, "In-Game forum : Users",String,"Select","Back");
  714.                 return 1;
  715.                 }
  716.                 case 4:
  717.                 {
  718.                 main4readings ++;
  719.                 new String[271];
  720.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  721.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  722.                 return 1;
  723.                 }
  724.             }
  725.         }
  726.          return 1;
  727.          }
  728. // --> Main 2 (users)
  729.  
  730. if(dialogid == 200) //room 1 new topic
  731.         {
  732.             if(response)
  733.         {
  734.         new str[128];
  735.                 GetPlayerName(playerid, str, sizeof(str));
  736.             if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  737.                  {
  738.                  AddLogLine(str , "suggestions.txt", inputtext );
  739.                  }
  740.                  else if(strlen(inputtext) < 10)
  741.                  {
  742.                      SendClientMessage(playerid,0xFAFFBFAA,"Your suggestion was too short, retype it.");
  743.                  }
  744.                  else if(strlen(inputtext) >= 128)
  745.                  {
  746.                     ShowPlayerDialog(playerid, 640, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your suggestion.", "Submit", "Cancel");
  747.                  }
  748.         }
  749.         }
  750. if(dialogid == 210) //room 1 new topic
  751.         {
  752.             if(response)
  753.         {
  754.         new str[128];
  755.                 GetPlayerName(playerid, str, sizeof(str));
  756.             if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  757.                  {
  758.                  AddLogLine(str , "bug-reports.txt", inputtext );
  759.                  }
  760.                  else if(strlen(inputtext) < 10)
  761.                  {
  762.                      SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  763.                  }
  764.                  else if(strlen(inputtext) >= 128)
  765.                  {
  766.                     ShowPlayerDialog(playerid, 640, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your report.", "Submit", "Cancel");
  767.                  }
  768.         }
  769.         }
  770.  
  771. //---------------------//
  772. // --> Main 3 (off topic)
  773. if(dialogid == 559)
  774.         {
  775.         if(!response)
  776.         {
  777.         new String[200];
  778.         format(String, sizeof(String),"{FF0000}Server {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Users {0276FF}[Views:%d]\n{EB7608}----------***----------\n{FF0000}Off Topic {0276FF}[Views:%d]",main1readings, main2readings, main4readings);
  779.         ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  780.         }
  781.         if(response)
  782.         {
  783.             switch(listitem)
  784.             {
  785.                 case 0:
  786.                 {
  787.                 off1readings ++;
  788.                 new String[200];
  789.                 if(room1used == 0) // room1 not used
  790.                 {
  791.                 format(String, sizeof(String),"{84C700}+New Topic+");
  792.                 ShowPlayerDialog(playerid, 560, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  793.                 }
  794.                 else // room1 used
  795.                 {
  796.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  797.                 ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  798.                 }
  799.                 return 1;
  800.                 }
  801.                 case 1:
  802.                 {
  803.                 off2readings ++;
  804.                 new String[200];
  805.                 if(room2used == 0) // room1 not used
  806.                 {
  807.                 format(String, sizeof(String),"{84C700}+New Topic+");
  808.                 ShowPlayerDialog(playerid, 570, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  809.                 }
  810.                 else // room1 used
  811.                 {
  812.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  813.                 ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  814.                 }
  815.                 return 1;
  816.                 }
  817.                 case 2:
  818.                 {
  819.                 off3readings ++;
  820.                 new String[200];
  821.                 if(room3used == 0) // room1 not used
  822.                 {
  823.                 format(String, sizeof(String),"{84C700}+New Topic+");
  824.                 ShowPlayerDialog(playerid, 580, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  825.                 }
  826.                 else // room1 used
  827.                 {
  828.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  829.                 ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  830.                 }
  831.                 return 1;
  832.                 }
  833.                 case 3:
  834.                 {
  835.                 off4readings ++;
  836.                 new String[200];
  837.                 if(room4used == 0) // room1 not used
  838.                 {
  839.                 format(String, sizeof(String),"{84C700}+New Topic+");
  840.                 ShowPlayerDialog(playerid, 590, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  841.                 }
  842.                 else // room1 used
  843.                 {
  844.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  845.                 ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  846.                 }
  847.                 return 1;
  848.                 }
  849.                 case 4:
  850.                 {
  851.                 off5readings ++;
  852.                 new String[200];
  853.                 if(room5used == 0) // room1 not used
  854.                 {
  855.                 format(String, sizeof(String),"{84C700}+New Topic+");
  856.                 ShowPlayerDialog(playerid, 600, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  857.                 }
  858.                 else // room1 used
  859.                 {
  860.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  861.                 ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  862.                 }
  863.                 return 1;
  864.                 }
  865.                 case 5:
  866.                 {
  867.                 off6readings ++;
  868.                 new String[200];
  869.                 if(room6used == 0) // room1 not used
  870.                 {
  871.                 format(String, sizeof(String),"{84C700}+New Topic+");
  872.                 ShowPlayerDialog(playerid, 610, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  873.                 }
  874.                 else // room1 used
  875.                 {
  876.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  877.                 ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  878.                 }
  879.                 return 1;
  880.                 }
  881.             }
  882.          }
  883.          return 1;
  884.          }
  885. // --> ROOM 1 <-- //
  886. if(dialogid == 560) //room 1 new topic
  887.         {
  888.             if(response)
  889.         {
  890.             switch(listitem)
  891.             {
  892.                 case 0:ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  893.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room1topic);
  894.             }
  895.             }
  896.             if(!response)
  897.         {
  898.                 new String[271];
  899.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  900.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  901.                 }
  902.                 return 1;
  903.         }
  904. if(dialogid == 561) // room1 new reply
  905.         {
  906.             if(!response)
  907.         {
  908.                 new String[271];
  909.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  910.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  911.                 }
  912.             if(response)
  913.             {
  914.             switch(listitem)
  915.             {
  916.                 case 0:ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  917.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room1topic);
  918.  
  919.             }
  920.             }
  921.         }
  922. if(dialogid == 562) //room1 topic posted
  923.         {
  924.         new String[200];
  925.         if (room1used == 1)
  926.         {
  927.  
  928.         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  929.         ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  930.         SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  931.         }
  932.         else
  933.         {
  934.          if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  935.                  {
  936.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  937.                  ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  938.                  room1used = 1;
  939.                  room1status = "{FF0800}used";
  940.                  new str[128];
  941.                  GetPlayerName(playerid, str, sizeof(str));
  942.                  format(room1topic, sizeof(room1topic), "%s : %s",str,inputtext);
  943.                  }
  944.                  else if(strlen(inputtext) < 5)
  945.                  {
  946.                      SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  947.                  }
  948.                  else if(strlen(inputtext) >= 128)
  949.                  {
  950.                     ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  951.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  952.                  }
  953.          }
  954.  
  955. }
  956. if(dialogid == 563) //room1 reply posted
  957.         {
  958.         new String[200];
  959.          if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  960.                  {
  961.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  962.                  ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  963.                  new str[128];
  964.                  GetPlayerName(playerid, str, sizeof(str));
  965.                  format(room1reply, sizeof(room1reply), "%s\n%s : %s",room1reply,str,inputtext);
  966.                  }
  967.          else if(strlen(inputtext) < 4)
  968.                  {
  969.                      SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  970.                  }
  971.          if(strlen(inputtext) >= 15)
  972.                  {
  973.                     ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  974.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  975.                  }
  976. }
  977.  
  978. //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  979.  
  980. // --> ROOM 2 <-- //
  981. if(dialogid == 570) //room 1 new topic
  982.         {
  983.     if(!response)
  984.         {
  985.                 new String[271];
  986.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  987.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  988.                 }
  989.             if(response)
  990.         {
  991.    
  992.             switch(listitem)
  993.             {
  994.                 case 0:ShowPlayerDialog(playerid, 572, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  995.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room2topic);
  996.             }
  997.         }
  998.         }
  999. if(dialogid == 571 ) // room1 new reply
  1000.         {
  1001.             if(!response)
  1002.         {
  1003.                 new String[271];
  1004.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1005.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1006.                 }
  1007.             if(response)
  1008.         {
  1009.             switch(listitem)
  1010.             {
  1011.                 case 0:ShowPlayerDialog(playerid, 573, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  1012.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room2topic);
  1013.             }
  1014.             }
  1015.         }
  1016. if(dialogid == 572) //room1 topic posted
  1017.         {
  1018.         new String[200];
  1019.         if (room2used == 1)
  1020.         {
  1021.         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  1022.         ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  1023.         SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  1024.         }
  1025.         else
  1026.         {
  1027.          if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  1028.                  {
  1029.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  1030.                  ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  1031.                  room2used = 1;
  1032.                  room2status = "{FF0800}used";
  1033.                  new str[128];
  1034.                  GetPlayerName(playerid, str, sizeof(str));
  1035.                  format(room2topic, sizeof(room2topic), "%s : %s",str,inputtext);
  1036.                  }
  1037.                  else if(strlen(inputtext) < 5)
  1038.                  {
  1039.                      SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  1040.                  }
  1041.                  else if(strlen(inputtext) >= 128)
  1042.                  {
  1043.                     ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  1044.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  1045.                  }
  1046.          }
  1047.  
  1048. }
  1049. if(dialogid == 573) //room2 reply posted
  1050.         {
  1051.         new String[200];
  1052.          if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  1053.                  {
  1054.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  1055.                  ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  1056.                  new str[128];
  1057.                  GetPlayerName(playerid, str, sizeof(str));
  1058.                  format(room2reply, sizeof(room2reply), "%s\n%s : %s",room2reply,str,inputtext);
  1059.                  }
  1060.          else if(strlen(inputtext) < 4)
  1061.                  {
  1062.                      SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  1063.                  }
  1064.          if(strlen(inputtext) >= 15)
  1065.                  {
  1066.                     ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  1067.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  1068.                  }
  1069. }
  1070.  
  1071.  
  1072. //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  1073.  
  1074.  
  1075. // --> ROOM 3 <-- //
  1076. if(dialogid == 580 ) //room 1 new topic
  1077.         {
  1078.             if(!response)
  1079.         {
  1080.                 new String[271];
  1081.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1082.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1083.                 }
  1084.             if(response)
  1085.         {
  1086.             switch(listitem)
  1087.             {
  1088.                 case 0:ShowPlayerDialog(playerid, 582, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  1089.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room3topic);
  1090.             }
  1091.         }
  1092.         }
  1093. if(dialogid == 581) // room1 new reply
  1094.         {
  1095.             if(!response)
  1096.         {
  1097.                 new String[271];
  1098.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1099.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1100.                 }
  1101.             if(response)
  1102.         {
  1103.             switch(listitem)
  1104.             {
  1105.                 case 0:ShowPlayerDialog(playerid, 583, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  1106.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room3topic);
  1107.             }
  1108.         }
  1109.         }
  1110. if(dialogid == 582) //room1 topic posted
  1111.         {
  1112.         new String[200];
  1113.         if (room3used == 1)
  1114.         {
  1115.         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  1116.         ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  1117.         SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  1118.         }
  1119.         else
  1120.         {
  1121.          if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  1122.                  {
  1123.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  1124.                  ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  1125.                  room3used = 1;
  1126.                  room3status = "{FF0800}used";
  1127.                  new str[128];
  1128.                  GetPlayerName(playerid, str, sizeof(str));
  1129.                  format(room3topic, sizeof(room3topic), "%s : %s",str,inputtext);
  1130.                  }
  1131.                  else if(strlen(inputtext) < 5)
  1132.                  {
  1133.                      SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  1134.                  }
  1135.                  else if(strlen(inputtext) >= 128)
  1136.                  {
  1137.                     ShowPlayerDialog(playerid, 582, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  1138.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  1139.                  }
  1140.          }
  1141.  
  1142. }
  1143. if(dialogid == 583) //room2 reply posted
  1144.         {
  1145. new String[200];
  1146.          if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  1147.                  {
  1148.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  1149.                  ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  1150.                  new str[128];
  1151.                  GetPlayerName(playerid, str, sizeof(str));
  1152.                  format(room3reply, sizeof(room3reply), "%s\n%s : %s",room3reply,str,inputtext);
  1153.                  }
  1154.          else if(strlen(inputtext) < 4)
  1155.                  {
  1156.                      SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  1157.                  }
  1158.          if(strlen(inputtext) >= 15)
  1159.                  {
  1160.                     ShowPlayerDialog(playerid, 583, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  1161.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  1162.                  }
  1163. }
  1164.  
  1165. //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  1166.  
  1167.  
  1168. // --> ROOM 4 <-- //
  1169. if(dialogid == 590 ) //room 1 new topic
  1170.         {
  1171.             if(!response)
  1172.                 {
  1173.                 new String[271];
  1174.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1175.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1176.                 }
  1177.             if(response)
  1178.             {
  1179.             switch(listitem)
  1180.             {
  1181.                 case 0:ShowPlayerDialog(playerid, 592, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  1182.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room4topic);
  1183.             }
  1184.             }
  1185.         }
  1186. if(dialogid == 591) // room1 new reply
  1187.         {
  1188.             if(!response)
  1189.         {
  1190.                 new String[271];
  1191.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1192.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1193.                 }
  1194.             if(response)
  1195.         {
  1196.             switch(listitem)
  1197.             {
  1198.                 case 0:ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  1199.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room4topic);
  1200.             }
  1201.         }
  1202.         }
  1203. if(dialogid == 592) //room1 topic posted
  1204.         {
  1205.         new String[200];
  1206.         if (room4used == 1)
  1207.         {
  1208.         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  1209.         ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  1210.         SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  1211.         }
  1212.         else
  1213.         {
  1214.          if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  1215.                  {
  1216.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  1217.                  ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  1218.                  room4used = 1;
  1219.                  room4status = "{FF0800}used";
  1220.                  new str[128];
  1221.                  GetPlayerName(playerid, str, sizeof(str));
  1222.                  format(room4topic, sizeof(room4topic), "%s : %s",str,inputtext);
  1223.                  }
  1224.                  else if(strlen(inputtext) < 5)
  1225.                  {
  1226.                      SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  1227.                  }
  1228.                  else if(strlen(inputtext) >= 128)
  1229.                  {
  1230.                     ShowPlayerDialog(playerid, 592, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  1231.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  1232.                  }
  1233.          }
  1234.  
  1235. }
  1236. if(dialogid == 593) //room2 reply posted
  1237.         {
  1238.         new String[200];
  1239.          if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  1240.                  {
  1241.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  1242.                  ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  1243.                  new str[128];
  1244.                  GetPlayerName(playerid, str, sizeof(str));
  1245.                  format(room4reply, sizeof(room4reply), "%s\n%s : %s",room4reply,str,inputtext);
  1246.                  }
  1247.          else if(strlen(inputtext) < 4)
  1248.                  {
  1249.                      SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  1250.                  }
  1251.          if(strlen(inputtext) >= 15)
  1252.                  {
  1253.                     ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  1254.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  1255.                  }
  1256. }
  1257.  
  1258. //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  1259.  
  1260.  
  1261. // --> ROOM 5 <-- //
  1262. if(dialogid == 600 ) //room 1 new topic
  1263.         {
  1264.             if(!response)
  1265.         {
  1266.                 new String[271];
  1267.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1268.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1269.                 }
  1270.             if(response)
  1271.         {
  1272.             switch(listitem)
  1273.             {
  1274.                 case 0:ShowPlayerDialog(playerid, 602, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  1275.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room5topic);
  1276.             }
  1277.             }
  1278.         }
  1279. if(dialogid == 601) // room1 new reply
  1280.         {
  1281.             if(!response)
  1282.         {
  1283.                 new String[271];
  1284.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1285.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1286.                 }
  1287.             if(response)
  1288.         {
  1289.             switch(listitem)
  1290.             {
  1291.                 case 0:ShowPlayerDialog(playerid, 603, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  1292.                 case 1:
  1293.                 {
  1294.                 SendClientMessage(playerid,0xFFFFFFAA,room5topic);
  1295.                 }
  1296.             }
  1297.         }
  1298.         }
  1299. if(dialogid == 602) //room1 topic posted
  1300.         {
  1301.         new String[200];
  1302.         if (room5used == 1)
  1303.         {
  1304.         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  1305.         ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  1306.         SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  1307.         }
  1308.         else
  1309.         {
  1310.          if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  1311.                  {
  1312.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  1313.                  ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  1314.                  room5used = 1;
  1315.                  room5status = "{FF0800}used";
  1316.                  new str[128];
  1317.                  GetPlayerName(playerid, str, sizeof(str));
  1318.                  format(room5topic, sizeof(room5topic), "%s : %s",str,inputtext);
  1319.                  }
  1320.                  else if(strlen(inputtext) < 5)
  1321.                  {
  1322.                      SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  1323.                  }
  1324.                  else if(strlen(inputtext) >= 128)
  1325.                  {
  1326.                     ShowPlayerDialog(playerid, 602, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  1327.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  1328.                  }
  1329.          }
  1330.  
  1331. }
  1332. if(dialogid == 603) //room2 reply posted
  1333.         {
  1334.         new String[200];
  1335.          if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  1336.                  {
  1337.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  1338.                  ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  1339.                  new str[128];
  1340.                  GetPlayerName(playerid, str, sizeof(str));
  1341.                  format(room5reply, sizeof(room5reply), "%s\n%s : %s",room5reply,str,inputtext);
  1342.                  }
  1343.          else if(strlen(inputtext) < 4)
  1344.                  {
  1345.                      SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  1346.                  }
  1347.          if(strlen(inputtext) >= 15)
  1348.                  {
  1349.                     ShowPlayerDialog(playerid, 603, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  1350.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  1351.                  }
  1352. }
  1353. //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  1354.  
  1355.  
  1356. // --> ROOM 6 <-- //
  1357. if(dialogid == 610 ) //room 1 new topic
  1358.         {
  1359.             if(!response)
  1360.                 {
  1361.                 new String[271];
  1362.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1363.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1364.                 }
  1365.             if(response)
  1366.         {
  1367.             switch(listitem)
  1368.             {
  1369.                 case 0:ShowPlayerDialog(playerid, 612, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  1370.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room6topic);
  1371.             }
  1372.             }
  1373.         }
  1374. if(dialogid == 611) // room1 new reply
  1375.         {
  1376.             if(!response)
  1377.                 {
  1378.                 new String[271];
  1379.                 format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
  1380.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1381.                 }
  1382.             if(response)
  1383.                 {
  1384.             switch(listitem)
  1385.             {
  1386.                 case 0:ShowPlayerDialog(playerid, 613, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  1387.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room6topic);
  1388.             }
  1389.         }
  1390.         }
  1391. if(dialogid == 612) //room1 topic posted
  1392.         {
  1393.         new String[200];
  1394.         if (room6used == 1)
  1395.         {
  1396.         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  1397.         ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  1398.         SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  1399.         }
  1400.         else
  1401.         {
  1402.          if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  1403.                  {
  1404.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  1405.                  ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  1406.                  room6used = 1;
  1407.                  room6status = "{FF0800}used";
  1408.                  new str[128];
  1409.                  GetPlayerName(playerid, str, sizeof(str));
  1410.                  format(room6topic, sizeof(room6topic), "%s : %s",str,inputtext);
  1411.                  }
  1412.                  else if(strlen(inputtext) < 5)
  1413.                  {
  1414.                      SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  1415.                  }
  1416.                  else if(strlen(inputtext) >= 128)
  1417.                  {
  1418.                     ShowPlayerDialog(playerid, 612, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  1419.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  1420.                  }
  1421.          }
  1422.  
  1423. }
  1424. if(dialogid == 613) //room2 reply posted
  1425.         {
  1426.         new String[200];
  1427.          if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  1428.                  {
  1429.                  format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  1430.                  ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  1431.                  new str[128];
  1432.                  GetPlayerName(playerid, str, sizeof(str));
  1433.                  format(room6reply, sizeof(room6reply), "%s\n%s : %s",room6reply,str,inputtext);
  1434.                  }
  1435.          else if(strlen(inputtext) < 4)
  1436.                  {
  1437.                      SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  1438.                  }
  1439.          if(strlen(inputtext) >= 15)
  1440.                  {
  1441.                     ShowPlayerDialog(playerid, 613, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  1442.                      SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  1443.                  }
  1444. }
  1445. return 0;
  1446. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement