Battlezone_samp

IG FORUM v3 by Battlezone

Aug 24th, 2015
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 44.57 KB | None | 0 0
  1. #include <a_samp>
  2. #include <I-ZCMD>
  3.  
  4. new str_news[128];
  5. new str_reported[20];
  6. new bool:room1used, room1topic[128] = EOS, room1reply[128] = EOS;
  7. new bool:room2used, room2topic[128] = EOS, room2reply[128] = EOS;
  8. new bool:room3used, room3topic[128] = EOS, room3reply[128] = EOS;
  9. new bool:room4used, room4topic[128] = EOS, room4reply[128] = EOS;
  10. new bool:room5used, room5topic[128] = EOS, room5reply[128] = EOS;
  11. new bool:room6used, room6topic[128] = EOS, room6reply[128] = EOS;
  12. new users1readings, users2readings, users3readings, users4readings;
  13. new main1readings, main2readings, main4readings;
  14. new server1readings, server2readings, server3readings;
  15. new off1readings, off2readings, off3readings, off4readings, off5readings, off6readings;
  16.  
  17.  
  18. public OnFilterScriptInit()
  19. {
  20.     room1used = false; room2used = false; room3used = false; room4used = false; room5used = false; room6used = false;
  21.     main1readings = 0; main2readings = 0; main4readings = 0;
  22.     server1readings =0; server2readings =0; server3readings =0;
  23.     users1readings =0; users2readings =0; users3readings =0; users4readings =0;
  24.     off1readings =0; off2readings =0; off3readings =0; off4readings =0; off5readings =0; off6readings =0;
  25.     print("\n--------------------------------------");
  26.     print(" In-Game Forum by battlezone");
  27.     print("--------------------------------------\n");
  28.     return 1;
  29. }
  30.  
  31. public OnFilterScriptExit()
  32. {
  33.     room1used = false;
  34.     room2used = false;
  35.     room3used = false;
  36.     room4used = false;
  37.     room5used = false;
  38.     room6used = false;
  39.     main1readings = 0;
  40.     main2readings = 0;
  41.     main4readings = 0;
  42.     server1readings =0;
  43.     server2readings =0;
  44.     server3readings =0;
  45.     users1readings =0;
  46.     users2readings =0;
  47.     users3readings =0;
  48.     users4readings =0;
  49.     off1readings =0;
  50.     off2readings =0;
  51.     off3readings =0;
  52.     off4readings =0;
  53.     off5readings =0;
  54.     off6readings =0;
  55.     return 1;
  56. }
  57.  
  58. stock FormatString()
  59. {
  60.     new String[270];
  61.     String = "Room\tStatus\n{FF0000}Room 1\t";
  62.     if(room1used) strcat(String, "{FF0800}used", sizeof String);
  63.     else strcat(String, "{00C700}Free", sizeof String);
  64.     strcat(String, "{FF0000}\n{FF0000}Room 2\t", sizeof String);
  65.     if(room2used) strcat(String, "{FF0800}used", sizeof String);
  66.     else strcat(String, "{00C700}Free", sizeof String);
  67.     strcat(String, "{FF0000}\n{FF0000}Room 3\t", sizeof String);
  68.     if(room3used) strcat(String, "{FF0800}used", sizeof String);
  69.     else strcat(String, "{00C700}Free", sizeof String);
  70.     strcat(String, "{FF0000}\n{FF0000}Room 4\t", sizeof String);
  71.     if(room4used) strcat(String, "{FF0800}used", sizeof String);
  72.     else strcat(String, "{00C700}Free", sizeof String);
  73.     strcat(String, "{FF0000}\n{FF0000}Room 5\t", sizeof String);
  74.     if(room5used) strcat(String, "{FF0800}used", sizeof String);
  75.     else strcat(String, "{00C700}Free", sizeof String);
  76.     strcat(String, "{FF0000}\n{FF0000}Room 6\t", sizeof String);
  77.     if(room6used) strcat(String, "{FF0800}used]", sizeof String);
  78.     else strcat(String, "{00C700}Free", sizeof String);
  79.     return String;
  80. }
  81. stock AddLogLine(field[ ],file[ ], input[ ] )
  82. {
  83.     new string[128];
  84.     format(string, 128, "%s: %s\r\n", field, input);
  85.     new File:fhandle;
  86.     if(fexist(file)) return  printf("Creating file '%s' because theres no file created with that name.", file);
  87.     fhandle = fopen(file,io_append);
  88.     fwrite(fhandle,string);
  89.     fclose(fhandle);
  90.     return 1;
  91. }
  92. stock AddLogLineName(field[ ],file[ ], input[ ] )
  93. {
  94.     new string[128];
  95.     format(string, sizeof(string), "%s : %s was reported as below\r\n", field, input);
  96.     new File:fhandle;
  97.     if(fexist(file))    return  printf("Creating file '%s' because theres no file created with that name.", file);
  98.     fhandle = fopen(file,io_append);
  99.     fwrite(fhandle,string);
  100.     fclose(fhandle);
  101.     return 1;
  102. }
  103. stock AddLogLineForReport(field[ ], field2[ ],file[ ], input[ ] )
  104. {
  105.     new string[128];
  106.     format(string, 128, "%s reported %s : %s\r\n", field,field2,  input);
  107.     new File:fhandle;
  108.     if(fexist(file))    printf("Creating file '%s' because theres no file created with that name.", file);
  109.     fhandle = fopen(file,io_append);
  110.     fwrite(fhandle,string);
  111.     fclose(fhandle);
  112.     return 1;
  113. }
  114.  
  115. CMD:forum(playerid,params [])
  116. {
  117.     new String[190];
  118.     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);
  119.     ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  120.     return 1;
  121. }
  122. CMD:cr1(playerid,params [])
  123. {
  124.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  125.     room1topic = "";
  126.     room1reply = "";
  127.     room1used = false;
  128.     new string[80];
  129.     GetPlayerName(playerid, string, sizeof(string));
  130.     format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 1", string);
  131.     SendClientMessageToAll(0x375FFFFF, string);
  132.     return 1;
  133. }
  134. CMD:cr2(playerid,params [])
  135. {
  136.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  137.     room2topic = "";
  138.     room2reply = "";
  139.     room2used = false;
  140.     new string[80];
  141.     GetPlayerName(playerid, string, sizeof(string));
  142.     format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 2", string);
  143.     SendClientMessageToAll(0x375FFFFF, string);
  144.     return 1;
  145. }
  146. CMD:cr3(playerid,params [])
  147. {
  148.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  149.     room3topic = "";
  150.     room3reply = "";
  151.     room3used = false;
  152.     new string[80];
  153.     GetPlayerName(playerid, string, sizeof(string));
  154.     format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 3", string);
  155.     SendClientMessageToAll(0x375FFFFF, string);
  156.     return 1;
  157. }
  158. CMD:cr4(playerid,params [])
  159. {
  160.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  161.     room4topic = "";
  162.     room4reply = "";
  163.     room4used = false;
  164.     new string[80];
  165.     GetPlayerName(playerid, string, sizeof(string));
  166.     format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 4", string);
  167.     SendClientMessageToAll(0x375FFFFF, string);
  168.     return 1;
  169. }
  170. CMD:cr5(playerid,params [])
  171. {
  172.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  173.     room5topic = "";
  174.     room5reply = "";
  175.     room5used = false;
  176.     new string[80];
  177.     GetPlayerName(playerid, string, sizeof(string));
  178.     format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 5", string);
  179.     SendClientMessageToAll(0x375FFFFF, string);
  180.     return 1;
  181. }
  182. CMD:cr6(playerid,params [])
  183. {
  184.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
  185.     room6topic = "";
  186.     room6reply = "";
  187.     room6used = false;
  188.     new string[80];
  189.     GetPlayerName(playerid, string, sizeof(string));
  190.     format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 6", string);
  191.     SendClientMessageToAll(0x375FFFFF, string);
  192.     return 1;
  193. }
  194.  
  195. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  196. {
  197.     switch(dialogid)
  198.     {
  199.         case 558:
  200.         {
  201.             if(!response)
  202.             {
  203.                 new String[190];
  204.                 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);
  205.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  206.                 return 1;
  207.             }
  208.             switch(listitem)
  209.             {
  210.                 case 0:
  211.                 {
  212.                     new String[55];
  213.                     format(String, sizeof(String),"{FF0000}Suggest\n{EB7608}View the recent Suggestion");
  214.                     ShowPlayerDialog(playerid, 202, DIALOG_STYLE_LIST, "In-Game forum - Users - Suggestion",String,"Select","Exit");
  215.                     users1readings ++;
  216.                     return 1;
  217.                 }
  218.                 case 1:
  219.                 {
  220.                     new String[55];
  221.                     format(String, sizeof(String),"{FF0000}Report a bug\n{EB7608}View the recent report");
  222.                     ShowPlayerDialog(playerid, 212, DIALOG_STYLE_LIST, "In-Game forum - Users - Bug Report",String,"Select","Exit");
  223.                     users2readings ++;
  224.                     return 1;
  225.                 }
  226.                 case 2:
  227.                 {
  228.                     new String[65];
  229.                     format(String, sizeof(String),"{FF0000}Report a player/admin\n{EB7608}View the recent report");
  230.                     ShowPlayerDialog(playerid, 222, DIALOG_STYLE_LIST, "In-Game forum - Users - Report a player/admin",String,"Select","Exit");
  231.                     users3readings ++;
  232.                     return 1;
  233.                 }
  234.                 case 3:
  235.                 {
  236.                     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");
  237.                     users4readings ++;
  238.                     return 1;
  239.                 }
  240.             }
  241.             return 1;
  242.         }
  243.         case 222:
  244.         {
  245.             if(!response)
  246.             {
  247.                 new String[190];
  248.                 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);
  249.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  250.                 return 1;
  251.             }
  252.             switch(listitem)
  253.             {
  254.                 case 0:
  255.                 {
  256.                     new String[50];
  257.                     format(String, sizeof(String),"{FF0000}Admin Report\n{FF0000}Player Report");
  258.                     ShowPlayerDialog(playerid, 226, DIALOG_STYLE_LIST, "In-Game forum - Users - Report Admin/Player",String,"Select","Exit");
  259.                 }
  260.                 case 1:
  261.                 {
  262.                     new string[128];
  263.                     new File:ftw2 = fopen("players-admins-reports.txt", io_read); // Open the file
  264.                     while(fread(ftw2, string)) ShowPlayerDialog(playerid, 280, DIALOG_STYLE_MSGBOX, "Recent Report",string,"Close","");
  265.                     fclose(ftw2);
  266.                 }
  267.             }
  268.         }
  269.         case 226:
  270.         {
  271.             if(!response)
  272.             {
  273.                 new String[190];
  274.                 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);
  275.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  276.                 return 1;
  277.             }
  278.             switch(listitem)
  279.             {
  280.                 case 0: ShowPlayerDialog(playerid, 230, DIALOG_STYLE_INPUT, "Admin Report (128 character max)", "Type the admin's name here.", "Submit", "Cancel");
  281.                 case 1: ShowPlayerDialog(playerid, 229, DIALOG_STYLE_INPUT, "Player Report (128 character max)", "Type the player's name here.", "Submit", "Cancel");
  282.             }
  283.         }
  284.         case 240: //room 1 new topic
  285.         {
  286.             if(response)
  287.             {
  288.                 new str[24];
  289.                 GetPlayerName(playerid, str, sizeof(str));
  290.                 new strdate[30], year,month,day; getdate(year, month, day);
  291.                 format(strdate, sizeof(strdate), "[%d/%d/%d] %s",day,month,year, str);
  292.                 if(strlen(inputtext) < 10 || strlen(inputtext) > 127) return SendClientMessage(playerid,0xFAFFBFAA,"Invalid question length (10-127 characters), retype it.");
  293.                 AddLogLine(strdate , "questions.txt", inputtext );
  294.             }
  295.         }
  296.         case 229: //room 1 new topic
  297.         {
  298.             if(response)
  299.             {
  300.                 new strdate[20], year,month,day; getdate(year, month, day);
  301.                 format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
  302.                 if(strlen(inputtext) < 10 || strlen(inputtext) > 127) return SendClientMessage(playerid,0xFAFFBFAA,"Your report has an invalid length (10-127 only), retype it.");
  303.                 AddLogLineName(strdate , "players-admins-reports.txt", inputtext );
  304.                 format(str_reported, sizeof(str_reported), "%s",inputtext);
  305.                 ShowPlayerDialog(playerid, 228, DIALOG_STYLE_INPUT, "Report (128 character max)", "Now type your report here.", "Submit", "Cancel");
  306.             }
  307.         }
  308.         case 228: //room 1 new topic
  309.         {
  310.             if(response)
  311.             {
  312.                 new str[24];
  313.                 GetPlayerName(playerid, str, sizeof(str));
  314.                 if(strlen(inputtext) < 10 || strlen(inputtext) > 127) return SendClientMessage(playerid,0xFAFFBFAA,"Your report has an invalid length (10-127 only), retype it.");
  315.                 AddLogLineForReport(str , str_reported, "players-admins-reports.txt", inputtext );
  316.                 SendClientMessage(playerid,0xFFFFBFAA,"Player reported successfully.");
  317.             }
  318.         }
  319.         case 230: //room 1 new topic
  320.         {
  321.             if(response)
  322.             {
  323.                 new strdate[20], year,month,day; getdate(year, month, day);
  324.                 format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
  325.                 if(strlen(inputtext) < 10 || strlen(inputtext) > 127) return SendClientMessage(playerid,0xFAFFBFAA,"Your report has an invalid lenth (10-127 only), retype it.");
  326.                 AddLogLineName(strdate , "players-admins-reports.txt", inputtext );
  327.                 format(str_reported, sizeof(str_reported), "%s",inputtext);
  328.                 ShowPlayerDialog(playerid, 231, DIALOG_STYLE_INPUT, "Report (128 character max)", "Now type your report here.", "Submit", "Cancel");
  329.             }
  330.         }
  331.         case 231: //room 1 new topic
  332.         {
  333.             if(response)
  334.             {
  335.                 new str[24];
  336.                 GetPlayerName(playerid, str, sizeof(str));
  337.                 if(strlen(inputtext) < 10 || strlen(inputtext) > 127) return SendClientMessage(playerid,0xFAFFBFAA,"Your report has an invalid lenth (10-127 only), retype it.");
  338.                 AddLogLineForReport(str , str_reported, "players-admins-reports.txt", inputtext );
  339.                 SendClientMessage(playerid,0xFAFFBFAA,"Admin reported successfully.");
  340.             }
  341.         }
  342.         case 212:
  343.         {
  344.             if(!response)
  345.             {
  346.                 new String[190];
  347.                 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);
  348.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  349.                 return 1;
  350.             }
  351.             switch(listitem)
  352.             {
  353.                 case 0: ShowPlayerDialog(playerid, 210, DIALOG_STYLE_INPUT, "New Bug Report (128 character max)", "Type your report here.", "Submit", "Cancel");
  354.                 case 1:
  355.                 {
  356.                     new str[128];
  357.                     GetPlayerName(playerid, str, sizeof(str));
  358.                     new File:ftw = fopen("bug-reports.txt", io_read); // Open the file
  359.                     while(fread(ftw, str)) ShowPlayerDialog(playerid, 211, DIALOG_STYLE_MSGBOX, "Recent Report",str,"Close","");
  360.                     fclose(ftw);
  361.                 }
  362.             }
  363.         }
  364.         case 202:
  365.         {
  366.             if(!response)
  367.             {
  368.                 new String[190];
  369.                 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);
  370.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  371.                 return 1;
  372.             }
  373.             switch(listitem)
  374.             {
  375.                 case 0: ShowPlayerDialog(playerid, 200, DIALOG_STYLE_INPUT, "New Suggestion (128 character max)", "Type your suggestion here.", "Submit", "Cancel");
  376.                 case 1:
  377.                 {
  378.                     new string[200];
  379.                     new File:ftw = fopen("suggestions.txt", io_read); // Open the file
  380.                     while(fread(ftw, string)) ShowPlayerDialog(playerid, 201, DIALOG_STYLE_MSGBOX, "Recent Suggestion",string,"Close","");
  381.                     fclose(ftw);
  382.                 }
  383.             }
  384.         }
  385.         case 557:
  386.         {
  387.             if(!response)
  388.             {
  389.                 new String[190];
  390.                 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);
  391.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  392.                 return 1;
  393.             }
  394.             switch(listitem)
  395.             {
  396.                 case 0:
  397.                 {
  398.                     new String[100];
  399.                     if(IsPlayerAdmin(playerid))
  400.                     {
  401.                         format(String, sizeof(String),"{FF0000}News {0276FF}\nEdit News [ONLY ADMINS]");
  402.                         ShowPlayerDialog(playerid, 290, DIALOG_STYLE_LIST, "In-Game forum : Server - News",String,"Select","Back");
  403.                         return 1;
  404.                     }
  405.                     format(String, sizeof(String),"{FF0000}News");
  406.                     ShowPlayerDialog(playerid, 290, DIALOG_STYLE_LIST, "In-Game forum : Server - News",String,"Select","Back");
  407.                     server1readings ++;
  408.                 }
  409.                 case 1:
  410.                 {
  411.                     server2readings ++;
  412.                     ShowPlayerDialog(playerid, 250, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply For The Community Tag", "Type your full name - age - region below.", "Submit", "Cancel");
  413.                 }
  414.                 case 2:
  415.                 {
  416.                     ShowPlayerDialog(playerid, 250, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply To be Admin", "Type your full name - age - region below.", "Submit", "Cancel");
  417.                     server3readings ++;
  418.                 }
  419.             }
  420.         }
  421.         case 290:
  422.         {
  423.             if(!response) return 1;
  424.             switch(listitem)
  425.             {
  426.                 case 0: ShowPlayerDialog(playerid, 291, DIALOG_STYLE_MSGBOX, "In-Game Forum: Server - News & Info", str_news, "ok" , "cancel");
  427.                 case 1: ShowPlayerDialog(playerid, 292, DIALOG_STYLE_INPUT, "Server Updates", "Type The Updates Below.", "Submit", "Cancel");
  428.             }
  429.         }
  430.         case 250:
  431.         {
  432.             if(!response) return 1;
  433.             new strdate[30], year,month,day;
  434.             getdate(year, month, day);
  435.             format(strdate, sizeof(strdate), "[%d/%d/%d]",day,month,year);
  436.             AddLogLine(strdate , "admin-requests.txt", inputtext );
  437.             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");
  438.         }
  439.         case 251:
  440.         {
  441.             if(!response) return 1;
  442.             new strr[24];
  443.             GetPlayerName(playerid, strr, sizeof(strr));
  444.             AddLogLine(strr , "admin-requests.txt", inputtext );
  445.             ShowPlayerDialog(playerid, 252, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply", "Why do you want the tag? Why should we accept you?", "Submit", "Cancel");
  446.         }
  447.         case 252:
  448.         {
  449.             if(!response) return 1;
  450.             new strr[24];
  451.             GetPlayerName(playerid, strr, sizeof(strr));
  452.             AddLogLine(strr , "admin-requests.txt", inputtext );
  453.             ShowPlayerDialog(playerid, 253, DIALOG_STYLE_MSGBOX, "In-Game Forum : Server - Apply", "You have applied successfully", "ok", "exit");
  454.         }
  455.         case 292: if(response) return format(str_news , sizeof(str_news),inputtext);
  456.         // --> Mains
  457.         case 556:
  458.         {
  459.             if(!response) return 1;
  460.  
  461.             switch(listitem)
  462.             {
  463.                 case 0:
  464.                 {
  465.                     new String[150];
  466.                     main1readings ++;
  467.                     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);
  468.                     ShowPlayerDialog(playerid, 557, DIALOG_STYLE_LIST, "In-Game forum : Server",String,"Select","Back");
  469.                 }
  470.                 case 2:
  471.                 {
  472.                     new String[200];
  473.                     main2readings ++;
  474.                     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);
  475.                     ShowPlayerDialog(playerid, 558, DIALOG_STYLE_LIST, "In-Game forum : Users",String,"Select","Back");
  476.                 }
  477.                 case 4:
  478.                 {
  479.                     main4readings ++;
  480.                     ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  481.                 }
  482.             }
  483.         }
  484.         // --> Main 2 (users)
  485.         case 200: //room 1 new topic
  486.         {
  487.             if(!response) return 1;
  488.             new str[24];
  489.             GetPlayerName(playerid, str, sizeof(str));
  490.             if(strlen(inputtext) < 10 || strlen(inputtext) > 127) return SendClientMessage(playerid,0xFAFFBFAA,"Your suggestion length was invalid (10-127 only), retype it.");
  491.             AddLogLine(str , "suggestions.txt", inputtext );
  492.         }
  493.         case 210: //room 1 new topic
  494.         {
  495.             if(!response) return 1;
  496.             new str[128];
  497.             GetPlayerName(playerid, str, sizeof(str));
  498.             if(strlen(inputtext) < 10 || strlen(inputtext) > 127) return SendClientMessage(playerid,0xFAFFBFAA,"Your report length was invalid (10-127 only), retype it.");
  499.             AddLogLine(str , "bug-reports.txt", inputtext );
  500.         }
  501.         // --> Main 3 (off topic)
  502.         case 559:
  503.         {
  504.             new String[100];
  505.             if(!response)
  506.             {
  507.                 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);
  508.                 ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
  509.                 return 1;
  510.             }
  511.             switch(listitem)
  512.             {
  513.                 case 0:
  514.                 {
  515.                     off1readings ++;
  516.                     if(!room1used) // room1 not used
  517.                     {
  518.                         new String1[22];
  519.                         format(String1, sizeof(String1),"{84C700}+New Topic+");
  520.                         ShowPlayerDialog(playerid, 560, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String1,"Select","Back");
  521.                         return 1;
  522.                     }
  523.                     new Stringg[128];
  524.                     Stringg = "{84C700}-Reply-\n";
  525.                     strcat(Stringg, room1topic, sizeof Stringg);
  526.                     strcat(Stringg, "\n \n", sizeof Stringg);
  527.                     strcat(Stringg, room1reply, sizeof Stringg);
  528.                     ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",Stringg,"Select","Back");
  529.                 }
  530.                 case 1:
  531.                 {
  532.                     off2readings ++;
  533.                     if(!room2used) // room1 not used
  534.                     {
  535.                         format(String, sizeof(String),"{84C700}+New Topic+");
  536.                         ShowPlayerDialog(playerid, 570, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  537.                         return 1;
  538.                     }
  539.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  540.                     ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  541.                 }
  542.                 case 2:
  543.                 {
  544.                     off3readings ++;
  545.                     if(!room3used) // room1 not used
  546.                     {
  547.                         format(String, sizeof(String),"{84C700}+New Topic+");
  548.                         ShowPlayerDialog(playerid, 580, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  549.                         return 1;
  550.                     }
  551.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  552.                     ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  553.                 }
  554.                 case 3:
  555.                 {
  556.                     off4readings ++;
  557.                     if(!room4used) // room1 not used
  558.                     {
  559.                         format(String, sizeof(String),"{84C700}+New Topic+");
  560.                         ShowPlayerDialog(playerid, 590, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  561.                         return 1;
  562.                     }
  563.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  564.                     ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  565.                 }
  566.                 case 4:
  567.                 {
  568.                     off5readings ++;
  569.                     if(!room5used) // room1 not used
  570.                     {
  571.                         format(String, sizeof(String),"{84C700}+New Topic+");
  572.                         ShowPlayerDialog(playerid, 600, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  573.                         return 1;
  574.                     }
  575.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  576.                     ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  577.                 }
  578.                 case 5:
  579.                 {
  580.                     off6readings ++;
  581.                     if(!room6used) // room1 not used
  582.                     {
  583.                         format(String, sizeof(String),"{84C700}+New Topic+");
  584.                         ShowPlayerDialog(playerid, 610, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  585.                         return 1;
  586.                     }
  587.                     format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  588.                     ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  589.                 }
  590.             }
  591.         }
  592.     // --> ROOM 1 <-- //
  593.         case 560: //room 1 new topic
  594.         {
  595.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  596.             switch(listitem)
  597.             {
  598.                 case 0:ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  599.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room1topic);
  600.             }
  601.         }
  602.         case 561: // room1 new reply
  603.         {
  604.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  605.             switch(listitem)
  606.             {
  607.                 case 0:ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  608.                 case 1:SendClientMessage(playerid,0xFFFFFFAA,room1topic);
  609.  
  610.             }
  611.         }
  612.         case 562: //room1 topic posted
  613.         {
  614.             new String[200];
  615.             if (room1used)
  616.             {
  617.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  618.                 ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  619.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  620.                 return 1;
  621.             }
  622.             if(strlen(inputtext) < 10 || strlen(inputtext) > 127) return ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "Invalid characters length (10-127 only)", "Re-Type your new topic here.", "Submit", "Cancel");
  623.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  624.             ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  625.             room1used = true;
  626.             GetPlayerName(playerid, String, sizeof(String));
  627.             format(room1topic, sizeof(room1topic), "%s : %s",String,inputtext);
  628.         }
  629.         case 563: //room1 reply posted
  630.         {
  631.             if(strlen(inputtext) < 4 || strlen(inputtext) > 15) return ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "Invalid characters length (4-15 only)", "Re-Type your new reply", "Submit", "Cancel");
  632.             new String[200];
  633.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
  634.             ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
  635.             GetPlayerName(playerid, String, sizeof(String));
  636.             format(room1reply, sizeof(room1reply), "%s\n%s : %s",room1reply,String,inputtext);
  637.         }
  638.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  639.         // --> ROOM 2 <-- //
  640.         case 570: //room 1 new topic
  641.         {
  642.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  643.             switch(listitem)
  644.             {
  645.                 case 0: ShowPlayerDialog(playerid, 572, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  646.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room2topic);
  647.             }
  648.         }
  649.         case 571: // room1 new reply
  650.         {
  651.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  652.             switch(listitem)
  653.             {
  654.                 case 0: ShowPlayerDialog(playerid, 573, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  655.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room2topic);
  656.             }
  657.         }
  658.         case 572: //room1 topic posted
  659.         {
  660.             new String[200];
  661.             if (room2used)
  662.             {
  663.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  664.                 ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  665.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  666.                 return 1;
  667.             }
  668.             if(strlen(inputtext) < 10 || strlen(inputtext) > 128) return ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "Invalid characters length", "Re-Type your new topic here.", "Submit", "Cancel");
  669.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  670.             ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  671.             room2used = true;
  672.             GetPlayerName(playerid, String, sizeof(String));
  673.             format(room2topic, sizeof(room2topic), "%s : %s",String,inputtext);
  674.         }
  675.         case 573: //room2 reply posted
  676.         {
  677.             if(strlen(inputtext) < 4 || strlen(inputtext) > 15) return ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new reply", "Submit", "Cancel");
  678.             new String[200];
  679.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
  680.             ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
  681.             GetPlayerName(playerid, String, sizeof(String));
  682.             format(room2reply, sizeof(room2reply), "%s\n%s : %s",room2reply,String,inputtext);
  683.         }
  684.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  685.         // --> ROOM 3 <-- //
  686.         case 580: //room 1 new topic
  687.         {
  688.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  689.             switch(listitem)
  690.             {
  691.                 case 0: ShowPlayerDialog(playerid, 582, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  692.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room3topic);
  693.             }
  694.         }
  695.         case 581: // room1 new reply
  696.         {
  697.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  698.             switch(listitem)
  699.             {
  700.                 case 0: ShowPlayerDialog(playerid, 583, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  701.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room3topic);
  702.             }
  703.         }
  704.         case 582: //room1 topic posted
  705.         {
  706.             new String[200];
  707.             if (room3used)
  708.             {
  709.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  710.                 ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  711.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  712.             }
  713.             else
  714.             {
  715.                 if(strlen(inputtext) < 10 || strlen(inputtext) > 128) return ShowPlayerDialog(playerid, 582, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new topic here.", "Submit", "Cancel");
  716.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  717.                 ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  718.                 room3used = true;
  719.                 GetPlayerName(playerid, String, sizeof(String));
  720.                 format(room3topic, sizeof(room3topic), "%s : %s",String,inputtext);
  721.             }
  722.         }
  723.         case 583: //room2 reply posted
  724.         {
  725.             if(strlen(inputtext) < 4 || strlen(inputtext) > 15) return ShowPlayerDialog(playerid, 583, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new reply", "Submit", "Cancel");
  726.             new String[200];
  727.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
  728.             ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
  729.             GetPlayerName(playerid, String, sizeof(String));
  730.             format(room3reply, sizeof(room3reply), "%s\n%s : %s",room3reply,String,inputtext);
  731.         }
  732.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  733.         // --> ROOM 4 <-- //
  734.         case 590: //room 1 new topic
  735.         {
  736.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  737.             switch(listitem)
  738.             {
  739.                 case 0: ShowPlayerDialog(playerid, 592, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  740.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room4topic);
  741.             }
  742.         }
  743.         case 591: // room1 new reply
  744.         {
  745.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  746.             switch(listitem)
  747.             {
  748.                 case 0: ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  749.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room4topic);
  750.             }
  751.         }
  752.         case 592: //room1 topic posted
  753.         {
  754.             new String[200];
  755.             if (room4used)
  756.             {
  757.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  758.                 ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  759.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  760.                 return 1;
  761.             }
  762.             if(strlen(inputtext) < 10 || strlen(inputtext) > 128) return ShowPlayerDialog(playerid, 592, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new topic here.", "Submit", "Cancel");
  763.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  764.             ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  765.             room4used = true;
  766.             GetPlayerName(playerid, String, sizeof(String));
  767.             format(room4topic, sizeof(room4topic), "%s : %s",String,inputtext);
  768.         }
  769.         case 593: //room2 reply posted
  770.         {
  771.             if(strlen(inputtext) < 4 || strlen(inputtext) > 15) return ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new reply", "Submit", "Cancel");
  772.             new String[200];
  773.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
  774.             ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
  775.             GetPlayerName(playerid, String, sizeof(String));
  776.             format(room4reply, sizeof(room4reply), "%s\n%s : %s",room4reply,String,inputtext);
  777.         }
  778.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  779.         // --> ROOM 5 <-- //
  780.         case 600: //room 1 new topic
  781.         {
  782.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  783.             switch(listitem)
  784.             {
  785.                 case 0: ShowPlayerDialog(playerid, 602, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  786.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room5topic);
  787.             }
  788.         }
  789.         case 601: // room1 new reply
  790.         {
  791.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  792.             switch(listitem)
  793.             {
  794.                 case 0: ShowPlayerDialog(playerid, 603, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  795.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room5topic);
  796.             }
  797.         }
  798.         case 602: //room1 topic posted
  799.         {
  800.             new String[200];
  801.             if (room5used)
  802.             {
  803.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  804.                 ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  805.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  806.                 return 1;
  807.             }
  808.             if(strlen(inputtext) < 10 || strlen(inputtext) > 128) return ShowPlayerDialog(playerid, 602, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new topic here.", "Submit", "Cancel");
  809.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  810.             ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  811.             room5used = true;
  812.             GetPlayerName(playerid, String, sizeof(String));
  813.             format(room5topic, sizeof(room5topic), "%s: %s",String,inputtext);
  814.         }
  815.         case 603: //room2 reply posted
  816.         {
  817.             if(strlen(inputtext) < 4 || strlen(inputtext) > 15) return ShowPlayerDialog(playerid, 603, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new reply", "Submit", "Cancel");
  818.             new String[200];
  819.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
  820.             ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
  821.             GetPlayerName(playerid, String, sizeof(String));
  822.             format(room5reply, sizeof(room5reply), "%s\n%s: %s",room5reply,String,inputtext);
  823.         }
  824.         //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
  825.         // --> ROOM 6 <-- //
  826.         case 610: //room 1 new topic
  827.         {
  828.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  829.             switch(listitem)
  830.             {
  831.                 case 0: ShowPlayerDialog(playerid, 612, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
  832.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room6topic);
  833.             }
  834.         }
  835.         case 611: // room1 new reply
  836.         {
  837.             if(!response) return ShowPlayerDialog(playerid, 559, DIALOG_STYLE_TABLIST_HEADERS, "In-Game forum : Off Topic",FormatString(),"Select","Back");
  838.             switch(listitem)
  839.             {
  840.                 case 0: ShowPlayerDialog(playerid, 613, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
  841.                 case 1: SendClientMessage(playerid,0xFFFFFFAA,room6topic);
  842.             }
  843.         }
  844.         case 612: //room1 topic posted
  845.         {
  846.             new String[200];
  847.             if (room6used)
  848.             {
  849.                 format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  850.                 ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  851.                 SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
  852.                 return 1;
  853.             }
  854.             if(strlen(inputtext) < 10 || strlen(inputtext) > 128) return ShowPlayerDialog(playerid, 612, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new topic here.", "Submit", "Cancel");
  855.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  856.             ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  857.             room6used = true;
  858.             GetPlayerName(playerid, String, sizeof(String));
  859.             format(room6topic, sizeof(room6topic), "%s : %s",String,inputtext);
  860.         }
  861.         case 613: //room2 reply posted
  862.         {
  863.             if(strlen(inputtext) < 4 || strlen(inputtext) > 15) return ShowPlayerDialog(playerid, 613, DIALOG_STYLE_INPUT, "Invalid characters length!", "Re-Type your new reply", "Submit", "Cancel");
  864.             new String[200];
  865.             format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
  866.             ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
  867.             GetPlayerName(playerid, String, sizeof(String));
  868.             format(room6reply, sizeof(room6reply), "%s\n%s : %s",room6reply,String,inputtext);
  869.         }
  870.     }
  871.     return 0;
  872. }
Advertisement
Add Comment
Please, Sign In to add comment