Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "BlockAds"
- #define AUTHOR "Andrei."
- #define VERSION "1.0"
- new ads[][] =
- {
- "wwwgooglecom"
- }
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd("say", "hookSay");
- }
- public hookSay(id)
- {
- new text[192];
- new alphaText[192]
- new len = strlen(text);
- new pos = 0;
- for (new i=0; i<len; ++i)
- {
- if (isalpha(text[i]))
- {
- alphaText[pos++] = text[i];
- }
- }
- read_args(text, 192)
- remove_quotes(text)
- new bool:isAd = false;
- for (new i=0; i<sizeof(ads); ++i)
- {
- if (containi(text, ads[i]))
- {
- isAd = true;
- break;
- }
- }
- return isAd? PLUGIN_HANDLED : PLUGIN_CONTINUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement