Raised This Month: $51 Target: $400
 12% 

AMX SSBan v2.6 [UPDATE: 10.Jul.2010]


Post New Thread Reply   
 
Thread Tools Display Modes
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-14-2015 , 18:06   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #581

Quote:
Originally Posted by Re4me View Post
Can I use it with Amxbans 6.13?
I don't see why it wouldn't. However, you will need to compile it your self. Download the source code (.sma file) change "AMXBANS 0" to "AMXBANS 1". Then install it on your server like any other plugin.
__________________
fysiks is offline
Re4me
Junior Member
Join Date: Jan 2014
Old 03-10-2015 , 12:09   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #582

The plugin works well, but there is one problem.. when someone use the command "amx_ss" server crashes.
The plugin doesn't show any errors with -debug.

Server build 6153, AMXX 1.8.3, Amxbans 6.13.
Re4me is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-10-2015 , 19:54   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #583

Does it crash if you use AMX Mod X 1.8.2?
__________________
fysiks is offline
ciprulz
Junior Member
Join Date: May 2015
Location: Madrid
Old 05-26-2015 , 08:01   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #584

Hi there

Can be integrated AMX SSBban with this plugin? I only need to make screen shot when i use amx_ban from this plugin below:


Code:
/*
*********************************************************************************
*
*   ACP Bans v1.2
*   Last Update: 31/10/2012
*   
*
*   
*   
*
*
*********************************************************************************
*/

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <regex>
#include <sqlx>
#include <time>
#include <acp>
#include <chatcolor>

#define PLUGIN_NAME "[ACP] Bans"
#define AUTHOR "Hafner"
#define VERSION "1.2"

#include "acp/bans_vars.inl"
#include "acp/bans_init.inl"
#include "acp/bans_checkSubnet.inl"
#include "acp/bans_checkPlayer.inl"
#include "acp/bans_menu.inl"
#include "acp/bans_cmd.inl"
#include "acp/bans_search.inl"

