Advertisement
Guest User

IGF - In game forum v2 by battlezone

a guest
Jan 18th, 2015
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 50.34 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 bool:room1used;
  18. new room1topic[128] = EOS;
  19. new room1reply[128] = EOS;
  20. new bool:room2used;
  21. new room2topic[128] = EOS;
  22. new room2reply[128] = EOS;
  23. new bool:room3used;
  24. new room3topic[128] = EOS;
  25. new room3reply[128] = EOS;
  26. new bool:room4used;
  27. new room4topic[128] = EOS;
  28. new room4reply[128] = EOS;
  29. new bool:room5used;
  30. new room5topic[128] = EOS;
  31. new room5reply[128] = EOS;
  32. new bool:room6used;
  33. new room6topic[128] = EOS;
  34. new room6reply[128] = EOS;
  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. #define 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.     room1used = false;
  51.     room2used = false;
  52.     room3used = false;
  53.     room4used = false;
  54.     room5used = false;
  55.     room6used = false;
  56.     main1readings = 0;
  57.     main2readings = 0;
  58.     main4readings = 0;
  59.     server1readings =0;
  60.     server2readings =0;
  61.     server3readings =0;
  62.     users1readings =0;
  63.     users2readings =0;
  64.     users3readings =0;
  65.     users4readings =0;
  66.     off1readings =0;
  67.     off2readings =0;
  68.     off3readings =0;
  69.     off4readings =0;
  70.     off5readings =0;
  71.     off6readings =0;
  72.     print("\n--------------------------------------");
  73.     print(" In-Game Forum by battlezone");
  74.     print("--------------------------------------\n");
  75.     return 1;
  76. }
  77.  
  78. public OnFilterScriptExit()
  79. {
  80.     room1status = "";
  81.     room2status = "";
  82.     room3status = "";
  83.     room4status = "";
  84.     room5status = "";
  85.     room6status = "";
  86.     room1used = false;
  87.     room2used = false;
  88.     room3used = false;
  89.     room4used = false;
  90.     room5used = false;
  91.     room6used = false;
  92.     main1readings = 0;
  93.     main2readings = 0;
  94.     main4readings = 0;
  95.     server1readings =0;
  96.     server2readings =0;
  97.     server3readings =0;
  98.     users1readings =0;
  99.     users2readings =0;
  100.     users3readings =0;
  101.     users4readings =0;
  102.     off1readings =0;
  103.     off2readings =0;
  104.     off3readings =0;
  105.     off4readings =0;
  106.     off5readings =0;
  107.     off6readings =0;
  108.     return 1;
  109. }
  110.  
  111. stock AddLogLine(field[ ],file[ ], input[ ] )
  112. {
  113.     new string[128];
  114.     format(string, 128, "%s : %s\r\n", field, input);
  115.     new File:fhandle;
  116.     if(fexist(file))    return  printf("Creating file '%s' because theres no file created with that name.", file);
  117.     fhandle = fopen(file,io_append);
  118.     fwrite(fhandle,string);
  119.     fclose(fhandle);
  120.     return 1;
  121. }
  122. stock AddLogLineName(field[ ],file[ ], input[ ] )
  123. {
  124.     new string[128];
  125.     format(string, sizeof(string), "%s : %s was reported as below\r\n", field, input);
  126.     new File:fhandle;
  127.     if(fexist(file))    return  printf("Creating file '%s' because theres no file created with that name.", file);
  128.     fhandle = fopen(file,io_append);
  129.     fwrite(fhandle,string);
  130.     fclose(fhandle);
  131.     return 1;
  132. }
  133. stock AddLogLineForReport(field[ ], field2[ ],file[ ], input[ ] )
  134. {
  135.     new string[128];
  136.     format(string, 128, "%s reported %s : %s\r\n", field,field2,  input);
  137.     new File:fhandle;
  138.  
  139.     if(fexist(file))    printf("Creating file '%s' because theres no file created with that name.", file);
  140.     fhandle = fopen(file,io_append);
  141.     fwrite(fhandle,string);
  142.     fclose(fhandle);
  143.     return 1;
  144. }
  145.  
  146. CMD:forum(playerid,params [])
  147. {
  148.     new String[200];
  149.     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);
  150.     ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  151.     return 1;
  152. }
  153. CMD:cr1(playerid,params [])
  154. {
  155.     if(IsPlayerAdmin(playerid))
  156.     {
  157.         room1status = "{00C700}Free";
  158.         room1topic = "";
  159.         room1reply = "";
  160.         room1used = false;
  161.         new str[25];
  162.         GetPlayerName(playerid, str, sizeof(str));
  163.         new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 1", str);
  164.         SendClientMessageToAll(0x375FFFFF, string);
  165.     }
  166.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  167.     return 1;
  168. }
  169. CMD:cr2(playerid,params [])
  170. {
  171.     if(IsPlayerAdmin(playerid))
  172.     {
  173.         room2status = "{00C700}Free";
  174.         room2topic = "";
  175.         room2reply = "";
  176.         room2used = false;
  177.         new str[25];
  178.         GetPlayerName(playerid, str, sizeof(str));
  179.         new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 2", str);
  180.         SendClientMessageToAll(0x375FFFFF, string);
  181.     }
  182.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  183.     return 1;
  184. }
  185. CMD:cr3(playerid,params [])
  186. {
  187.     if(IsPlayerAdmin(playerid))
  188.     {
  189.         room3status = "{00C700}Free";
  190.         room3topic = "";
  191.         room3reply = "";
  192.         room3used = false;
  193.         new str[25];
  194.         GetPlayerName(playerid, str, sizeof(str));
  195.         new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 3", str);
  196.         SendClientMessageToAll(0x375FFFFF, string);
  197.     }
  198.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  199.     return 1;
  200. }
  201. CMD:cr4(playerid,params [])
  202. {
  203.     if(IsPlayerAdmin(playerid))
  204.     {
  205.         room4status = "{00C700}Free";
  206.         room4topic = "";
  207.         room4reply = "";
  208.         room4used = false;
  209.         new str[25];
  210.         GetPlayerName(playerid, str, sizeof(str));
  211.         new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 4", str);
  212.         SendClientMessageToAll(0x375FFFFF, string);
  213.     }
  214.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  215.     return 1;
  216. }
  217. CMD:cr5(playerid,params [])
  218. {
  219.     if(IsPlayerAdmin(playerid))
  220.     {
  221.         room5status = "{00C700}Free";
  222.         room5topic = "";
  223.         room5reply = "";
  224.         room5used = false;
  225.         new str[25];
  226.         GetPlayerName(playerid, str, sizeof(str));
  227.         new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 5", str);
  228.         SendClientMessageToAll(0x375FFFFF, string);
  229.     }
  230.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  231.     return 1;
  232. }
  233. CMD:cr6(playerid,params [])
  234. {
  235.     if(IsPlayerAdmin(playerid))
  236.     {
  237.         room6status = "{00C700}Free";
  238.         room6topic = "";
  239.         room6reply = "";
  240.         room6used = false;
  241.         new str[25];
  242.         GetPlayerName(playerid, str, sizeof(str));
  243.         new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 6", str);
  244.         SendClientMessageToAll(0x375FFFFF, string);
  245.     }
  246.     else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  247.     return 1;
  248. }
  249.  
  250. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  251. {
  252.     switch(dialogid)
  253.     {
  254.         case 558:
  255.         {
  256.             new String[200];
  257.             if(!response)
  258.             {
  259.                 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);
  260.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  261.             }
  262.             if(response)
  263.             {
  264.                 switch(listitem)
  265.                 {
  266.                     case 0:
  267.                     {
  268.                         format(String, sizeof(String),"{FF0000}Suggest\n{EB7608}View the recent Suggestion");
  269.                         ShowPlayerDialog(playerid, 202, DIALOG_STYLE_LIST, "In-Game forum - Users - Suggestion",String,"Select","Exit");
  270.                         users1readings ++;
  271.                     }
  272.                     case 1:
  273.                     {
  274.                         format(String, sizeof(String),"{FF0000}Report a bug\n{EB7608}View the recent report");
  275.                         ShowPlayerDialog(playerid, 212, DIALOG_STYLE_LIST, "In-Game forum - Users - Bug Report",String,"Select","Exit");
  276.                         users2readings ++;
  277.                     }
  278.                     case 2:
  279.                     {
  280.                         format(String, sizeof(String),"{FF0000}Report a player/admin\n{EB7608}View the recent report");
  281.                         ShowPlayerDialog(playerid, 222, DIALOG_STYLE_LIST, "In-Game forum - Users - Report a player/admin",String,"Select","Exit");
  282.                         users3readings ++;
  283.                     }
  284.                     case 3:
  285.                     {
  286.                         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");
  287.                         users4readings ++;
  288.                     }
  289.                 }
  290.             }
  291.         }
  292.         case 222:
  293.         {
  294.             new String[200];
  295.             if(!response)
  296.             {
  297.                 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);
  298.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  299.             }
  300.             if(response)
  301.             {
  302.                 switch(listitem)
  303.                 {
  304.                     case 0:
  305.                     {
  306.                         format(String, sizeof(String),"{FF0000}Admin Report\n{FF0000}Player Report");
  307.                         ShowPlayerDialog(playerid, 226, DIALOG_STYLE_LIST, "In-Game forum - Users - Report Admin/Player",String,"Select","Exit");
  308.                     }
  309.                     case 1:
  310.                     {
  311.                         new string[128];
  312.                         new File:ftw2 = fopen("players-admins-reports.txt", io_read); // Open the file
  313.                         while(fread(ftw2, string)) //reads the file line-by-line
  314.                         {
  315.                             ShowPlayerDialog(playerid, 280, DIALOG_STYLE_MSGBOX, "Recent Report",string,"Close","");
  316.                         }
  317.                         fclose(ftw2);
  318.                     }
  319.                 }
  320.             }
  321.         }
  322.         case 226:
  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: ShowPlayerDialog(playerid, 230, DIALOG_STYLE_INPUT, "Admin Report (128 character max)", "Type the admin's name here.", "Submit", "Cancel");
  335.                     case 1: ShowPlayerDialog(playerid, 229, DIALOG_STYLE_INPUT, "Player Report (128 character max)", "Type the player's name here.", "Submit", "Cancel");
  336.                 }
  337.             }
  338.         }
  339.         case 240: //room 1 new topic
  340.         {
  341.             if(response)
  342.             {
  343.                 new str[25];
  344.                 GetPlayerName(playerid, str, sizeof(str));
  345.                 new strdate[30], year,month,day;    getdate(year, month, day);
  346.                 format(strdate, sizeof(strdate), "[%d/%d/%d] %s",day,month,year, str);
  347.                 if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)  return  AddLogLine(strdate , "questions.txt", inputtext );
  348.                 else if(strlen(inputtext) < 10) return  SendClientMessage(playerid,0xFAFFBFAA,"Your question was too short, retype it.");
  349.                 else if(strlen(inputtext) >= 128)   return  ShowPlayerDialog(playerid, 240, DIALOG_STYLE_INPUT, "Need Help? (128 character max)", "Your question: ( DO NOT EXCEED THE MAX CHARACTERS LIMIT )", "Submit", "Cancel");
  350.             }
  351.         }
  352.         case 229: //room 1 new topic
  353.         {
  354.             if(response)
  355.             {
  356.                 new strdate[20], year,month,day;    getdate(year, month, day);
  357.                 format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
  358.                 if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  359.                 {
  360.                     AddLogLineName(strdate , "players-admins-reports.txt", inputtext );
  361.                     format(str_reported, sizeof(str_reported), "%s",inputtext);
  362.                     ShowPlayerDialog(playerid, 228, DIALOG_STYLE_INPUT, "Report (128 character max)", "Now type your report here.", "Submit", "Cancel");
  363.                 }
  364.                 else if(strlen(inputtext) < 2)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  365.                 else if(strlen(inputtext) >= 128)   return  ShowPlayerDialog(playerid, 229, DIALOG_STYLE_INPUT, "Player's name (128 character max)", "Type players's name here.", "Submit", "Cancel");
  366.             }
  367.         }
  368.         case 228: //room 1 new topic
  369.         {
  370.             if(response)
  371.             {
  372.                 new str[128];
  373.                 GetPlayerName(playerid, str, sizeof(str));
  374.                 if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  375.                 {
  376.                     AddLogLineForReport(str , str_reported, "players-admins-reports.txt", inputtext );
  377.                     SendClientMessage(playerid,0xFFFFBFAA,"Player reported successfully.");
  378.                 }
  379.                 else if(strlen(inputtext) < 2)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  380.                 else if(strlen(inputtext) >= 128)   return  ShowPlayerDialog(playerid, 228, DIALOG_STYLE_INPUT, "Player report (128 character max)", "Type your report here.", "Submit", "Cancel");
  381.             }
  382.         }
  383.         case 230: //room 1 new topic
  384.         {
  385.             if(response)
  386.             {
  387.                 new strdate[20], year,month,day;    getdate(year, month, day);
  388.                 format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
  389.                 if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  390.                 {
  391.                     AddLogLineName(strdate , "players-admins-reports.txt", inputtext );
  392.                     format(str_reported, sizeof(str_reported), "%s",inputtext);
  393.                     ShowPlayerDialog(playerid, 231, DIALOG_STYLE_INPUT, "Report (128 character max)", "Now type your report here.", "Submit", "Cancel");
  394.                 }
  395.                 else if(strlen(inputtext) < 2)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  396.                 else if(strlen(inputtext) >= 128)   return  ShowPlayerDialog(playerid, 230, DIALOG_STYLE_INPUT, "Admin's name (128 character max)", "Type admin's name here.", "Submit", "Cancel");
  397.             }
  398.         }
  399.         case 231: //room 1 new topic
  400.         {
  401.             if(response)
  402.             {
  403.                 new str[128];
  404.                 GetPlayerName(playerid, str, sizeof(str));
  405.                 if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
  406.                 {
  407.                     AddLogLineForReport(str , str_reported, "players-admins-reports.txt", inputtext );
  408.                     SendClientMessage(playerid,0xFAFFBFAA,"Admin reported successfully.");
  409.                 }
  410.                 else if(strlen(inputtext) < 2)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  411.                 else if(strlen(inputtext) >= 128)   return  ShowPlayerDialog(playerid, 231, DIALOG_STYLE_INPUT, "Admin report (128 character max)", "Type your report here.", "Submit", "Cancel");
  412.             }
  413.         }
  414.         case 212:
  415.         {
  416.             if(!response)
  417.             {
  418.                 new String[200];
  419.                 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);
  420.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  421.             }
  422.             if(response)
  423.             {
  424.                 switch(listitem)
  425.                 {
  426.                     case 0: ShowPlayerDialog(playerid, 210, DIALOG_STYLE_INPUT, "New Bug Report (128 character max)", "Type your report here.", "Submit", "Cancel");
  427.                     case 1:
  428.                     {
  429.                         new str[128];
  430.                         GetPlayerName(playerid, str, sizeof(str));
  431.                         new File:ftw = fopen("bug-reports.txt", io_read); // Open the file
  432.                         while(fread(ftw, str)) //reads the file line-by-line
  433.                         {
  434.                             ShowPlayerDialog(playerid, 211, DIALOG_STYLE_MSGBOX, "Recent Report",str,"Close","");
  435.                         }
  436.                         fclose(ftw);
  437.                     }
  438.                 }
  439.             }
  440.         }
  441.         case 202:
  442.         {
  443.             if(!response)
  444.             {
  445.                 new String[200];
  446.                 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);
  447.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  448.             }
  449.             if(response)
  450.             {
  451.                 switch(listitem)
  452.                 {
  453.                     case 0: ShowPlayerDialog(playerid, 200, DIALOG_STYLE_INPUT, "New Suggestion (128 character max)", "Type your suggestion here.", "Submit", "Cancel");
  454.                     case 1:
  455.                     {
  456.                         new string[256];
  457.                         new File:ftw = fopen("suggestions.txt", io_read); // Open the file
  458.                         while(fread(ftw, string)) //reads the file line-by-line
  459.                         {
  460.                             ShowPlayerDialog(playerid, 201, DIALOG_STYLE_MSGBOX, "Recent Suggestion",string,"Close","");
  461.                         }
  462.                         fclose(ftw);
  463.                     }
  464.                 }
  465.             }
  466.         }
  467.         case 557:
  468.         {
  469.             if(!response)
  470.             {
  471.                 new String[200];
  472.                 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);
  473.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  474.             }
  475.             if(response)
  476.             {
  477.                 switch(listitem)
  478.                 {
  479.                     case 0:
  480.                     {
  481.                         new String[100];
  482.                         if(IsPlayerAdmin(playerid))
  483.                         {
  484.                             format(String, sizeof(String),"{FF0000}News {0276FF}\nEdit News [ONLY ADMINS]");
  485.                             ShowPlayerDialog(playerid, 290, DIALOG_STYLE_LIST, "In-Game forum : Server - News",String,"Select","Back");
  486.                         }
  487.                         format(String, sizeof(String),"{FF0000}News");
  488.                         ShowPlayerDialog(playerid, 290, DIALOG_STYLE_LIST, "In-Game forum : Server - News",String,"Select","Back");
  489.                         server1readings ++;
  490.                     }
  491.                     case 1:
  492.                     {
  493.                         server2readings ++;
  494.                         ShowPlayerDialog(playerid, 250, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply For The Community Tag", "Type your full name - age - region below.", "Submit", "Cancel");
  495.                     }
  496.                     case 2:
  497.                     {
  498.                         ShowPlayerDialog(playerid, 250, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply To be Admin", "Type your full name - age - region below.", "Submit", "Cancel");
  499.                         server3readings ++;
  500.                     }
  501.                 }
  502.             }
  503.         }
  504.         case 290:
  505.         {
  506.             if(response)
  507.             {
  508.                 switch(listitem)
  509.                 {
  510.                     case 0: ShowPlayerDialog(playerid, 291, DIALOG_STYLE_MSGBOX, "In-Game Forum: Server - News & Info", str_news, "ok" , "cancel");
  511.                     case 1: ShowPlayerDialog(playerid, 292, DIALOG_STYLE_INPUT, "Server Updates", "Type The Updates Below.", "Submit", "Cancel");
  512.                 }
  513.             }
  514.         }
  515.         case 250:
  516.         {
  517.             if(response)
  518.             {
  519.                 new strdate[30], year,month,day;    getdate(year, month, day);
  520.                 format(strdate, sizeof(strdate), "[%d/%d/%d]",day,month,year);
  521.                 AddLogLine(strdate , "admin-requests.txt", inputtext );
  522.                 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");
  523.             }
  524.         }
  525.         case 251:
  526.         {
  527.             if(response)
  528.             {
  529.                 new strr[25];
  530.                 GetPlayerName(playerid, strr, sizeof(strr));
  531.                 AddLogLine(strr , "admin-requests.txt", inputtext );
  532.                 ShowPlayerDialog(playerid, 252, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply", "Why do you want the tag? Why should we accept you?", "Submit", "Cancel");
  533.             }
  534.         }
  535.         case 252:
  536.         {
  537.             if(response)
  538.             {
  539.                 new strr[128];
  540.                 GetPlayerName(playerid, strr, sizeof(strr));
  541.                 AddLogLine(strr , "admin-requests.txt", inputtext );
  542.                 ShowPlayerDialog(playerid, 253, DIALOG_STYLE_MSGBOX, "In-Game Forum : Server - Apply", "You have applied successfully", "ok", "exit");
  543.             }
  544.         }
  545.         case 292:   if(response)    return  format(str_news , sizeof(str_news),inputtext);
  546.         // --> Mains
  547.         case 556:
  548.         {
  549.             if(response)
  550.             {
  551.                 new String[271];
  552.                 switch(listitem)
  553.                 {
  554.                     case 0:
  555.                     {
  556.                         main1readings ++;
  557.                         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);
  558.                         ShowPlayerDialog(playerid, 557, DIALOG_STYLE_LIST, "In-Game forum : Server",String,"Select","Back");
  559.                     }
  560.                     case 2:
  561.                     {
  562.                         main2readings ++;
  563.                         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);
  564.                         ShowPlayerDialog(playerid, 558, DIALOG_STYLE_LIST, "In-Game forum : Users",String,"Select","Back");
  565.                     }
  566.                     case 4:
  567.                     {
  568.                         main4readings ++;
  569.                         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);
  570.                         ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  571.                     }
  572.                 }
  573.             }
  574.         }
  575.         // --> Main 2 (users)
  576.         case 200: //room 1 new topic
  577.         {
  578.             if(response)
  579.             {
  580.                 new str[128];
  581.                 GetPlayerName(playerid, str, sizeof(str));
  582.                 if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128) return  AddLogLine(str , "suggestions.txt", inputtext );
  583.                 else if(strlen(inputtext) < 10) return  SendClientMessage(playerid,0xFAFFBFAA,"Your suggestion was too short, retype it.");
  584.                 else if(strlen(inputtext) >= 128)   return  ShowPlayerDialog(playerid, 640, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your suggestion.", "Submit", "Cancel");
  585.             }
  586.         }
  587.         case 210: //room 1 new topic
  588.         {
  589.             if(response)
  590.             {
  591.                 new str[128];
  592.                 GetPlayerName(playerid, str, sizeof(str));
  593.                 if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128) return  AddLogLine(str , "bug-reports.txt", inputtext );
  594.                 else if(strlen(inputtext) < 10) return  SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
  595.                 else if(strlen(inputtext) >= 128)   return  ShowPlayerDialog(playerid, 640, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your report.", "Submit", "Cancel");
  596.             }
  597.         }
  598.         // --> Main 3 (off topic)
  599.         case 559:
  600.         {
  601.             new String[200];
  602.             if(!response)
  603.             {
  604.                 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);
  605.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  606.             }
  607.             if(response)
  608.             {
  609.                 switch(listitem)
  610.                 {
  611.                     case 0:
  612.                     {
  613.                         off1readings ++;
  614.                         if(room1used == false) // room1 not used
  615.                         {
  616.                             format(String, sizeof(String),"{84C700}+New Topic+");
  617.                             ShowPlayerDialog(playerid, 560, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  618.                         }
  619.                         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  620.                         ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  621.                     }
  622.                     case 1:
  623.                     {
  624.                         off2readings ++;
  625.                         if(room2used == false) // room1 not used
  626.                         {
  627.                             format(String, sizeof(String),"{84C700}+New Topic+");
  628.                             ShowPlayerDialog(playerid, 570, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  629.                         }
  630.                         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  631.                         ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  632.                     }
  633.                     case 2:
  634.                     {
  635.                         off3readings ++;
  636.                         if(room3used == false) // room1 not used
  637.                         {
  638.                             format(String, sizeof(String),"{84C700}+New Topic+");
  639.                             ShowPlayerDialog(playerid, 580, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  640.                         }
  641.                         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  642.                         ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  643.                     }
  644.                     case 3:
  645.                     {
  646.                         off4readings ++;
  647.                         if(room4used == false) // room1 not used
  648.                         {
  649.                             format(String, sizeof(String),"{84C700}+New Topic+");
  650.                             ShowPlayerDialog(playerid, 590, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  651.                         }
  652.                         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  653.                         ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  654.                     }
  655.                     case 4:
  656.                     {
  657.                         off5readings ++;
  658.                         if(room5used == false) // room1 not used
  659.                         {
  660.                             format(String, sizeof(String),"{84C700}+New Topic+");
  661.                             ShowPlayerDialog(playerid, 600, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  662.                         }
  663.                         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  664.                         ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  665.                     }
  666.                     case 5:
  667.                     {
  668.                         off6readings ++;
  669.                         if(room6used == false) // room1 not used
  670.                         {
  671.                             format(String, sizeof(String),"{84C700}+New Topic+");
  672.                             ShowPlayerDialog(playerid, 610, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  673.                         }
  674.                         format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  675.                         ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  676.                     }
  677.                 }
  678.             }
  679.         }
  680.     // --> ROOM 1 <-- //
  681.         case 560: //room 1 new topic
  682.         {
  683.             if(response)
  684.             {
  685.                 switch(listitem)
  686.                 {
  687.                     case 0:ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  688.                     case 1:SendClientMessage(playerid,0xFFFFFFAA,room1topic);
  689.                 }
  690.             }
  691.             if(!response)
  692.             {
  693.                 new String[271];
  694.                 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);
  695.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  696.             }
  697.         }
  698.         case 561: // room1 new reply
  699.         {
  700.             if(!response)
  701.             {
  702.                 new String[271];
  703.                 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);
  704.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  705.             }
  706.             if(response)
  707.             {
  708.                 switch(listitem)
  709.                 {
  710.                     case 0:ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  711.                     case 1:SendClientMessage(playerid,0xFFFFFFAA,room1topic);
  712.  
  713.                 }
  714.             }
  715.         }
  716.         case 562: //room1 topic posted
  717.         {
  718.             new String[200];
  719.             if (room1used == true)
  720.             {
  721.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  722.                 ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  723.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  724.             }
  725.             else
  726.             {
  727.                 if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  728.                 {
  729.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  730.                     ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  731.                     room1used = true;
  732.                     room1status = "{FF0800}used";
  733.                     new str[128];
  734.                     GetPlayerName(playerid, str, sizeof(str));
  735.                     format(room1topic, sizeof(room1topic), "%s : %s",str,inputtext);
  736.                 }
  737.                 else if(strlen(inputtext) < 5)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  738.                 else if(strlen(inputtext) >= 128)
  739.                 {
  740.                     ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  741.                     SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  742.                 }
  743.             }
  744.         }
  745.         case 563: //room1 reply posted
  746.         {
  747.             if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  748.             {
  749.                 new String[200];
  750.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  751.                 ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  752.                 new str[128];
  753.                 GetPlayerName(playerid, str, sizeof(str));
  754.                 format(room1reply, sizeof(room1reply), "%s\n%s : %s",room1reply,str,inputtext);
  755.             }
  756.             else if(strlen(inputtext) < 4)  return  SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  757.             if(strlen(inputtext) >= 15)
  758.             {
  759.                 ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  760.                 SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  761.             }
  762.         }
  763.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  764.         // --> ROOM 2 <-- //
  765.         case 570: //room 1 new topic
  766.         {
  767.             if(!response)
  768.             {
  769.                 new String[271];
  770.                 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);
  771.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  772.             }
  773.             if(response)
  774.             {
  775.                 switch(listitem)
  776.                 {
  777.                     case 0: ShowPlayerDialog(playerid, 572, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  778.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room2topic);
  779.                 }
  780.             }
  781.         }
  782.         case 571: // room1 new reply
  783.         {
  784.             if(!response)
  785.             {
  786.                 new String[271];
  787.                 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);
  788.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  789.             }
  790.             if(response)
  791.             {
  792.                 switch(listitem)
  793.                 {
  794.                     case 0: ShowPlayerDialog(playerid, 573, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  795.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room2topic);
  796.                 }
  797.             }
  798.         }
  799.         case 572: //room1 topic posted
  800.         {
  801.             new String[200];
  802.             if (room2used == true)
  803.             {
  804.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  805.                 ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  806.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  807.             }
  808.             else
  809.             {
  810.                 if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  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.                     room2used = true;
  815.                     room2status = "{FF0800}used";
  816.                     new str[128];
  817.                     GetPlayerName(playerid, str, sizeof(str));
  818.                     format(room2topic, sizeof(room2topic), "%s : %s",str,inputtext);
  819.                 }
  820.                 else if(strlen(inputtext) < 5)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  821.                 else if(strlen(inputtext) >= 128)
  822.                 {
  823.                     ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  824.                     SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  825.                 }
  826.             }
  827.         }
  828.         case 573: //room2 reply posted
  829.         {
  830.             if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  831.             {
  832.                 new String[200];
  833.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  834.                 ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  835.                 new str[128];
  836.                 GetPlayerName(playerid, str, sizeof(str));
  837.                 format(room2reply, sizeof(room2reply), "%s\n%s : %s",room2reply,str,inputtext);
  838.             }
  839.             else if(strlen(inputtext) < 4)  return  SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  840.             if(strlen(inputtext) >= 15)
  841.             {
  842.                 ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  843.                 SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  844.             }
  845.         }
  846.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  847.         // --> ROOM 3 <-- //
  848.         case 580: //room 1 new topic
  849.         {
  850.             if(!response)
  851.             {
  852.                 new String[271];
  853.                 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);
  854.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  855.             }
  856.             if(response)
  857.             {
  858.                 switch(listitem)
  859.                 {
  860.                     case 0: ShowPlayerDialog(playerid, 582, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  861.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room3topic);
  862.                 }
  863.             }
  864.         }
  865.         case 581: // room1 new reply
  866.         {
  867.             if(!response)
  868.             {
  869.                 new String[271];
  870.                 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);
  871.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  872.             }
  873.             if(response)
  874.             {
  875.                 switch(listitem)
  876.                 {
  877.                     case 0: ShowPlayerDialog(playerid, 583, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  878.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room3topic);
  879.                 }
  880.             }
  881.         }
  882.         case 582: //room1 topic posted
  883.         {
  884.             new String[200];
  885.             if (room3used == true)
  886.             {
  887.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  888.                 ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  889.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  890.             }
  891.             else
  892.             {
  893.                 if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  894.                 {
  895.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  896.                     ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  897.                     room3used = true;
  898.                     room3status = "{FF0800}used";
  899.                     new str[128];
  900.                     GetPlayerName(playerid, str, sizeof(str));
  901.                     format(room3topic, sizeof(room3topic), "%s : %s",str,inputtext);
  902.                 }
  903.                 else if(strlen(inputtext) < 5)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  904.                 else if(strlen(inputtext) >= 128)
  905.                 {
  906.                     ShowPlayerDialog(playerid, 582, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  907.                     SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  908.                 }
  909.             }
  910.         }
  911.         case 583: //room2 reply posted
  912.         {
  913.             if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  914.             {
  915.                 new String[200];
  916.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  917.                 ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  918.                 new str[128];
  919.                 GetPlayerName(playerid, str, sizeof(str));
  920.                 format(room3reply, sizeof(room3reply), "%s\n%s : %s",room3reply,str,inputtext);
  921.             }
  922.             else if(strlen(inputtext) < 4)  return  SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  923.             if(strlen(inputtext) >= 15)
  924.             {
  925.                 ShowPlayerDialog(playerid, 583, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  926.                 SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  927.             }
  928.         }
  929.     //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  930.     // --> ROOM 4 <-- //
  931.         case 590: //room 1 new topic
  932.         {
  933.             if(!response)
  934.             {
  935.                 new String[271];
  936.                 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);
  937.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  938.             }
  939.             if(response)
  940.             {
  941.                 switch(listitem)
  942.                 {
  943.                     case 0: ShowPlayerDialog(playerid, 592, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  944.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room4topic);
  945.                 }
  946.             }
  947.         }
  948.         case 591: // room1 new reply
  949.         {
  950.             if(!response)
  951.             {
  952.                 new String[271];
  953.                 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);
  954.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  955.             }
  956.             if(response)
  957.             {
  958.                 switch(listitem)
  959.                 {
  960.                     case 0: ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  961.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room4topic);
  962.                 }
  963.             }
  964.         }
  965.         case 592: //room1 topic posted
  966.         {
  967.             new String[200];
  968.             if (room4used == true)
  969.             {
  970.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  971.                 ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  972.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  973.             }
  974.             else
  975.             {
  976.                 if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  977.                 {
  978.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  979.                     ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  980.                     room4used = true;
  981.                     room4status = "{FF0800}used";
  982.                     new str[128];
  983.                     GetPlayerName(playerid, str, sizeof(str));
  984.                     format(room4topic, sizeof(room4topic), "%s : %s",str,inputtext);
  985.                 }
  986.                 else if(strlen(inputtext) < 5)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  987.                 else if(strlen(inputtext) >= 128)
  988.                 {
  989.                     ShowPlayerDialog(playerid, 592, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  990.                     SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  991.                 }
  992.             }
  993.         }
  994.         case 593: //room2 reply posted
  995.         {
  996.             if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  997.             {
  998.                 new String[200];
  999.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  1000.                 ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  1001.                 new str[128];
  1002.                 GetPlayerName(playerid, str, sizeof(str));
  1003.                 format(room4reply, sizeof(room4reply), "%s\n%s : %s",room4reply,str,inputtext);
  1004.             }
  1005.             else if(strlen(inputtext) < 4)  return  SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  1006.             if(strlen(inputtext) >= 15)
  1007.             {
  1008.                 ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  1009.                 SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  1010.             }
  1011.         }
  1012.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  1013.         // --> ROOM 5 <-- //
  1014.         case 600: //room 1 new topic
  1015.         {
  1016.             if(!response)
  1017.             {
  1018.                 new String[271];
  1019.                 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);
  1020.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1021.             }
  1022.             if(response)
  1023.             {
  1024.                 switch(listitem)
  1025.                 {
  1026.                     case 0: ShowPlayerDialog(playerid, 602, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  1027.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room5topic);
  1028.                 }
  1029.             }
  1030.         }
  1031.         case 601: // room1 new reply
  1032.         {
  1033.             if(!response)
  1034.             {
  1035.                 new String[271];
  1036.                 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);
  1037.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1038.             }
  1039.             if(response)
  1040.             {
  1041.                 switch(listitem)
  1042.                 {
  1043.                     case 0: ShowPlayerDialog(playerid, 603, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  1044.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room5topic);
  1045.                 }
  1046.             }
  1047.         }
  1048.         case 602: //room1 topic posted
  1049.         {
  1050.             new String[200];
  1051.             if (room5used == true)
  1052.             {
  1053.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  1054.                 ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  1055.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  1056.             }
  1057.             else
  1058.             {
  1059.                 if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  1060.                 {
  1061.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  1062.                     ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  1063.                     room5used = true;
  1064.                     room5status = "{FF0800}used";
  1065.                     new str[128];
  1066.                     GetPlayerName(playerid, str, sizeof(str));
  1067.                     format(room5topic, sizeof(room5topic), "%s : %s",str,inputtext);
  1068.                 }
  1069.                 else if(strlen(inputtext) < 5)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  1070.                 else if(strlen(inputtext) >= 128)
  1071.                 {
  1072.                     ShowPlayerDialog(playerid, 602, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  1073.                     SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  1074.                 }
  1075.              }
  1076.         }
  1077.         case 603: //room2 reply posted
  1078.         {
  1079.             if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  1080.             {
  1081.                 new String[200];
  1082.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  1083.                 ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  1084.                 new str[128];
  1085.                 GetPlayerName(playerid, str, sizeof(str));
  1086.                 format(room5reply, sizeof(room5reply), "%s\n%s : %s",room5reply,str,inputtext);
  1087.             }
  1088.             else if(strlen(inputtext) < 4)  return  SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  1089.             if(strlen(inputtext) >= 15)
  1090.             {
  1091.                 ShowPlayerDialog(playerid, 603, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  1092.                 SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  1093.             }
  1094.         }
  1095.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  1096.         // --> ROOM 6 <-- //
  1097.         case 610: //room 1 new topic
  1098.         {
  1099.             if(!response)
  1100.             {
  1101.                 new String[271];
  1102.                 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);
  1103.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1104.             }
  1105.             if(response)
  1106.             {
  1107.                 switch(listitem)
  1108.                 {
  1109.                     case 0: ShowPlayerDialog(playerid, 612, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  1110.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room6topic);
  1111.                 }
  1112.             }
  1113.         }
  1114.         case 611: // room1 new reply
  1115.         {
  1116.             if(!response)
  1117.             {
  1118.                 new String[271];
  1119.                 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);
  1120.                 ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
  1121.             }
  1122.             if(response)
  1123.             {
  1124.                 switch(listitem)
  1125.                 {
  1126.                     case 0: ShowPlayerDialog(playerid, 613, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  1127.                     case 1: SendClientMessage(playerid,0xFFFFFFAA,room6topic);
  1128.                 }
  1129.             }
  1130.         }
  1131.         case 612: //room1 topic posted
  1132.         {
  1133.             new String[200];
  1134.             if (room6used == true)
  1135.             {
  1136.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  1137.                 ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  1138.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  1139.             }
  1140.             else
  1141.             {
  1142.                 if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
  1143.                 {
  1144.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  1145.                     ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  1146.                     room6used = true;
  1147.                     room6status = "{FF0800}used";
  1148.                     new str[128];
  1149.                     GetPlayerName(playerid, str, sizeof(str));
  1150.                     format(room6topic, sizeof(room6topic), "%s : %s",str,inputtext);
  1151.                 }
  1152.                 else if(strlen(inputtext) < 5)  return  SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
  1153.                 else if(strlen(inputtext) >= 128)
  1154.                 {
  1155.                     ShowPlayerDialog(playerid, 612, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
  1156.                     SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
  1157.                 }
  1158.             }
  1159.         }
  1160.         case 613: //room2 reply posted
  1161.         {
  1162.             if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
  1163.             {
  1164.                 new String[200];
  1165.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  1166.                 ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  1167.                 new str[128];
  1168.                 GetPlayerName(playerid, str, sizeof(str));
  1169.                 format(room6reply, sizeof(room6reply), "%s\n%s : %s",room6reply,str,inputtext);
  1170.             }
  1171.             else if(strlen(inputtext) < 4)  return  SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
  1172.             if(strlen(inputtext) >= 15)
  1173.             {
  1174.                 ShowPlayerDialog(playerid, 613, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
  1175.                 SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
  1176.             }
  1177.         }
  1178.     }
  1179.     return 0;
  1180. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement