←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Naprawienie
Advanced Swear Filter - Kompatybilność Z A...

Zablokowany

  • +
  • -
Janczar - zdjęcie Janczar 29.12.2009

Witam,
Wrzuciłem na serwer pluginy które mają automatycznie banować, za przekleństwo na serwerze. Jest np. Advanced Swear Filter + Punishment Menu (Pobrałbym stąd ale wolałem z innego forum*), lub plugin który banuje automatycznie za reklamę. Niestety nie banuje on przez AMXBans które mam wgrane tylko bo zbanowaniu kogoś zbanowany dostaje informację - kicked and banned. Chcę aby te pluginy były kompatybilne z moim AMXBans. Serwer jest serwerem only steam.
Pozdrawiam
Użytkownik Pavulon edytował ten post 29.12.2009 23:05
* edit linka
Odpowiedz

  • +
  • -
R3X - zdjęcie R3X 30.12.2009

scripting/base_inc/action.inc

stock ActionBan( nUserID )
{
	new Float:fBanTime = float(get_cvar_num( "sv_ban_time" ))
	new szUsername[STR_T], szUserID[STR_T]
	get_user_name( nUserID, szUsername, STR_T-1 )

	if( get_cvar_num( "sv_bantype" ) == 1 )
	{
 	get_user_ip( nUserID, szUserID, 31, 1 )
 	server_cmd( "addip ^"%d^" ^"%s^";wait;writeip", floatround(fBanTime), szUserID )
	}else
	{
 	get_user_authid( nUserID, szUserID, 31 )
 	server_cmd( "banid ^"%d^" ^"%s^" kick;wait;writeid", floatround(fBanTime), szUserID )
	}
	server_cmd( "kick #%d ^"No Swearing Allowed.^"", get_user_userid( nUserID ) )


	if( fBanTime > 60.0 )
	{
 	fBanTime /= 60.0
 	// Announce Punishment
 	client_print( 0, print_chat, "%s %s Has Been Banned for Swearing for %3.1f Hours!", PLUGIN_MOD, szUsername, fBanTime )
	}else
	{
 	// Announce Punishment
 	client_print( 0, print_chat, "%s %s Has Been Banned for Swearing for %3.0f Minutes!", PLUGIN_MOD, szUsername, fBanTime )
	}
	return
}

a dokładniej
if( get_cvar_num( "sv_bantype" ) == 1 )
 	{
 	get_user_ip( nUserID, szUserID, 31, 1 )
 	server_cmd( "addip ^"%d^" ^"%s^";wait;writeip", floatround(fBanTime), szUserID )
 	}else
 	{
 	get_user_authid( nUserID, szUserID, 31 )
 	server_cmd( "banid ^"%d^" ^"%s^" kick;wait;writeid", floatround(fBanTime), szUserID )
 	}
server_cmd( "kick #%d ^"No Swearing Allowed.^"", get_user_userid( nUserID ) )

to musi się odbywać zgodnie z AMXBans, czyli

if( get_cvar_num( "sv_bantype" ) == 1 )
 	{
 	get_user_ip( nUserID, szUserID, 31, 1 )
 	}else
 	{
 	get_user_authid( nUserID, szUserID, 31 )
 	
 	}
server_cmd( "amx_ban ^"%d^" ^"%s^" ^"No Swearing Allowed^"", floatround(fBanTime), szUserID )
Odpowiedz

  • +
  • -
Janczar - zdjęcie Janczar 08.01.2010

scripting/base_inc/action.inc

stock ActionBan( nUserID )
{
	new Float:fBanTime = float(get_cvar_num( "sv_ban_time" ))
	new szUsername[STR_T], szUserID[STR_T]
	get_user_name( nUserID, szUsername, STR_T-1 )

	if( get_cvar_num( "sv_bantype" ) == 1 )
	{
 	get_user_ip( nUserID, szUserID, 31, 1 )
 	server_cmd( "addip ^"%d^" ^"%s^";wait;writeip", floatround(fBanTime), szUserID )
	}else
	{
 	get_user_authid( nUserID, szUserID, 31 )
 	server_cmd( "banid ^"%d^" ^"%s^" kick;wait;writeid", floatround(fBanTime), szUserID )
	}
	server_cmd( "kick #%d ^"No Swearing Allowed.^"", get_user_userid( nUserID ) )


	if( fBanTime > 60.0 )
	{
 	fBanTime /= 60.0
 	// Announce Punishment
 	client_print( 0, print_chat, "%s %s Has Been Banned for Swearing for %3.1f Hours!", PLUGIN_MOD, szUsername, fBanTime )
	}else
	{
 	// Announce Punishment
 	client_print( 0, print_chat, "%s %s Has Been Banned for Swearing for %3.0f Minutes!", PLUGIN_MOD, szUsername, fBanTime )
	}
	return
}

a dokładniej
if( get_cvar_num( "sv_bantype" ) == 1 )
 	{
 	get_user_ip( nUserID, szUserID, 31, 1 )
 	server_cmd( "addip ^"%d^" ^"%s^";wait;writeip", floatround(fBanTime), szUserID )
 	}else
 	{
 	get_user_authid( nUserID, szUserID, 31 )
 	server_cmd( "banid ^"%d^" ^"%s^" kick;wait;writeid", floatround(fBanTime), szUserID )
 	}
server_cmd( "kick #%d ^"No Swearing Allowed.^"", get_user_userid( nUserID ) )

to musi się odbywać zgodnie z AMXBans, czyli

if( get_cvar_num( "sv_bantype" ) == 1 )
 	{
 	get_user_ip( nUserID, szUserID, 31, 1 )
 	}else
 	{
 	get_user_authid( nUserID, szUserID, 31 )
 	
 	}
server_cmd( "amx_ban ^"%d^" ^"%s^" ^"No Swearing Allowed^"", floatround(fBanTime), szUserID )


Tak ustawiłem. Punishments.ini wygląda tak:
; Progressive Punishments System -- Punishments File

; First Offense (Gag)
1  "g"

A po przekleństwie na chacie pisze:

[AMXX] Znam wulgarne slowa! Has Been Gagged for Swearing for 120 Seconds!
[AMXX] Znam wulgarne slowa! Has Lost Cash ($1000) for Swearing

Chcę aby po przekleństwie banowało kolesia. Nie mam zamiaru męczyć się nad nimi ...
Odpowiedz

  • +
  • -
R3X - zdjęcie R3X 08.01.2010

sv_punish_single "g"
Odpowiedz

  • +
  • -
Janczar - zdjęcie Janczar 08.01.2010

sv_punish_single "g"


Gdzie to wpisać? server.cfg?

EDIT: Wpisałem i w server.cfg i w amxx.cfg i teraz po przekleństwie pisze:
Kicked :"No Swearing Allowed.

Użytkownik Janczar edytował ten post 08.01.2010 15:49
Odpowiedz
Zablokowany