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

Solved mdb ban to amx ban?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 10-29-2023 , 14:44   mdb ban to amx ban?
Reply With Quote #1

Hello I use amxbans . Can some one help plugin working with mdb ban system I need to change the parameters for the command.

old mdb commans
Code:
server_cmd^"", get_user_userid( id ) );
How do its work with amxbans? I change amx_mban to amx_ban but not work.
THanks,

Last edited by popilas; 11-09-2023 at 13:00. Reason: delete
popilas is offline
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 10-29-2023 , 15:14   Re: mdb ban to amx ban?
Reply With Quote #3

Quote:
Originally Posted by mlibre View Post
shows your amxx list
amx_ban <name or #userid> [reason] ADMIN_BAN Bans a player.
popilas is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 10-29-2023 , 15:33   Re: mdb ban to amx ban?
Reply With Quote #4

@popilas
Quote:
Originally Posted by mlibre View Post
these commands are entered in the server console
__________________
mlibre is offline
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 10-29-2023 , 15:35   Re: mdb ban to amx ban?
Reply With Quote #5

Quote:
Originally Posted by mlibre View Post
@popilas
lol I got plugin who auto ban with mban
Code:
server_cmd( "amx_mban 1440 #, get_user_userid( id ) );
When I do
Code:
server_cmd( "amx_ban 1440 #, get_user_userid( id ) );
amxbans dont ban
How fix it?:

Last edited by popilas; 11-09-2023 at 13:01.
popilas is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 10-29-2023 , 15:45   Re: mdb ban to amx ban?
Reply With Quote #6

Quote:
Originally Posted by popilas View Post
lol I got plugin who auto ban with mban
Code:
server_cmd( "amx_mban 1440 #%d ^"[^x03TEST^x01]  hack (#2221) detected!^"", get_user_userid( id ) );
When I do
Code:
server_cmd( "amx_ban 1440 #%d ^"[^x03TEST^x01]  hack (#2221) detected!^"", get_user_userid( id ) );
amxbans dont ban
How fix it?:
You better post the code of the plugin that bans with mban
Snake. is offline
Send a message via Skype™ to Snake.
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 10-29-2023 , 15:53   Re: mdb ban to amx ban?
Reply With Quote #7

Quote:
Originally Posted by Snake. View Post
You better post the code of the plugin that bans with mban
Code:
/*
*******************************|
*Media/Music Kick/Ban - Allenwr|
*******************************|
*
*Copyleft by Allenwr
*
******
*When an admin kicks a player, its plays a sound...
*
*Kick/Ban = Random Files Placed in the mediakickban.ini file
*
*Commands
*--------
*amx_mkick <name or #userid> [reason]
*amx_mban <name or #userid> <minutes> [reason]
*Same as regular kick/ban
*
*Changelog
*---------
* -1.0 -------- 1st release-
* -2.0 -------- plugin now chooses random sounds to play when kicking or banning -
* -3.0 -------- Now Files can be chosen by user in the mediakickban.ini file -----
* -3.1 -------- now used get_configsdir ------------------------------------------
* -3.2 -------- slight change in code --------------------------------------------
* -3.3 -------- Now you can choose between wav and mp3 in ini file ---------------
* -3.3.1 ------ Slight error in code fixed where sounds did not play -------------
* -3.4 -------- Shortened code for efficentcy - Thanks to Suicid3 ----------------
* -3.5 -------- removed stock from playmedia -------------------------------------
*/
#include <amxmodx>
#include <amxmisc>
#define mkickbansounds 8
#define CONFIG_FILE "mediakickban.ini"
 
new soundlist[mkickbansounds][80]
 
public read_ini()
{ 
	new ini_file[128]
        
	new config_dir[80]
	get_configsdir(config_dir,79)
	format(ini_file,127,"%s/%s",config_dir,CONFIG_FILE)
        
	new txt[100],line=0,sound[65] 
	new fp=fopen(ini_file, "rt") 
	while(!feof(fp)) 
	{
		fgets(fp,txt,99) 
		parse(txt,sound,99) 
		if (sound[0] != '/' && line<mkickbansounds)
		{ 
			format(soundlist[line],79,"%s",sound) 
			line++ 
		}
	}
	fclose(fp);
} 
 
public cmd_mkick(id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED   
        
	new txt[80]
	read_args(txt, 79)
                
	playmedia()
        
	set_task(12.0,"kick_timer",_,txt,strlen(txt))
	return PLUGIN_HANDLED
}
 
public cmd_mban(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED   
        
	new txt[80]
	read_args(txt, 79)
	
	playmedia()
        
	set_task(12.0,"ban_timer",_,txt,strlen(txt))
	return PLUGIN_HANDLED
}
 
public kick_timer(txt[])
{
	server_cmd("amx_kick %s",txt)
}
 
public ban_timer(txt[])
{
	server_cmd("amx_ban %s",txt)
}
 
public plugin_precache()  
{ 
	read_ini() 
	new sound[100] 
        
	for (new i=0;i<mkickbansounds;i++) 
	{ 
		format(sound,99,"misc/%s",soundlist[i]) 
		precache_sound(sound) 
	} 
     
	return PLUGIN_CONTINUE 
}  
 
playmedia()
{
	client_cmd(0 , "stopsound")
	new Num = random_num(0,mkickbansounds-1)
	new iPos = (strfind(soundlist[Num], ".") + 1)
        
	if(equali(soundlist[Num][iPos] , "mp3")) 
		client_cmd(0, "mp3 play ^"sound/misc/%s^"",soundlist[Num]);
	else 
		client_cmd(0, "spk ^"misc/%s^"",soundlist[Num]);
}
 
public plugin_init()
{
	register_plugin("Media Kick/Ban", "3.5", "Allenwr")
	register_concmd("amx_mkick", "cmd_mkick", ADMIN_KICK, "<name or #userid> [reason]")
	register_concmd("amx_mban", "cmd_mban", ADMIN_BAN, "<name or #userid> <minutes> [reason]")
	register_cvar("mediakickban", "3.5",FCVAR_SERVER|FCVAR_UNLOGGED|FCVAR_SPONLY)
}
popilas is offline
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 11-08-2023 , 12:21   Re: mdb ban to amx ban?
Reply With Quote #9

Quote:
Originally Posted by mlibre View Post
disabled admin.amxx
admin.amxx disabled
admincmd.amxx enable

Usage: amx_ban <steamID or nickname or #authid or IP> <time in mins> <reason>

when I do
server_cmd( "amx_addban #%d
Server concole write amx_addban "xx.xxx.xxx.101" "5" "test"
amx_banip wont work too
popilas 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 04:05.


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