Advertisement
Battlezone_samp

IG FORUM v3 by Battlezone

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