Raised This Month: $51 Target: $400
 12% 

help me please


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
3pR0
New Member
Join Date: Nov 2012
Old 11-18-2012 , 00:55   help me please
Reply With Quote #1

Hello, I would like a plugin anti advertisement on sv, more understandable plugin to stop messages from robots that enter the sv and advertise in chat (like connect www.svmeu.ro ... they give free admin etc.)

I found a plugin like that one but do not know where to get sma's how I want to modify it

This plugins works exactly as shown in picture :

Part 1: I try to advertise / say or / sayteam

[IMG]http://img716.**************/img716/7537/recwk.jpg[/IMG]

Part 2: When I block advertising ... www.sitetul.meu and instead tells me that advertising is prohibited on sv

[IMG]http://img208.**************/img208/4471/rec1qf.jpg[/IMG]

Sma's would look like this ... but not completely

HTML Code:
#include <amxmodx>
#include <amxmisc>
#include <regex>
new Regex:re, ret;


public plugin_init() {
   
   
   register_plugin("AntiReclama", "1.0", "");
   register_clcmd("say", "CheckMessage");
   register_clcmd("say_team", "CheckMessage");
   
   new err[32];
   re = regex_compile("(?:\w+\.[a-z]{2,4}\b|(?:\s*\d+\s*\.){3})", ret, err, 31, "i");
   if (re!=REGEX_OK) server_print("Error: %s (%d)", err, ret);
}

public CheckMessage(id) {
   if (id > 0 && id < 33 && !is_user_admin(id)) {
      new text[64];
      read_args(text,63);
      
      if (strlen(text) > 4) {
         new match = regex_match_c(text, re, ret);
      
         if (match > 0) {
            client_print(id, print_chat, "Publicitatea este interzisa pe acest server!");
            return PLUGIN_HANDLED;
         }
      }
   }
   return PLUGIN_CONTINUE;
}

public plugin_end() {
   regex_free(re);   
}
Missing the part where you write the words you want to block ... of the crash if you write words with space

Thank you ... and wait for your opinions .. or completing your
3pR0 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode