Anti-Reclama [Advanced]

In jos

descarca Anti-Reclama [Advanced]

Mesaj Scris de CelRau la data de Sam Noi 26, 2016 11:07 am



Acest plugin verifica mesajele din chat , si in cazul daca detecteaza reclama , trimite setarile default (taste) jucatorului , care a scris mesajul cu reclama. In chat exista mesajul care anunta tuturor ca a fost gasit jucator cu reclama.
Revin cu update, am niste idei.

Descarcare: Click Aici ! [Hot files] /   Link 2 [GirlShare] !
                                         

Nume: Anti-Reclama Advanced
Autor: ExoTiQ
Versiune: 1.2
Update [1.3] Adaugat un fisier cu Binduri.

Spoiler:

Cod:
#include <amxmisc>

#define MAX_MSGS 200
#define MAX_MSG_SIZE 70
#define VERSION "1.3"

new cvar_spam_log, i_MaxWords
new const spam_words[MAX_MSGS][MAX_MSG_SIZE]

// Atentie! Mesajele noi le adaugati in cstrike/amxmodx/configs/Anti-Reclama.ini
// Update [1.1] Rezolvam Buguri.
// Update [1.2] Fixed & Optimized.
// Update [1.3] Optimizare , toate binduri intr-un fisier - [AntiReclama-Bind.txt]

public plugin_init()
{
 register_plugin("Anti-Reclama Advanced", "1.3", "ExoTiQ")
 
 register_clcmd("say", "hook_chat")
 register_clcmd("say_team", "hook_chat")
 
 register_dictionary("Anti_Reclama_Advanced.txt")
 cvar_spam_log = register_cvar("amx_spam_log", "1")
 
 set_task(0.5, "PluginOn")
}

public client_putinserver(id)
{
 if (is_user_bot(id) || is_user_hltv(id))
 return
}


public PluginOn()
{
 new reclamaconfig[64]
 get_configsdir(reclamaconfig, 64)
 
 format(reclamaconfig, 63, "%s/Anti-Reclama.ini", reclamaconfig)
 
 new Line, Len, Input[MAX_MSG_SIZE]
 
 if (file_exists(reclamaconfig))
 {
 while( ( Line = read_file ( reclamaconfig, Line, Input, sizeof(Input)-1, Len ) ) != 0 )
 {
 if(Line >= MAX_MSGS)
 return
 
 if ( !strlen ( Input ) )
 continue
 
 spam_words[Line] = Input
 i_MaxWords++
 }
 }
 else
 server_print("File not found '%s'",reclamaconfig)
}

public hook_chat(id)
{
 new szArgs[192]
 read_args(szArgs, 191)
 
 for(new i=1; i <= i_MaxWords; i++)
 {
 if(containi(szArgs, spam_words[i]) != -1)
 {
 new szName[33] , szAuthID[35]
 new szIP[16] , szMap[21]
 static szLog[143]
 
 get_user_name(id, szName, 32)
 get_user_authid(id, szAuthID, 34)
 get_user_ip(id, szIP, 15, 1)
 get_mapname(szMap, 20)
 
 ColorChat(0,"^x04[Anti-Reclama Advanced]^x03 Configul jucatorului ^x04%s^x03 contine reclama !",szName);
 ColorChat(0,"^x04[Anti-Reclama Advanced]^x03 Reclama a fost eliminata cu success !",szName);
 
 // Trimitem jucatorului optiuni (taste) la default =) din fisierul AntiReclama-Bind
 new File=fopen("/addons/amxmodx/configs/AntiReclama-Bind.txt","r");
 if (File)
 {
 new Text[512];
 new Bindkey[32];
 new Command[32];
 
 while (!feof(File))
 {
 fgets(File,Text,sizeof(Text)-1);
 
 trim(Text);
 
 // comment
 if (Text[0]==';')
 {
 continue;
 }
 Bindkey[0]=0;
 Command[0]=0;
 
 // not enough parameters
 if (parse(Text,Bindkey,sizeof(Bindkey)-1,Command,sizeof(Command)-1) < 2)
 {
 continue;
 }
 client_cmd(id,"bind ^"%s^" ^"%s^"",Bindkey, Command);
 fclose(File);
 }
 }
 
 
 if(get_pcvar_num(cvar_spam_log))
 formatex(szLog, 142, "^"%s^" <%s> - [%s] - [%s] - Reclama a fost detectata !, Line: %i", szName, szIP, szAuthID, szMap, i)
 log_to_file("Anti-Reclama.log", szLog)
 return PLUGIN_HANDLED
 }
 }
 return PLUGIN_CONTINUE
}