public plugin_init()
{
	register_plugin(PLUGIN_NAME, VERSION, AUTHOR)
	register_cvar("acp_bans_version", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)

	register_dictionary("acp_bans.txt")
	register_dictionary("common.txt")
	register_dictionary("time.txt")

	register_concmd("amx_reloadreasons", "reasonReload", ADMIN_CFG)

	register_clcmd("amx_banmenu", "cmdBanMenu", ADMIN_BAN, "- displays banmenu")
	register_clcmd("acp_custombanreason", "setCustomBanReason", ADMIN_BAN, "- configures custom ban message")
	register_clcmd("amx_banhistorymenu", "cmdBanhistoryMenu", ADMIN_BAN, "- displays banhistorymenu")
	
	register_menucmd(register_menuid("Ban Menu"), 1023, "actionBanMenu")
	register_menucmd(register_menuid("Ban Reason Menu"), 1023, "actionBanMenuReason")
	register_menucmd(register_menuid("Banhistory Menu"), 1023, "actionBanhistoryMenu")

	g_coloredMenus = colored_menus()
	g_MyMsgSync = CreateHudSyncObj()

	pcvar_debug = register_cvar("acp_debug", "1")
	pcvar_steam_validated = register_cvar("acp_steam_validated", "1")
	pcvar_server_nick = register_cvar("acp_servernick", "")
	pcvar_complainurl = register_cvar("acp_complain_url", "url page")
	pcvar_banhistmotd_url = register_cvar("acp_banhistmotd_url","url_where_findex.php")
	pcvar_show_name_evenif_mole = register_cvar("acp_show_name_evenif_mole", "1")
	pcvar_firstBanmenuValue = register_cvar("acp_first_banmenu_value", "5")
	pcvar_consoleBanMax = register_cvar("acp_consolebanmax", "1440")
	pcvar_higher_ban_time_admin = register_cvar("acp_higher_ban_time_admin", "n")
	pcvar_admin_mole_access = register_cvar("acp_admin_mole_access", "r")
	pcvar_show_in_hlsw = register_cvar("acp_show_in_hlsw", "1")
	pcvar_show_hud_messages = register_cvar("acp_show_hud_messages", "1")
	pcvar_add_mapname_in_srvname = register_cvar("acp_add_mapname_in_servername", "0")
	pcvar_steam_immune = register_cvar("acp_steam_immune", "1")
	pcvar_check_url = register_cvar("acp_check_url", "")
	pcvar_check_wait = register_cvar("acp_check_wait", "8.0")
	pcvar_serverip = register_cvar("acp_serverip", "")

	pcvar_sql_host = register_cvar("acp_sql_host", "")
	pcvar_sql_user = register_cvar("acp_sql_user", "")
	pcvar_sql_pass = register_cvar("acp_sql_pass", "")
	pcvar_sql_db = register_cvar("acp_sql_db", "")
	
	register_concmd("amx_ban", "cmdBan", ADMIN_BAN, "<time in mins> <steamID, nickname, #authid> <reason>")
	register_srvcmd("amx_ban", "cmdBan", -1, "<time in min> <steamID, nickname, #authid> <reason>")
	register_concmd("amx_banip", "cmdBan", ADMIN_BAN, "<time in mins> <steamID, nickname, #authid> <reason>")
	register_srvcmd("amx_banip", "cmdBan", -1, "<time in mins> <steamID, nickname, #authid> <reason>")
	register_concmd("amx_unban", "cmdUnBanBlock", ADMIN_BAN, "<steamID>")
	register_srvcmd("amx_unban", "cmdUnBanBlock", -1, "<steamID>")
	register_concmd("amx_find", "amx_find", ADMIN_BAN, "<steamID or IP>")
	register_srvcmd("amx_find", "amx_find", -1, "<steamID or IP>")
	register_concmd("amx_findex", "amx_findex", ADMIN_BAN, "<steamID or IP>")
	register_srvcmd("amx_findex", "amx_findex", -1, "<steamID or IP>")
	register_srvcmd("amx_list", "cmdLst", -1, "Displays playerinfo")
	register_srvcmd("amx_sethighbantimes", "setHighBantimes")
	register_srvcmd("amx_setlowbantimes", "setLowBantimes")

	register_forward(FM_Voice_SetClientListening, "fwd_voice_setclientlistening")

	new configsDir[64]
	get_configsdir(configsDir, 63)

	server_cmd("exec %s/acp/sql.cfg", configsDir)	
	server_cmd("exec %s/acp/general.cfg", configsDir)

	new configfile[128]
	formatex(configfile, 127, "%s/acp/bans.cfg", configsDir)
	
	if(file_exists(configfile))
	{
		server_cmd("exec %s", configfile)
	}
	else
	{
		loadDefaultBantimes(0)
		log_amx("[EGC Bans] Could not find general.cfg, loading default bantimes")
	}

	new regerror[2];

	if( get_pcvar_num(pcvar_steam_validated) )
		g_SteamID_pattern = regex_compile(REGEX_STEAMID_PATTERN_LEGAL, g_regex_return, regerror, sizeof(regerror) - 1)
	else
		g_SteamID_pattern = regex_compile(REGEX_STEAMID_PATTERN_ALL, g_regex_return, regerror, sizeof(regerror) - 1)	
}

public SetMotd()
{
	new url[128]
	get_pcvar_string(pcvar_check_url, url, 127)
	server_cmd("motdfile motd.txt")
	server_cmd("motd_write <html><meta http-equiv=^"Refresh^" content=^"0; URL=%s^"><head><title>CStrike MOTD</title></head><body bgcolor=^"black^" scroll=^"yes^"></body></html>", url)

	return PLUGIN_HANDLED
}

public plugin_cfg()
{
	set_task(0.5, "SetMotd")
}

public acp_sql_initialized(Handle:sqlTuple)
{
	if( g_SqlX != Empty_Handle )
	{
		log_amx("[EGC Bans] DB Info Tuple from acp_general initialized twice!")
		return PLUGIN_HANDLED
	}
	
	g_SqlX = sqlTuple

	if ( get_pcvar_num(pcvar_debug) >= 1 )
		log_amx("[ACP Bans DEBUG] Received DB Info Tuple from acp_general: %d", sqlTuple)

	if ( g_SqlX == Empty_Handle )
	{
		log_amx("[EGC Bans] DB Info Tuple from acp_bans is empty! Trying to get a valid one")

		new host[32], user[32], pass[32], db[32]
		get_pcvar_string(pcvar_sql_host, host, 31);
		get_pcvar_string(pcvar_sql_user, user, 31);
		get_pcvar_string(pcvar_sql_pass, pass, 31);
		get_pcvar_string(pcvar_sql_db, db, 31);
		
		g_SqlX = SQL_MakeDbTuple(host, user, pass, db)
	}

	set_task(0.1, "banmod_online")
	set_task(0.2, "fetchReasons")
	set_task(2.0, "addBanhistMenu")

	return PLUGIN_CONTINUE
}

public addBanhistMenu()
	AddMenuItem("Banhistory Menu", "amx_banhistorymenu", ADMIN_BAN, PLUGIN_NAME)

public client_connect(id)
{
	if( (id > 0 || id < 32) && is_user_connected(id) )
	{
		isallowed[id] = false
		g_lastCustom[id][0] = '^0'
		g_inCustomReason[id] = 0
		g_player_flagged[id] = false
		g_being_banned[id] = false
	}	
}

public client_disconnect(id)
{
	g_lastCustom[id][0] = '^0'
	g_inCustomReason[id] = 0
	g_player_flagged[id] = false
	g_being_banned[id] = false
	isallowed[id] = false
}

public client_authorized(id)
{
	if(g_SqlX == Empty_Handle)
	{
		set_task(2.0,"client_authorized",id)
		return PLUGIN_HANDLED
	}

	set_task(get_pcvar_float(pcvar_check_wait),"check_player",id)
	set_task(get_pcvar_float(pcvar_check_wait),"mic_allowed",id)

	return PLUGIN_CONTINUE
}

public mic_allowed(id)
{
	isallowed[id] = true
}

public fwd_voice_setclientlistening(receiver, id)
{
	if(!is_user_connected(receiver) || !is_user_connected(id) || receiver == id)
		return FMRES_IGNORED;
		
	if(!isallowed[id])
	{
		engfunc(EngFunc_SetClientListening, receiver, id, 0);
		return FMRES_SUPERCEDE;
	}
	
	return FMRES_IGNORED;
}  

public client_putinserver(id)
{
	if(g_SqlX == Empty_Handle)
	{
		set_task(5.0,"client_putinserver",id)
		return PLUGIN_HANDLED
	}

	return PLUGIN_CONTINUE
}

public delayed_kick(id_str[])
{
	new player_id = str_to_num(id_str)
	new userid = get_user_userid(player_id)
	new kick_message[128]
	format(kick_message,127,"%L", LANG_PLAYER,"KICK_MESSAGE")

	if ( get_pcvar_num(pcvar_debug) == 1 )
		log_amx("[ACP Bans DEBUG] Delayed Kick ID: <%s>", id_str)

	server_cmd("kick #%d  %s", userid, kick_message)

	return PLUGIN_CONTINUE
}

/*********    This is used by live ban on the webpages     ************/
public cmdLst(id,level,cid)
{
	new players[32], inum, authid[32], name[32], ip[50], flags, sflags[32]

	get_players(players, inum)
	console_print(id, "playerinfo")

	for(new a = 0; a < inum; a++)
	{
		get_user_ip(players[a], ip, 49, 1)
		get_user_authid(players[a], authid, 31)
		get_user_name(players[a], name, 31)
		flags = get_user_flags(players[a])
		get_flags(flags, sflags, 31)
		console_print(id, "#WM#%s#WMW#%s#WMW#%s#WMW#%s#WMW#%i#WMW#", name, authid, ip, sflags, acp_get_player_auth(players[a]))
	}

	return PLUGIN_HANDLED
}

