Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Kultura musi być


  • Zamknięty Temat jest zamknięty
2 odpowiedzi w tym temacie

#1 Straw

    Początkujący

  • Użytkownik

Reputacja: 2
Nowy

  • Postów:19
Offline

Napisano 29.08.2008 00:03

Witam, od dawna szukałem pluginu banującego za przekleństwa wpisane na say, w końcu znalazłem taki, który w łatwy sposób można było by przerobić. Plugin anti_sayEN, banuje za text wpisany na say wyświetlany przez niektóre multihacki, chciałbym żeby banował tylko przy użyciu amxbans i żeby cvarem dało się zmienić powód bana(długość juz idzie)

Oto kod:
#include <amxmodx>
#include <amxmisc>

new cheater_banned = 0

// Cheat Messages
stock const CheatReports[128][128] 

// !!! add more to file addons/amxmodx/configs/antisay.ini !!!

/* = {

"FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX",
"Fighter FX 7.0 code by zh4r0naX and made in Spain!!!",
"My Cheater????? your is n00b!",
"hahahahaha pwNed!!! HeadShod???? yeahHh",
"Download Fighter FX 7.0 | The Best Cheat | www.darkcheats.org",
"www.DarkCheats.org | THE BEST CHEATER COMMUNITY | Visit Now!!!",
"zh4r0naX is the king coder! download cheats in www.darkcheats.org",
"Found Admin? hahahahahaha my cheater and use Fighter FX 7.0 by zh4r0naX!!!",
"[ BaDBoY ][ v.5 ] [ By: www.united-cheaters.de.gg ]",
"[BaDBoY v.4.2] [get on www.united-cheaters.net]",
".:[Emo Tear]:.",
"Hacks!->www.csbound.com",
"@ [HLGUARD] Admin, check this player (use",
"[Emo Tear] [Kills][www.axe.3dn.ru]",
"[ BaDBoY ][ v.5 ] [ By: www.cs.sushko.net ]",
"-][v][-Alien h4x v1 By $m@r7<0rE-][v][--Alive-",
"VDC: Redux - Frags:",
"W4R Hook v7 By [187ci] <:PrOdIgY:>",
"<:[-Kills",
"[ BaDBoY ][ v.5 ] [ By: www.united-cheaters.net ]",
"4uTbI TyT: http://",
"[BaDBoY v.",
"Download Alien h4x Reloaded from",
"Alien h4x pr!vate Kills" 

}
*/


// !!! add more to file addons/amxmodx/configs/antisay.ini !!!

public plugin_init()
{
  register_plugin("Cheat Messages Ban","1.4","dr.aft")

  register_clcmd("say", "CheckCheatReport")
  register_clcmd("say_team", "CheckCheatReport")

  register_cvar("anti_say_bantime", "7200") // 5 Days BAN (7200 minutes)
  register_cvar("anti_say_bantype", "2") // 3 - Kicking only 2 - AMXBANS, 1 - IP, 0 - SteamID

  set_task(1.0, "EnableAntiCheat")
}

new antisaylog[64]

public EnableAntiCheat()
{
	new antisayconfig[64]
	get_configsdir(antisayconfig, 64)
	format(antisaylog, 63, "%s/antisay.log", antisayconfig)
	
        format(antisayconfig, 63, "%s/antisay.ini", antisayconfig)
	
	new line = 0
	new textsize = 0
	new text[128]
	new tempstr[128]
	new i = 0

        if (file_exists(antisayconfig))
        {
                while(read_file(antisayconfig,line,text,255,textsize))
                {
                        format(tempstr,128,"%s",text)
                        CheatReports[i++]=tempstr
                        line++
                }
        }
}


public Ban(id)
{
	new cheatername[32], ip[32], authid[32]
	get_user_name(id, cheatername, 31)	
	get_user_ip(id, ip, 31, 1)	
	get_user_authid(id, authid, 31)

	client_print(0, print_chat, "[PINGAMES ANTICHEAT] - Player '%s' - Cheat 'MultiHack'", cheatername, get_cvar_num("anti_say_bantime"))
	switch(get_cvar_num("anti_say_bantype"))
	{
		case 0:
		server_cmd("banid %d #%d Multihack; writeid", get_cvar_num("anti_say_bantime"), get_user_userid(id))		
		case 1:
		server_cmd("addip %d %s; writeip", get_cvar_num("anti_say_bantime"), ip)		
		case 3:
		client_cmd(id, "quit")
		default:
		server_cmd("amx_ban %d #%d Multihack", get_cvar_num("anti_say_bantime"), get_user_userid(id))		
		
	}
	log_to_file(antisaylog, "^"%s^" <%s> - [%s] - Multihack", cheatername, ip, authid)
	cheater_banned = 1
}

public CheckCheatReport(id)
{
	new said[192]
	cheater_banned = 0
	new i, j
	new cheatername[32]
	get_user_name(id, cheatername, 32)
	read_args(said, 192)
	for(i = 0 ; i < sizeof (CheatReports) ; i++)
	{
 		if(containi(said, CheatReports[i][j]) != -1)
		{
			if(cheater_banned == 0)
			{
				Ban(id)						
			}
		}
	}		

}