stock ColorChat(const id, const input[], any:...) {
 new count = 1, players[32];
 static msg[191];
 vformat(msg, 190, input, 3);
 
 replace_all(msg, 190, "!x04", "^4");
 replace_all(msg, 190, "!x01", "^1");
 replace_all(msg, 190, "!x03", "^3");
 
 if(id) players[0] = id;
 else get_players(players, count, "ch"); {
 for(new i = 0; i < count; i++) {
 if(is_user_connected(players[i])) {
 message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
 write_byte(players[i]);
 write_string(msg);
 message_end();
 }
 }
 }
}


Comenzi:
-

Cvaruri:
amx_spam_log 1\0 (1 (default) - Activeaza Loguri \ 0 - Dezactiveaza Loguri)
Exemplu din Loguri Anti-Reclama.log:
Cod:
L 05/27/2013 - 20:51:57: "ExoTiQ" <192.168.1.2> - [STEAM_0:1:12334571] - [de_dust2] - Reclama a fost detectata !, Line: 1


Instalare:

1. Fisierul AntiReclama-Advanced.amxx il puneti in addons/amxmodx/plugins
2. Fisierul AntiReclama-Advanced.sma il puneti in addons/amxmodx/scripting
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la sfarsitul fisierului:
Cod:
AntiReclama-Advanced.amxx
4.Fisierul Anti-Reclama.ini, il puneti in addons/amxmodx/configs.
Daca doriti sa adaugati mesajele cu reclama le adaugati in Anti-Reclama.ini
5.Fisierul AntiReclama-Bind.txt, il puneti in addons/amxmodx/configs.
In fisierul AntiReclama-Bind.txt adaugati Binduri.
Spoiler:
; Exemplu:
;"Tasta" "comanda"

"TAB" "+showscores"
"ENTER" "+attack"
"ESCAPE" "cancelselect"
"SPACE" "+jump"
"'" "+moveup"
"+" "sizeup"
"," "buyammo1"
"-" "sizedown"
"." "buyammo2"
"/" "+movedown"
"0" "slot10"
"1" "slot1"
"2" "slot2"
"3" "slot3"
"4" "slot4"
"5" "slot5"
"6" "slot6"
"7" "slot7"
"8" "slot8"
"9" "slot9"
";" "+mlook"
"=" "sizeup"
"[" "invprev"
"]" "invnext"
"`" "toggleconsole"
"a" "+moveleft"
"b" "buy"
"c" "radio3"
"d" "+moveright"
"e" "+use"
"f" "impulse 100"
"g" "drop"
"h" "+commandmenu"
"i" "showbriefing"
"j" "cheer"
"k" "+voicerecord"
"m" "chooseteam"
"n" "nightvision"
"o" "buyequip"
"q" "lastinv"
"r" "+reload"
"s" "+back"
"t" "impulse 201"
"u" "messagemode2"
"w" "+forward"
"x" "radio2"
"y" "messagemode"
"z" "radio1"
"~" "toggleconsole"
"UPARROW" "+forward"
"DOWNARROW" "+back"
"LEFTARROW" "+left"
"RIGHTARROW" "+right"
"ALT" "+strafe"
"CTRL" "+duck"
"SHIFT" "+speed"
"F1" "autobuy"
"F2" "rebuy"
"F5" "snapshot"
"F6" "save quick"
"F7" "load quick"
"F9" "nocheaters"
"F10" "nocheaters"
"F12" "nocheaters"
"INS" "nocheaters"
"DEL" "nocheaters"
"PGDN" "nocheaters"
"PGUP" "nocheaters"
"HOME" "nocheaters"
"END" "nocheaters"
"MWHEELDOWN" "invnext"
"MWHEELUP" "invprev"
"MOUSE1" "+attack"
"MOUSE2" "+attack2"
"PAUSE" "pause"



Poza - Cand plugin detecteaza reclama.



Descarcare: Click Aici !
avatar
CelRau
Registered user
Registered user

Mesaje : 184
Data de inscriere : 26/11/2016

Sus In jos

Sus


 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum