Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Command Blocking Script */
- /* By */
- /* SuperHelper */
- /* Pls Dont remove credits */
- /* Includes */
- #include <a_samp>
- #include <streamer>
- #include <sscanf2>
- #include <dini>
- #include <zcmd>
- #define FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- /* Colors */
- #define COLOR_DARKRED 0xAA3333FF
- #define RED 0xFF0000C8
- #define COLOR_GREY 0xAFAFAFFF
- #define COLOR_ASAY 0xFF0000FF
- #define COLOR_OSAY 0x007700FF
- #define COLOR_HSAY 0x1684CAFF
- #define COLOR_MSAY 0x1684CAFF
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_RED 0xFF0000FF
- #define COLOR_LRED 0xFF4747FF
- #define COLOR_GREEN 0x00FF00FF
- #define COLOR_BLUE 0x0000FFFF
- #define COLOR_LBLUE 0x99FFFFFF
- #define COLOR_LIGHTBLUE 0x99FFFFFF
- #define COLOR_ORANGE 0xFF9900FF
- #define COLOR_PURPLE 0xCC00DDFF
- #define COLOR_PEACH 0xFFCC66FF
- #define COLOR_SILVER 0xDDDDDDFF
- #define COLOR_WANTEDBLUE 0x0055CCFF
- #define COLOR_DARK_VIOLET 0x9400D3FF
- #define COLOR_VIP1 0x9400D3FF
- #define COLOR_HELP 0x00E5EEFF
- #define COLOR_ADMIN 0x0066FFFF
- #define COLOR_ADMIN2 0x008FD6FF
- #define COLOR_PLAYER 0xFFFF33FF
- #define COLOR_ULTRAADMIN 0x993300FF
- #define COLOR_EVENT 0x00CC66FF
- #define COLOR_VIP2 0xFF33CCFF
- #define COLOR_VIPCHAT 0xCC66CCFF
- 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("BlockedCmds/cmds.ini", cmd)) return SendClientMessage(playerid, COLOR_RED, "Error: Command Already Blocked!");
- dini_Set("BlockedCmds/cmds.ini", cmd, "Blocked");
- new string[256];
- format(string, sizeof(string), "%s has been blocked", cmd);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- CMD:blockedcmds(playerid, params[])
- {
- new strings[128], File: file = fopen("BlockedCmds/cmds.ini", io_read), admins=1;
- SendClientMessage(playerid, COLOR_ORANGE, "[Blocked Commands Of This Server]:");
- while(fread(file, strings))
- {
- format(strings, sizeof(strings), "%d) %s", admins, strings);
- SendClientMessage(playerid, COLOR_ORANGE, strings);
- admins ++;
- }
- fclose(file);
- 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("BlockedCmds/cmds.ini", cmd)) return SendClientMessage(playerid, COLOR_RED, "Error: Command isn't Blocked!");
- dini_Unset("BlockedCmds/cmds.ini", cmd);
- new string[256];
- format(string, sizeof(string), "%s has been unblocked", cmd);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
Add Comment
Please, Sign In to add comment