public get_higher_ban_time_admin_flag()
{
	new flags[24]
	get_pcvar_string(pcvar_higher_ban_time_admin, flags, 23)
	
	return(read_flags(flags))
}

public get_admin_mole_access_flag()
{
	new flags[24]
	get_pcvar_string(pcvar_admin_mole_access, flags, 23)
	
	return(read_flags(flags))
}

public locate_player(id, identifier[])
{
	g_ban_type = "S"

	// Check based on steam ID
	new player = find_player("c", identifier)

	// Check based on a partial non-case sensitive name
	if (!player) {
		player = find_player("bl", identifier)

		if (player)
			g_ban_type = "N"
	}

	if (!player) {
		// Check based on IP address
		player = find_player("d", identifier)

		if (player)
			g_ban_type = "SI"
	}

	// Check based on user ID
	if ( !player && identifier[0]=='#' && identifier[1] ) {
		player = find_player("k", str_to_num(identifier[1]))
	}

	if (player)
	{
		/* Check for immunity */
		if (get_user_flags(player) & ADMIN_IMMUNITY) {
			new name[32]
			get_user_name(player, name, 31)
			if( id == 0 )
				server_print("[EGC Bans] Client ^"%s^" has immunity", name)
			else
				console_print(id,"[EGC Bans] ^"%s^" has immunity", name)

			return -1
		}
		/* Check for a bot */
		else if (is_user_bot(player)) {
			new name[32]
			get_user_name(player, name, 31)
			if( id == 0 )
				server_print("[EGC Bans] Client ^"%s^" is a bot", name)
			else
				console_print(id,"[EGC Bans] Client ^"%s^" is a bot", name)
			return -1
		}

	}
	return player
}

public setHighBantimes()
{
	new arg[32]
	new argc = read_argc() - 1
	g_highbantimesnum = argc

	if(argc < 1 || argc > 12)
	{
		log_amx("[EGC Bans] You have more than 12 or less than 1 bantimes set in amx_sethighbantimes")
		log_amx("[EGC Bans] Loading default bantimes")
		loadDefaultBantimes(1)

		return PLUGIN_HANDLED
	}

	new i = 0
	new num[32], flag[32]
	while (i < argc)
	{
		read_argv(i + 1, arg, 31)
		parse(arg, num, 31, flag, 31)

		if(equali(flag, "m"))
		{ 
			g_HighBanMenuValues[i] = str_to_num(num)
		}
		else if(equali(flag, "h"))
		{
			g_HighBanMenuValues[i] = (str_to_num(num) * 60)
		}
		else if(equali(flag, "d"))
		{
			g_HighBanMenuValues[i] = (str_to_num(num) * 1440)
		}
		else if(equali(flag, "w"))
		{
			g_HighBanMenuValues[i] = (str_to_num(num) * 10080)
		}

		i++
	}
	return PLUGIN_HANDLED
}

public setLowBantimes()
{
	new arg[32]
	new argc = read_argc() - 1
	g_lowbantimesnum = argc

	if(argc < 1 || argc > 12)
	{
		log_amx("[EGC Bans] You have more than 12 or less than 1 bantimes set in amx_setlowbantimes")
		log_amx("[EGC Bans] Loading default bantimes")
		loadDefaultBantimes(2)
		
		return PLUGIN_HANDLED
	}

	new i = 0
	new num[32], flag[32]
	while (i < argc)
	{
		read_argv(i + 1, arg, 31)
		parse(arg, num, 31, flag, 31)

		if(equali(flag, "m"))
		{ 
			g_LowBanMenuValues[i] = str_to_num(num)
		}
		else if(equali(flag, "h"))
		{
			g_LowBanMenuValues[i] = (str_to_num(num) * 60)
		}
		else if(equali(flag, "d"))
		{
			g_LowBanMenuValues[i] = (str_to_num(num) * 1440)
		}
		else if(equali(flag, "w"))
		{
			g_LowBanMenuValues[i] = (str_to_num(num) * 10080)
		}

		i++
	}
	return PLUGIN_HANDLED
}

loadDefaultBantimes(num)
{
	if(num == 1 || num == 0)
		server_cmd("amx_sethighbantimes 5 60 240 600 6000 0 -1")

	if(num == 2 || num == 0)
		server_cmd("amx_setlowbantimes 5 30 60 480 600 1440 -1")
}

MySqlX_ThreadError(szQuery[], error[], errnum, failstate, id)
{
	
	if (failstate == TQUERY_CONNECT_FAILED)
	{
		log_amx("%L", LANG_SERVER, "TCONNECTION_FAILED")
	}
	else if (failstate == TQUERY_QUERY_FAILED)
	{
		log_amx("%L", LANG_SERVER, "TQUERY_FAILED")
	}
	log_amx("%L", LANG_SERVER, "TQUERY_ERROR", id)
	log_amx("%L", LANG_SERVER, "TQUERY_MSG", error, errnum)
	log_amx("%L", LANG_SERVER, "TQUERY_STATEMENT", szQuery)
}

Last edited by ciprulz; 05-26-2015 at 08:02.
ciprulz is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 05-30-2015 , 13:26   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #585

Wow i like it
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
sami_spt
Veteran Member
Join Date: Sep 2012
Location: I<3 pussy cats
Old 07-06-2015 , 10:48   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #586

anyone tried it with AMX MOD X 1.8.2?

I'm getting this error.

Quote:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// screenshotban_spt.sma
// D:\****\addons\addons\amxmodx\scripting\scree nshotban.sma(265) : e
rror 088: number of arguments does not match definition
//
// 1 Error.
// Could not locate output file D:\***\addons\addons\amxmodx\scripting\c
ompiled\screenshotban_spt.amx (compile failed).
//
// Compilation Time: 0.17 sec
// ----------------------------------------

Press enter to exit ...

Last edited by sami_spt; 07-06-2015 at 10:48.
sami_spt is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-06-2015 , 18:53   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #587

Quote:
Originally Posted by sami_spt View Post
anyone tried it with AMX MOD X 1.8.2?

I'm getting this error.
According to your compiler output, you are not compiling this plugin. If you need help with a plugin, you should post in the thread where you got the plugin.

This plugin will compile for 1.8.2 just fine (simply click the "Get Plugin" link).
__________________
fysiks is offline
botz
AlliedModders Donor
Join Date: Jan 2015
Old 07-29-2015 , 20:55   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #588

] amx_ss
Client with that name or userid not found

I cant see the usage please help

I want it ingame, please help

Thanks, fysiks
__________________
botz is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-29-2015 , 23:20   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #589

This version should fix it.
Attached Files
File Type: sma Get Plugin or Get Source (amx_ssban.sma - 753 views - 19.8 KB)
__________________

Last edited by fysiks; 07-29-2015 at 23:21.
fysiks is offline
botz
AlliedModders Donor
Join Date: Jan 2015
Old 07-30-2015 , 00:15   Re: AMX SSBan v2.6 [UPDATE: 10.Jul.2010]
Reply With Quote #590

Thank you, also i need a bit more modificaion fysiks, i just need everything to be working same as it is with amx_ss, just need to remove amx_ssban out of the whole plugin please, i just need my admins to first take screenshots then ban after taking screenshots, from the normal banmenu, and i like this AMXSCREENSHOTS plugin more because its managed thats why i want this kinda plugins only having amx_ss

Please help fysiks, also please update it with the current version you updated
__________________

Last edited by botz; 07-30-2015 at 01:18.
botz is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode