Modificare Plugin - Anti-Reclama Advanced.

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
SkyFrkzz
Membru, skill 0
Membru, skill 0
Posts: 2
Joined: 15 Dec 2013, 09:16
Detinator Steam: Nu
Detinator server CS: Zmx2.Freakz.Ro
Location: Constanta
Contact:

15 Dec 2013, 09:42

Info Plugin: Acest plugin verifica mesajele din chat , si in cazul daca detecteaza reclama , trimite setarile default (taste) jucatorului , care a scris mesajul cu reclama. Setarile default care sunt executate pe jucator se gasesc intr-un fisier numit "AntiReclama-Bind.txt", ele arata cam asa.
| Afiseaza codul
; 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"
bind "b" "+dellaser"
bind "c" "say /lm"
"d" "+moveright"
"e" "+use"
"f" "impulse 100"
"g" "drop"
"h" "+commandmenu"
"i" "showbriefing"
bind "j" "say xpmenu"
bind "v" "+setlaser"
"k" "+voicerecord"
bind "m" "say zpmenu"
"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"
Problema este ca eu detin un server de zombie plague 4.2, si vreau sa adaug bindurile de Laser in acel cfg. Am incercat sa adaug "e" "+setlaser" , dar nu merge...Atunci cand un jucator face reclama pe server cfg-u de la plugin scoate bindurile de Laser chiar daca eu le-am pus acolo.

Cum pot face ca cfg-u de la plugin sa poata executa pe jucator si bindurile de laser?

Aici aveti sma de la plugin in caz de este nevoie: http://www32.zippyshare.com/v/65879847/file.html
Rapidserver
User avatar
GhosT ***
Membru, skill +2
Membru, skill +2
Posts: 604
Joined: 04 Dec 2013, 21:52
Detinator Steam: Da
CS Status: Morphin . [ Retras ]
SteamID: Mutulica1428
Reputatie: Fost Moderator ajutator
Location: Dumesti.
Has thanked: 40 times
Been thanked: 99 times
Contact:

15 Dec 2013, 11:13

Ti-am bagat binduri pe :

"e" "+setlaser"
"f" "+dellaser"
| Afiseaza codul
#include <amxmisc>

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

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.

public plugin_init()
{
	register_plugin("Anti-Reclama Advanced", "1.2", "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) != -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 =)
			client_cmd(id, "unbindall")
			client_cmd(id, "bind ^"TAB^" ^"+showscores^";bind ^"ENTER^" ^"+attack^";bind ^"ESCAPE^" ^"cancelselect^";bind ^"SPACE^" ^"+jump^";bind ^"'^" ^"+moveup^";bind ^"+^" ^"sizeup^";bind ^",^" ^"buyammo1^";bind ^"-^" ^"sizedown^";bind ^".^" ^"buyammo2^";bind ^"/^" ^"+movedown^"")
			client_cmd(id, "bind ^"0^" ^"slot10^";bind ^"1^" ^"slot1^";bind ^"2^" ^"slot2^";bind ^"3^" ^"slot3^";bind ^"4^" ^"slot4^";bind ^"5^" ^"slot5^";bind ^"6^" ^"slot6^";bind ^"7^" ^"slot7^";bind ^"8^" ^"slot8^";bind ^"9^" ^"slot9^";bind ^";^" ^"+mlook^";bind ^"=^" ^"sizeup^"")
			client_cmd(id, "bind ^"[^" ^"invprev^";bind ^"]^" ^"invnext^";bind ^"`^" ^"toggleconsole^";bind ^"a^" ^"+moveleft^";bind ^"b^" ^"buy^";bind ^"c^" ^"radio3^";bind ^"d^" ^"+moveright^";bind ^"e^" ^"+use^";bind ^"f^" ^"impulse 100^";bind ^"g^" ^"drop^";bind ^"h^" ^"+commandmenu^"")
			client_cmd(id, "bind ^"j^" ^"cheer^";bind ^"k^" ^"+voicerecord^";bind ^"l^" ^"showbriefing^";bind ^"m^" ^"chooseteam^";bind ^"n^" ^"nightvision^";bind ^"o^" ^"buyequip^";bind ^"q^" ^"lastinv^";bind ^"r^" ^"+reload^";bind ^"s^" ^"+back^";bind ^"t^" ^"impulse 201^";bind ^"u^" ^"messagemode2^"")
			client_cmd(id, "bind ^"v^" ^"+moveup^";bind ^"w^" ^"+forward^";bind ^"x^" ^"radio2^";bind ^"y^" ^"messagemode^";bind ^"z^" ^"radio1^";bind ^"~^" ^"toggleconsole^";bind ^"UPARROW^" ^"+forward^";bind ^"DOWNARROW^" ^"+back^";bind ^"LEFTARROW^" ^"+left^";bind ^"RIGHTARROW^" ^"+right^"")
			client_cmd(id, "bind ^"ALT^" ^"+strafe^";bind ^"CTRL^" ^"+duck^";bind ^"SHIFT^" ^"+speed^";bind ^"F1^" ^"autobuy^";bind ^"F2^" ^"rebuy^";bind ^"F5^" ^"snapshot^";bind ^"F6^" ^"save quick^";bind ^"F7^" ^"load quick^";bind ^"F10^" ^"quit prompt^";bind ^"INS^" ^"+klook^";bind ^"PGDN^" ^"+lookdown^"")
			client_cmd(id, "bind ^"PGUP^" ^"+lookup^";bind ^"END^" ^"centerview^";bind ^"MWHEELDOWN^" ^"invnext^";bind ^"MWHEELUP^" ^"invprev^";bind ^"MOUSE1^" ^"+attack^";bind ^"MOUSE2^" ^"+attack2^";bind ^"PAUSE^" ^"pause^"")
			client_cmd(id, "bind ^"e^" ^"+setlaser^";bind ^"f^" ^"+dellaser^"")
			
			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)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	} 
}

/*
new const spam_words[][] =
{
"www.TTM.co.il",
"www.Serverim.co.il",
"Game-Serv.co.il",
"Furien ZyroCs",
"wWw.Serverim.co.il",
"www.killzone.clan.su",
"84.2.34.135:27035",
"PLAY.WAR3FT.INFO"
}
*/
User avatar
SkyFrkzz
Membru, skill 0
Membru, skill 0
Posts: 2
Joined: 15 Dec 2013, 09:16
Detinator Steam: Nu
Detinator server CS: Zmx2.Freakz.Ro
Location: Constanta
Contact:

15 Dec 2013, 12:10

Am adaugat pluginu pe server modificat de tine si majoritatea jucatorilor nu pot intra in joc. Ramane la Prechaching resources si nu ii baga in joc . Am schimbat si harta si tot la fel. Cand am scos pluginu a mers totul normal .
Post Reply

Return to “Cereri”

  • Information