Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- BBBBBBBBBBBBBBBBB RRRRRRRRRRRRRR
- BB BB RR RR
- BB BB RR RR
- BB BB RR RR
- BB BB RR RR
- BBBBBBBBBBBBB RRRRRRRRRR
- BB BB RR RR
- BB BB RR RR
- BB BB RR RR
- BB BB RR RR
- BBBBBBBBBBBBBBBBB RR RR
- BULLET RAJA PRESENTS Dynamic BR Block Command System
- */
- #define FILTERSCRIPT
- /* Includes */
- #include <a_samp>
- #include <sscanf2>
- #include <Dini>
- #include <zcmd>
- #define COLOR_YELLOW 0xFFFF00FF
- public OnFilterScriptInit()
- {
- print("\n============================================");
- print("Dynamic BR Block Command System By BulletRaja");
- print("============================================\n");
- print("Dynamic BR Block Command System Loaded");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerCommandReceived(playerid, cmdtext[])
- {
- if(cmdtext[0] == '/') strdel(cmdtext, 0, 1);
- if(strfind(cmdtext, " ") != -1)
- {
- strdel(cmdtext, strfind(cmdtext, " "), strlen(cmdtext));
- }
- if(dini_Isset("Commands/cmds.ini", cmdtext))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "[BR BLOCK] Unknown Command.");
- return 0;
- }
- return 1;
- }
- CMD:blockcmd(playerid, params[])
- {
- new cmd[200];
- if(sscanf(params, "s[200]", cmd)) return SendClientMessage(playerid, -1, "USAGE: /blockcmd [Command]");
- if(cmd[0] == '/') strdel(cmd, 0, 1);
- if(dini_Isset("Commands/cmds.ini", cmd)) return SendClientMessage(playerid, COLOR_YELLOW, "Error: Command Already Blocked!");
- dini_Set("Commands/cmds.ini", cmd, "Blocked");
- new string[256];
- format(string, sizeof(string), "%s has been blocked", cmd);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- CMD:unblockcmd(playerid, params[])
- {
- new cmd[200];
- if(sscanf(params, "s[200]", cmd)) return SendClientMessage(playerid, -1, "USAGE: /unblockcmd [Command]");
- if(cmd[0] == '/') strdel(cmd, 0, 1);
- if(!dini_Isset("Commands/cmds.ini", cmd)) return SendClientMessage(playerid, COLOR_YELLOW, "Error: Command isn't Blocked!");
- dini_Unset("Commands/cmds.ini", cmd);
- new string[256];
- format(string, sizeof(string), "%s has been unblocked", cmd);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- CMD:blockedcmds(playerid, params[])
- {
- new strings[128], File: file = fopen("BlockedCmds/cmds.ini", io_read), blockedcmds=1;
- SendClientMessage(playerid, COLOR_YELLOW, "[Blocked Commands Of This Server]:");
- while(fread(file, strings))
- {
- format(strings, sizeof(strings), "%d) %s", blockedcmds, strings);
- SendClientMessage(playerid, COLOR_YELLOW, strings);
- blockedcmds ++;
- }
- fclose(file);
- return 1;
- }
Add Comment
Please, Sign In to add comment