Z góry dziękuję.
  • +
  • -
  • 0

#2 darkman

    Wszechwiedzący

  • Przyjaciel

Reputacja: 87
Zaawansowany

  • Postów:553
  • Lokalizacja:inactive
Offline

Napisano 29.08.2008 08:07

addons/amxmodx/configs/antisay.ini

tutaj ładujesz przekleństwa
#include <amxmodx>
#include <amxmisc>

new cheater_banned = 0
new pvar1
new pvar2

// Cheat Messages
stock const CheatReports[128][128]

// !!! add more to file addons/amxmodx/configs/antisay.ini !!!

/* = {

"FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX - FIGHTER FX",
"Fighter FX 7.0 code by zh4r0naX and made in Spain!!!",
"My Cheater????? your is n00b!",
"hahahahaha pwNed!!! HeadShod???? yeahHh",
"Download Fighter FX 7.0 | The Best Cheat | www.darkcheats.org",
"www.DarkCheats.org | THE BEST CHEATER COMMUNITY | Visit Now!!!",
"zh4r0naX is the king coder! download cheats in www.darkcheats.org",
"Found Admin? hahahahahaha my cheater and use Fighter FX 7.0 by zh4r0naX!!!",
"[ BaDBoY ][ v.5 ] [ By: www.united-cheaters.de.gg ]",
"[BaDBoY v.4.2] [get on www.united-cheaters.net]",
".:[Emo Tear]:.",
"Hacks!->www.csbound.com",
"@ [HLGUARD] Admin, check this player (use",
"[Emo Tear] [Kills][www.axe.3dn.ru]",
"[ BaDBoY ][ v.5 ] [ By: www.cs.sushko.net ]",
"-][v][-Alien h4x v1 By $m@r7<0rE-][v][--Alive-",
"VDC: Redux - Frags:",
"W4R Hook v7 By [187ci] <:PrOdIgY:>",
"<:[-Kills",
"[ BaDBoY ][ v.5 ] [ By: www.united-cheaters.net ]",
"4uTbI TyT: http://",
"[BaDBoY v.",
"Download Alien h4x Reloaded from",
"Alien h4x pr!vate Kills"

}
*/


// !!! add more to file addons/amxmodx/configs/antisay.ini !!!

public plugin_init()
{
	register_plugin("Cheat Messages Ban","1.4","dr.aft")
	
	register_clcmd("say", "CheckCheatReport")
	register_clcmd("say_team", "CheckCheatReport")
	
	pvar2 = register_cvar("anti_say_bantime", "7200") // 5 Days BAN (7200 minutes)
	pvar1 = register_cvar("amx_banreason", "Przeklinasz")
	
	set_task(1.0, "EnableAntiCheat")
}

new antisaylog[64]

public EnableAntiCheat()
{
	new antisayconfig[64]
	get_configsdir(antisayconfig, 64)
	format(antisaylog, 63, "%s/antisay.log", antisayconfig)
	
	format(antisayconfig, 63, "%s/antisay.ini", antisayconfig)
	
	new line = 0
	new textsize = 0
	new text[128]
	new tempstr[128]
	new i = 0
	
	if (file_exists(antisayconfig))
	{
		while(read_file(antisayconfig,line,text,255,textsize))
		{
			format(tempstr,128,"%s",text)
			CheatReports[i++]=tempstr
			line++
		}
	}
}


public Ban(id)
{
	new cheatername[32], ip[32], authid[32], reason[32]
	get_user_name(id, cheatername, 31)   
	get_user_ip(id, ip, 31, 1)   
	get_user_authid(id, authid, 31)
	get_pcvar_string(pvar1, reason, 31)
	client_print(0, print_chat, "[AntyPrzeklinacz] - Gracz '%s' - Powod '%s' - Czas '%d'", cheatername, reason, get_pcvar_num(pvar2))
	server_cmd("amx_ban %d #%d %s", get_cvar_num("anti_say_bantime"), get_user_userid(id), reason)
	log_to_file(antisaylog, "^"%s^" <%s> - [%s] - Multihack", cheatername, ip, authid)
	cheater_banned = 1
}

public CheckCheatReport(id)
{
	new said[192]
	cheater_banned = 0
	new i, j
	new cheatername[32]
	get_user_name(id, cheatername, 32)
	read_args(said, 192)
	for(i = 0 ; i < sizeof (CheatReports) ; i++)
	{
		if(containi(said, CheatReports[i][j]) != -1)
		{
			if(cheater_banned == 0)
			{
				Ban(id)                       
			}
		}
	}       
	
}

cvar do regulacji powodu amx_banreason
  • +
  • -
  • 0

#3 Straw

    Początkujący

  • Autor tematu
  • Użytkownik

Reputacja: 2
Nowy

  • Postów:19
Offline

Napisano 29.08.2008 12:37

Dziękuję bardzo, wcześniej sam przerobiłem ten plugin lecz nie działał do końca poprawnie, teraz działa bez zarzutów. Oczywiście [+]
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych