Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ////////////////////// ///////////////////
- // // // //
- // // // //
- // // // //
- // // // //
- // // // //////
- ///////////////////// ////////////
- // // // //
- // // // //
- // // // //
- // // // //
- // // // //
- ///////////////////// // //
- BULLET RAJA PRESENTS BUG REPORT SYSTEM
- */
- #define FILTERSCRIPT
- /****** INCLUDES *****/
- #include <a_samp>
- #include <sscanf2>
- #include <zcmd>
- #include <dini>
- #define COLOR_YELLOW 0xFFFF00FF
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Bug Report System By BulletRaja");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- CMD:reportbug(playerid, params[])
- {
- new sstring[256], reason[128], playername[25], str[256];
- if (sscanf(params, "s[128]", reason)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /reportbug [bug]");
- GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
- format(str, sizeof(str), "You Have Reported: %s", reason);
- SendClientMessage(playerid, COLOR_YELLOW, str);
- format(sstring, sizeof(sstring), "%s has reported bug - %s.\r\n", playername, reason);
- format(str, sizeof(str), "Bug Log: %s has reported bug - %s.", playername, reason);
- SendClientMessageToAll(COLOR_YELLOW, str);
- printf("[ReportBug] %s has reported bug - %s.", playername, reason);
- new File: file = fopen("bugreport.cfg", io_append);
- fwrite(file, sstring);
- fclose(file);
- return 1;
- }
- CMD:checkbugs(playerid, params[])
- {
- if(IsPlayerAdmin(playerid)) return 0;
- new strings[128], File: file = fopen("bugreport.cfg", io_read), idxx=1;
- SendClientMessage(playerid, COLOR_YELLOW, "[BugReports]:");
- while(fread(file, strings))
- {
- format(strings, sizeof(strings), "%d) %s", idxx, strings);
- SendClientMessage(playerid, COLOR_YELLOW, strings);
- idxx ++;
- }
- fclose(file);
- return 1;
- }
Add Comment
Please, Sign In to add comment