Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <hamsandwich>
- #include <regex>
- new sprawdzony_gracz[33], nazwa_gracza[33];
- new dp_r_id_provider;
- public plugin_init()
- {
- register_plugin("ShieldHack", "1.1", "Linux`");
- RegisterHam(Ham_Spawn, "player", "client_spawn", 1);
- dp_r_id_provider = get_cvar_pointer ("dp_r_id_provider");
- register_clcmd("say", "client_say");
- register_clcmd("say_team", "client_say");
- }
- public client_authorized(id)
- {
- get_user_name(id, nazwa_gracza, charsmax(nazwa_gracza));
- client_check2(id, nazwa_gracza);
- sprawdzony_gracz[id] = 0;
- client_spawn(id);
- }
- public client_spawn(id)
- {
- if(is_user_bot(id) || !dp_r_id_provider || task_exists(411+id))
- return;
- server_cmd("dp_clientinfo %d", id);
- server_exec();
- if(get_pcvar_num(dp_r_id_provider) == 4 && !sprawdzony_gracz[id])
- {
- client_cmd(id, "echo ^"^";^"setinfo^" revemu 1");
- set_task(1.0,"client_check", 411+id);
- }
- }
- public client_check(TASKID)
- {
- new id = TASKID-411;
- new tmp[2], reply;
- get_user_info(id, "revemu", tmp, 1);
- reply = str_to_num(tmp);
- if(!reply)
- server_cmd("kick #%d Wykryto uruchomione dodatkowe pliki .DLL!", get_user_userid(id));
- sprawdzony_gracz[id] = 1;
- }
- public client_say(id)
- {
- new message[128];
- read_args(message, charsmax(message));
- client_check2(id, message);
- }
- public client_check2(id, string[])
- {
- new Regex:result, value, error[2];
- result = regex_match(string, "([0-9].*[qwertyuiopasdfghjklzxcvbnm`,./;'-= ].*[0-9].*[qwertyuiopasdfghjklzxcvbnm`,./;'-= ].*[0-9].*[qwertyuiopasdfghjklzxcvbnm`,./;'-= ].*[0-9])", value, error, 1);
- switch(result)
- {
- case REGEX_MATCH_FAIL, REGEX_PATTERN_FAIL, REGEX_NO_MATCH:
- return PLUGIN_CONTINUE;
- }
- server_cmd("kick #%d Wykryto reklame adresu IP!", get_user_userid(id));
- return PLUGIN_HANDLED;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement