Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // Scripted by battlezone (aka seif), do not remove da credits!!
- //That's only for reading , if you need full filterscript check back topic.
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- new str_news[128];
- new str_reported[20];
- new room1status[15];
- new room2status[15];
- new room3status[15];
- new room4status[15];
- new room5status[15];
- new room6status[15];
- new room1used;
- new room1topic[128];
- new room1reply[128];
- new room2used;
- new room2topic[128];
- new room2reply[128];
- new room3used;
- new room3topic[128];
- new room3reply[128];
- new room4used;
- new room4topic[128];
- new room4reply[128];
- new room5used;
- new room5topic[128];
- new room5reply[128];
- new room6used;
- new room6topic[128];
- new room6reply[128];
- new users1readings, users2readings, users3readings, users4readings;
- new main1readings, main2readings, main4readings;
- new server1readings, server2readings, server3readings;
- new off1readings, off2readings, off3readings, off4readings, off5readings, off6readings;
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- room1status = "{00C700}Free";
- room2status = "{00C700}Free";
- room3status = "{00C700}Free";
- room4status = "{00C700}Free";
- room5status = "{00C700}Free";
- room6status = "{00C700}Free";
- room1topic = "";
- room1reply = "";
- room1used = 0;
- room2topic = "";
- room2reply = "";
- room2used = 0;
- room3topic = "";
- room3reply = "";
- room3used = 0;
- room4topic = "";
- room4reply = "";
- room4used = 0;
- room5topic = "";
- room5reply = "";
- room5used = 0;
- room6topic = "";
- room6reply = "";
- room6used = 0;
- main1readings = 0;
- main2readings = 0;
- main4readings = 0;
- server1readings =0;
- server2readings =0;
- server3readings =0;
- users1readings =0;
- users2readings =0;
- users3readings =0;
- users4readings =0;
- off1readings =0;
- off2readings =0;
- off3readings =0;
- off4readings =0;
- off5readings =0;
- off6readings =0;
- print("\n--------------------------------------");
- print(" In-Game Forum by battlezone");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- room1status = "";
- room2status = "";
- room3status = "";
- room4status = "";
- room5status = "";
- room6status = "";
- room1topic = "";
- room1reply = "";
- room1used = 0;
- room2topic = "";
- room2reply = "";
- room2used = 0;
- room3topic = "";
- room3reply = "";
- room3used = 0;
- room4topic = "";
- room4reply = "";
- room4used = 0;
- room5topic = "";
- room5reply = "";
- room5used = 0;
- room6topic = "";
- room6reply = "";
- room6used = 0;
- main1readings = 0;
- main2readings = 0;
- main4readings = 0;
- server1readings =0;
- server2readings =0;
- server3readings =0;
- users1readings =0;
- users2readings =0;
- users3readings =0;
- users4readings =0;
- off1readings =0;
- off2readings =0;
- off3readings =0;
- off4readings =0;
- off5readings =0;
- off6readings =0;
- return 1;
- }
- #endif
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- stock AddLogLine(field[ ],file[ ], input[ ] )
- {
- new string[128];
- format(string, 128, "%s : %s\r\n", field, input);
- new File:fhandle;
- if(fexist(file)) {
- printf("Creating file '%s' because theres no file created with that name.", file);
- }
- fhandle = fopen(file,io_append);
- fwrite(fhandle,string);
- fclose(fhandle);
- return 1;
- }
- stock AddLogLineName(field[ ],file[ ], input[ ] )
- {
- new string[128];
- format(string, 128, "%s : %s was reported as below\r\n", field, input);
- new File:fhandle;
- if(fexist(file)) {
- printf("Creating file '%s' because theres no file created with that name.", file);
- }
- fhandle = fopen(file,io_append);
- fwrite(fhandle,string);
- fclose(fhandle);
- return 1;
- }
- stock AddLogLineForReport(field[ ], field2[ ],file[ ], input[ ] )
- {
- new string[128];
- format(string, 128, "%s reported %s : %s\r\n", field,field2, input);
- new File:fhandle;
- if(fexist(file)) {
- printf("Creating file '%s' because theres no file created with that name.", file);
- }
- fhandle = fopen(file,io_append);
- fwrite(fhandle,string);
- fclose(fhandle);
- return 1;
- }
- CMD:forum(playerid,params [])
- {
- #pragma unused params
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
- return 1;
- }
- CMD:cr1(playerid,params [])
- {
- #pragma unused params
- if(IsPlayerAdmin(playerid))
- {
- room1status = "{00C700}Free";
- room1topic = "";
- room1reply = "";
- room1used = 0;
- new str[25];
- GetPlayerName(playerid, str, sizeof(str));
- new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 1", str);
- SendClientMessageToAll(0x375FFFFF, string);
- }
- else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
- return 1;
- }
- CMD:cr2(playerid,params [])
- {
- #pragma unused params
- if(IsPlayerAdmin(playerid))
- {
- room2status = "{00C700}Free";
- room2topic = "";
- room2reply = "";
- room2used = 0;
- new str[25];
- GetPlayerName(playerid, str, sizeof(str));
- new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 2", str);
- SendClientMessageToAll(0x375FFFFF, string);
- }
- else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
- return 1;
- }
- CMD:cr3(playerid,params [])
- {
- #pragma unused params
- if(IsPlayerAdmin(playerid))
- {
- room3status = "{00C700}Free";
- room3topic = "";
- room3reply = "";
- room3used = 0;
- new str[25];
- GetPlayerName(playerid, str, sizeof(str));
- new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 3", str);
- SendClientMessageToAll(0x375FFFFF, string);
- }
- else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
- return 1;
- }
- CMD:cr4(playerid,params [])
- {
- #pragma unused params
- if(IsPlayerAdmin(playerid))
- {
- room4status = "{00C700}Free";
- room4topic = "";
- room4reply = "";
- room4used = 0;
- new str[25];
- GetPlayerName(playerid, str, sizeof(str));
- new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 4", str);
- SendClientMessageToAll(0x375FFFFF, string);
- }
- else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
- return 1;
- }
- CMD:cr5(playerid,params [])
- {
- #pragma unused params
- if(IsPlayerAdmin(playerid))
- {
- room5status = "{00C700}Free";
- room5topic = "";
- room5reply = "";
- room5used = 0;
- new str[25];
- GetPlayerName(playerid, str, sizeof(str));
- new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 5", str);
- SendClientMessageToAll(0x375FFFFF, string);
- }
- else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
- return 1;
- }
- CMD:cr6(playerid,params [])
- {
- #pragma unused params
- if(IsPlayerAdmin(playerid))
- {
- room6status = "{00C700}Free";
- room6topic = "";
- room6reply = "";
- room6used = 0;
- new str[25];
- GetPlayerName(playerid, str, sizeof(str));
- new string[128]; format(string,sizeof(string),"Administrator %s has cleared Forum Chat Room 6", str);
- SendClientMessageToAll(0x375FFFFF, string);
- }
- else return SendClientMessage(playerid,0xFF6347AA,"You are not an RCON admin!");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 558)
- {
- if(!response)
- {
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new String[200];
- format(String, sizeof(String),"{FF0000}Suggest\n{EB7608}View the recent Suggestion");
- ShowPlayerDialog(playerid, 202, DIALOG_STYLE_LIST, "In-Game forum - Users - Suggestion",String,"Select","Exit");
- users1readings ++;
- return 1;
- }
- case 1:
- {
- new String[200];
- format(String, sizeof(String),"{FF0000}Report a bug\n{EB7608}View the recent report");
- ShowPlayerDialog(playerid, 212, DIALOG_STYLE_LIST, "In-Game forum - Users - Bug Report",String,"Select","Exit");
- users2readings ++;
- return 1;
- }
- case 2:
- {
- new String[200];
- format(String, sizeof(String),"{FF0000}Report a player/admin\n{EB7608}View the recent report");
- ShowPlayerDialog(playerid, 222, DIALOG_STYLE_LIST, "In-Game forum - Users - Report a player/admin",String,"Select","Exit");
- users3readings ++;
- return 1;
- }
- case 3:
- {
- 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");
- users4readings ++;
- return 1;
- }
- }
- }
- return 1;
- }
- if(dialogid == 222)
- {
- if(!response)
- {
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new String[200];
- format(String, sizeof(String),"{FF0000}Admin Report\n{FF0000}Player Report");
- ShowPlayerDialog(playerid, 226, DIALOG_STYLE_LIST, "In-Game forum - Users - Report Admin/Player",String,"Select","Exit");
- return 1;
- }
- case 1:
- {
- new string[128];
- new File:ftw2 = fopen("players-admins-reports.txt", io_read); // Open the file
- while(fread(ftw2, string)) //reads the file line-by-line
- {
- ShowPlayerDialog(playerid, 280, DIALOG_STYLE_MSGBOX, "Recent Report",string,"Close","");
- }
- fclose(ftw2);
- return 1;
- }
- }
- }
- return 1;
- }
- if(dialogid == 226)
- {
- if(!response)
- {
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, 230, DIALOG_STYLE_INPUT, "Admin Report (128 character max)", "Type the admin's name here.", "Submit", "Cancel");
- return 1;
- }
- case 1:
- {
- ShowPlayerDialog(playerid, 229, DIALOG_STYLE_INPUT, "Player Report (128 character max)", "Type the player's name here.", "Submit", "Cancel");
- return 1;
- }
- }
- }
- return 1;
- }
- if(dialogid == 240) //room 1 new topic
- {
- if(response)
- {
- new str[25];
- GetPlayerName(playerid, str, sizeof(str));
- new strdate[30], year,month,day; getdate(year, month, day);
- format(strdate, sizeof(strdate), "[%d/%d/%d] %s",day,month,year, str);
- if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
- {
- AddLogLine(strdate , "questions.txt", inputtext );
- }
- else if(strlen(inputtext) < 10)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your question was too short, retype it.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 240, DIALOG_STYLE_INPUT, "Need Help? (128 character max)", "Your question: ( DO NOT EXCEED THE MAX CHARACTERS LIMIT )", "Submit", "Cancel");
- }
- }
- return 1;
- }
- if(dialogid == 229) //room 1 new topic
- {
- if(response)
- {
- new strdate[20], year,month,day; getdate(year, month, day);
- format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
- if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
- {
- AddLogLineName(strdate , "players-admins-reports.txt", inputtext );
- format(str_reported, sizeof(str_reported), "%s",inputtext);
- ShowPlayerDialog(playerid, 228, DIALOG_STYLE_INPUT, "Report (128 character max)", "Now type your report here.", "Submit", "Cancel");
- }
- else if(strlen(inputtext) < 2)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 229, DIALOG_STYLE_INPUT, "Player's name (128 character max)", "Type players's name here.", "Submit", "Cancel");
- }
- }
- return 1;
- }
- if(dialogid == 228) //room 1 new topic
- {
- if(response)
- {
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
- {
- AddLogLineForReport(str , str_reported, "players-admins-reports.txt", inputtext );
- SendClientMessage(playerid,0xFFFFBFAA,"Player reported successfully.");
- }
- else if(strlen(inputtext) < 2)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 228, DIALOG_STYLE_INPUT, "Player report (128 character max)", "Type your report here.", "Submit", "Cancel");
- }
- }
- return 1;
- }
- if(dialogid == 230) //room 1 new topic
- {
- if(response)
- {
- new strdate[20], year,month,day; getdate(year, month, day);
- format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year);
- if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
- {
- AddLogLineName(strdate , "players-admins-reports.txt", inputtext );
- format(str_reported, sizeof(str_reported), "%s",inputtext);
- ShowPlayerDialog(playerid, 231, DIALOG_STYLE_INPUT, "Report (128 character max)", "Now type your report here.", "Submit", "Cancel");
- }
- else if(strlen(inputtext) < 2)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 230, DIALOG_STYLE_INPUT, "Admin's name (128 character max)", "Type admin's name here.", "Submit", "Cancel");
- }
- }
- return 1;
- }
- if(dialogid == 231) //room 1 new topic
- {
- if(response)
- {
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- if(strlen(inputtext) >= 2 && strlen(inputtext) <= 128)
- {
- AddLogLineForReport(str , str_reported, "players-admins-reports.txt", inputtext );
- SendClientMessage(playerid,0xFAFFBFAA,"Admin reported successfully.");
- }
- else if(strlen(inputtext) < 2)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 231, DIALOG_STYLE_INPUT, "Admin report (128 character max)", "Type your report here.", "Submit", "Cancel");
- }
- }
- return 1;
- }
- if(dialogid == 212)
- {
- if(!response)
- {
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, 210, DIALOG_STYLE_INPUT, "New Bug Report (128 character max)", "Type your report here.", "Submit", "Cancel");
- return 1;
- }
- case 1:
- {
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- new File:ftw = fopen("bug-reports.txt", io_read); // Open the file
- while(fread(ftw, str)) //reads the file line-by-line
- {
- ShowPlayerDialog(playerid, 211, DIALOG_STYLE_MSGBOX, "Recent Report",str,"Close","");
- }
- fclose(ftw);
- return 1;
- }
- }
- }
- return 1;
- }
- if(dialogid == 202)
- {
- if(!response)
- {
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid, 200, DIALOG_STYLE_INPUT, "New Suggestion (128 character max)", "Type your suggestion here.", "Submit", "Cancel");
- return 1;
- }
- case 1:
- {
- new string[256];
- new File:ftw = fopen("suggestions.txt", io_read); // Open the file
- while(fread(ftw, string)) //reads the file line-by-line
- {
- ShowPlayerDialog(playerid, 201, DIALOG_STYLE_MSGBOX, "Recent Suggestion",string,"Close","");
- }
- fclose(ftw);
- return 1;
- }
- }
- }
- return 1;
- }
- if(dialogid == 557)
- {
- if(!response)
- {
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerAdmin(playerid))
- {
- new String[100];
- format(String, sizeof(String),"{FF0000}News {0276FF}\nEdit News [ONLY ADMINS]");
- ShowPlayerDialog(playerid, 290, DIALOG_STYLE_LIST, "In-Game forum : Server - News",String,"Select","Back");
- }
- else
- {
- new String[100];
- format(String, sizeof(String),"{FF0000}News");
- ShowPlayerDialog(playerid, 290, DIALOG_STYLE_LIST, "In-Game forum : Server - News",String,"Select","Back");
- }
- server1readings ++;
- return 1;
- }
- case 1:
- {
- server2readings ++;
- ShowPlayerDialog(playerid, 250, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply For The Community Tag", "Type your full name - age - region below.", "Submit", "Cancel");
- return 1;
- }
- case 2:
- {
- ShowPlayerDialog(playerid, 250, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply To be Admin", "Type your full name - age - region below.", "Submit", "Cancel");
- server3readings ++;
- return 1;
- }
- }
- }
- return 1;
- }
- if(dialogid == 290 && response)
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid, 291, DIALOG_STYLE_MSGBOX, "In-Game Forum: Server - News & Info", str_news, "ok" , "cancel");
- case 1: ShowPlayerDialog(playerid, 292, DIALOG_STYLE_INPUT, "Server Updates", "Type The Updates Below.", "Submit", "Cancel");
- }
- return 1;
- }
- if(dialogid == 250 && response)
- {
- new strdate[30], year,month,day; getdate(year, month, day);
- format(strdate, sizeof(strdate), "[%d/%d/%d]",day,month,year);
- AddLogLine(strdate , "admin-requests.txt", inputtext );
- 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");
- return 1;
- }
- if(dialogid == 251 && response)
- {
- new strr[25];
- GetPlayerName(playerid, strr, sizeof(strr));
- AddLogLine(strr , "admin-requests.txt", inputtext );
- ShowPlayerDialog(playerid, 252, DIALOG_STYLE_INPUT, "In-Game Forum : Server - Apply", "Why do you want the tag? Why should we accept you?", "Submit", "Cancel");
- return 1;
- }
- if(dialogid == 252 && response)
- {
- new strr[128];
- GetPlayerName(playerid, strr, sizeof(strr));
- AddLogLine(strr , "admin-requests.txt", inputtext );
- ShowPlayerDialog(playerid, 253, DIALOG_STYLE_MSGBOX, "In-Game Forum : Server - Apply", "You have applied successfully", "ok", "exit");
- return 1;
- }
- if(dialogid == 292 && response)
- {
- format(str_news , sizeof(str_news),inputtext);
- return 1;
- }
- // --> Mains
- if(dialogid == 556)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- main1readings ++;
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 557, DIALOG_STYLE_LIST, "In-Game forum : Server",String,"Select","Back");
- return 1;
- }
- case 2:
- {
- main2readings ++;
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 558, DIALOG_STYLE_LIST, "In-Game forum : Users",String,"Select","Back");
- return 1;
- }
- case 4:
- {
- main4readings ++;
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- return 1;
- }
- }
- }
- return 1;
- }
- // --> Main 2 (users)
- if(dialogid == 200) //room 1 new topic
- {
- if(response)
- {
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
- {
- AddLogLine(str , "suggestions.txt", inputtext );
- }
- else if(strlen(inputtext) < 10)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your suggestion was too short, retype it.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 640, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your suggestion.", "Submit", "Cancel");
- }
- }
- }
- if(dialogid == 210) //room 1 new topic
- {
- if(response)
- {
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
- {
- AddLogLine(str , "bug-reports.txt", inputtext );
- }
- else if(strlen(inputtext) < 10)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your report was too short, retype it.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 640, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your report.", "Submit", "Cancel");
- }
- }
- }
- //---------------------//
- // --> Main 3 (off topic)
- if(dialogid == 559)
- {
- if(!response)
- {
- new String[200];
- 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);
- ShowPlayerDialog(playerid, 556, DIALOG_STYLE_LIST, "In-Game forum",String,"Select","Exit");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- off1readings ++;
- new String[200];
- if(room1used == 0) // room1 not used
- {
- format(String, sizeof(String),"{84C700}+New Topic+");
- ShowPlayerDialog(playerid, 560, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
- }
- else // room1 used
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
- ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
- }
- return 1;
- }
- case 1:
- {
- off2readings ++;
- new String[200];
- if(room2used == 0) // room1 not used
- {
- format(String, sizeof(String),"{84C700}+New Topic+");
- ShowPlayerDialog(playerid, 570, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
- }
- else // room1 used
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
- ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
- }
- return 1;
- }
- case 2:
- {
- off3readings ++;
- new String[200];
- if(room3used == 0) // room1 not used
- {
- format(String, sizeof(String),"{84C700}+New Topic+");
- ShowPlayerDialog(playerid, 580, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
- }
- else // room1 used
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
- ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
- }
- return 1;
- }
- case 3:
- {
- off4readings ++;
- new String[200];
- if(room4used == 0) // room1 not used
- {
- format(String, sizeof(String),"{84C700}+New Topic+");
- ShowPlayerDialog(playerid, 590, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
- }
- else // room1 used
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
- ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
- }
- return 1;
- }
- case 4:
- {
- off5readings ++;
- new String[200];
- if(room5used == 0) // room1 not used
- {
- format(String, sizeof(String),"{84C700}+New Topic+");
- ShowPlayerDialog(playerid, 600, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
- }
- else // room1 used
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
- ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
- }
- return 1;
- }
- case 5:
- {
- off6readings ++;
- new String[200];
- if(room6used == 0) // room1 not used
- {
- format(String, sizeof(String),"{84C700}+New Topic+");
- ShowPlayerDialog(playerid, 610, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
- }
- else // room1 used
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
- ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- // --> ROOM 1 <-- //
- if(dialogid == 560) //room 1 new topic
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room1topic);
- }
- }
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- return 1;
- }
- if(dialogid == 561) // room1 new reply
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room1topic);
- }
- }
- }
- if(dialogid == 562) //room1 topic posted
- {
- new String[200];
- if (room1used == 1)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
- ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
- SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
- }
- else
- {
- if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
- ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
- room1used = 1;
- room1status = "{FF0800}used";
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room1topic, sizeof(room1topic), "%s : %s",str,inputtext);
- }
- else if(strlen(inputtext) < 5)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
- }
- }
- }
- if(dialogid == 563) //room1 reply posted
- {
- new String[200];
- if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room1topic, room1reply);
- ShowPlayerDialog(playerid, 561, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 1",String,"Select","Back");
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room1reply, sizeof(room1reply), "%s\n%s : %s",room1reply,str,inputtext);
- }
- else if(strlen(inputtext) < 4)
- {
- SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
- }
- if(strlen(inputtext) >= 15)
- {
- ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
- }
- }
- //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
- // --> ROOM 2 <-- //
- if(dialogid == 570) //room 1 new topic
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 572, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room2topic);
- }
- }
- }
- if(dialogid == 571 ) // room1 new reply
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 573, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room2topic);
- }
- }
- }
- if(dialogid == 572) //room1 topic posted
- {
- new String[200];
- if (room2used == 1)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
- ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
- SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
- }
- else
- {
- if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
- ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
- room2used = 1;
- room2status = "{FF0800}used";
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room2topic, sizeof(room2topic), "%s : %s",str,inputtext);
- }
- else if(strlen(inputtext) < 5)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 562, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
- }
- }
- }
- if(dialogid == 573) //room2 reply posted
- {
- new String[200];
- if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room2topic, room2reply);
- ShowPlayerDialog(playerid, 571, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 2",String,"Select","Back");
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room2reply, sizeof(room2reply), "%s\n%s : %s",room2reply,str,inputtext);
- }
- else if(strlen(inputtext) < 4)
- {
- SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
- }
- if(strlen(inputtext) >= 15)
- {
- ShowPlayerDialog(playerid, 563, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
- }
- }
- //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
- // --> ROOM 3 <-- //
- if(dialogid == 580 ) //room 1 new topic
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 582, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room3topic);
- }
- }
- }
- if(dialogid == 581) // room1 new reply
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 583, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room3topic);
- }
- }
- }
- if(dialogid == 582) //room1 topic posted
- {
- new String[200];
- if (room3used == 1)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
- ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
- SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
- }
- else
- {
- if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
- ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
- room3used = 1;
- room3status = "{FF0800}used";
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room3topic, sizeof(room3topic), "%s : %s",str,inputtext);
- }
- else if(strlen(inputtext) < 5)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 582, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
- }
- }
- }
- if(dialogid == 583) //room2 reply posted
- {
- new String[200];
- if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room3topic, room3reply);
- ShowPlayerDialog(playerid, 581, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 3",String,"Select","Back");
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room3reply, sizeof(room3reply), "%s\n%s : %s",room3reply,str,inputtext);
- }
- else if(strlen(inputtext) < 4)
- {
- SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
- }
- if(strlen(inputtext) >= 15)
- {
- ShowPlayerDialog(playerid, 583, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
- }
- }
- //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
- // --> ROOM 4 <-- //
- if(dialogid == 590 ) //room 1 new topic
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 592, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room4topic);
- }
- }
- }
- if(dialogid == 591) // room1 new reply
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room4topic);
- }
- }
- }
- if(dialogid == 592) //room1 topic posted
- {
- new String[200];
- if (room4used == 1)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
- ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
- SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
- }
- else
- {
- if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
- ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
- room4used = 1;
- room4status = "{FF0800}used";
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room4topic, sizeof(room4topic), "%s : %s",str,inputtext);
- }
- else if(strlen(inputtext) < 5)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 592, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
- }
- }
- }
- if(dialogid == 593) //room2 reply posted
- {
- new String[200];
- if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room4topic, room4reply);
- ShowPlayerDialog(playerid, 591, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 4",String,"Select","Back");
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room4reply, sizeof(room4reply), "%s\n%s : %s",room4reply,str,inputtext);
- }
- else if(strlen(inputtext) < 4)
- {
- SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
- }
- if(strlen(inputtext) >= 15)
- {
- ShowPlayerDialog(playerid, 593, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
- }
- }
- //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
- // --> ROOM 5 <-- //
- if(dialogid == 600 ) //room 1 new topic
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 602, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room5topic);
- }
- }
- }
- if(dialogid == 601) // room1 new reply
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 603, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:
- {
- SendClientMessage(playerid,0xFFFFFFAA,room5topic);
- }
- }
- }
- }
- if(dialogid == 602) //room1 topic posted
- {
- new String[200];
- if (room5used == 1)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
- ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
- SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
- }
- else
- {
- if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
- ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
- room5used = 1;
- room5status = "{FF0800}used";
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room5topic, sizeof(room5topic), "%s : %s",str,inputtext);
- }
- else if(strlen(inputtext) < 5)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 602, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
- }
- }
- }
- if(dialogid == 603) //room2 reply posted
- {
- new String[200];
- if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room5topic, room5reply);
- ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 5",String,"Select","Back");
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room5reply, sizeof(room5reply), "%s\n%s : %s",room5reply,str,inputtext);
- }
- else if(strlen(inputtext) < 4)
- {
- SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
- }
- if(strlen(inputtext) >= 15)
- {
- ShowPlayerDialog(playerid, 603, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
- }
- }
- //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
- // --> ROOM 6 <-- //
- if(dialogid == 610 ) //room 1 new topic
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 612, DIALOG_STYLE_INPUT, "New Topic (128 character max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room6topic);
- }
- }
- }
- if(dialogid == 611) // room1 new reply
- {
- if(!response)
- {
- new String[271];
- format(String, sizeof(String),"{FF0000}Room 1 [Status:%s{FF0000}]\n{FF0000}Room 2 [Status:%s{FF0000}]\n{FF0000}Room 3 [Status:%s{FF0000}]\n{FF0000}Room 4 [Status:%s{FF0000}]\n{FF0000}Room 5 [Status:%s{FF0000}]\n{FF0000}Room 6 [Status:%s{FF0000}]",room1status, room2status, room3status, room4status, room5status, room6status);
- ShowPlayerDialog(playerid, 559, DIALOG_STYLE_LIST, "In-Game forum : Off Topic",String,"Select","Back");
- }
- if(response)
- {
- switch(listitem)
- {
- case 0:ShowPlayerDialog(playerid, 613, DIALOG_STYLE_INPUT, "Reply (15 characters max)", "Type your chat input here.", "Submit", "Cancel");
- case 1:SendClientMessage(playerid,0xFFFFFFAA,room6topic);
- }
- }
- }
- if(dialogid == 612) //room1 topic posted
- {
- new String[200];
- if (room6used == 1)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
- ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
- SendClientMessage(playerid,0xFFFFFFAA,"Someone has already posted a new topic here!.");
- }
- else
- {
- if(strlen(inputtext) >= 10 && strlen(inputtext) <= 128)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
- ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
- room6used = 1;
- room6status = "{FF0800}used";
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room6topic, sizeof(room6topic), "%s : %s",str,inputtext);
- }
- else if(strlen(inputtext) < 5)
- {
- SendClientMessage(playerid,0xFAFFBFAA,"Your input was too short.");
- }
- else if(strlen(inputtext) >= 128)
- {
- ShowPlayerDialog(playerid, 612, DIALOG_STYLE_INPUT, "You have exceeded the max characters limit!", "Re-Type your new topic here.", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters!");
- }
- }
- }
- if(dialogid == 613) //room2 reply posted
- {
- new String[200];
- if(strlen(inputtext) >= 4 && strlen(inputtext) <= 15)
- {
- format(String, sizeof(String),"{84C700}-Reply-\n%s\n \n%s",room6topic, room6reply);
- ShowPlayerDialog(playerid, 611, DIALOG_STYLE_LIST, "In-Game forum : Off Topic - Room 6",String,"Select","Back");
- new str[128];
- GetPlayerName(playerid, str, sizeof(str));
- format(room6reply, sizeof(room6reply), "%s\n%s : %s",room6reply,str,inputtext);
- }
- else if(strlen(inputtext) < 4)
- {
- SendClientMessage(playerid,0xFFFFFFAA,"Your input was too short.");
- }
- if(strlen(inputtext) >= 15)
- {
- ShowPlayerDialog(playerid, 613, DIALOG_STYLE_INPUT, "You exceeded max characters limit!", "Re-Type your new reply", "Submit", "Cancel");
- SendClientMessage(playerid,0xFFFFFFAA,"You exceeded the max letters limit!");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement