PDA

View Full Version : AMX_BAN replacement. for temp ban only


jsauce
08-07-2005, 16:55
/*
*
* AMXX BAN Replacement v 1.0
*
* The ban code itself was created by the AMXX Dev Team. This is just used as a replacement
* for the normal ban, so an admin can impose a limit on bans from certain users.
* I made the modification at the request of an admin friend who's server admins
* tend to make bans permanent without thinking about it first. This will prevent that from
* happening, by restricting the max length to whatever the admin sets amx_ban_temp cvar to.
*
* This should be placed above your admincmd.amxx in your plugins.ini file.
* You can change the access level for the temp ban, by modifying the define low_ban line.
* It's currently set to ADMIN_LEVEL_E
*
* A user who has both NORMAL_BAN and LOW_BAN will have it default to NORMAL_BAN which means they
* can ban a user to any amount of time. A user with access only to LOW_BAN cannot.
*
*
* The amx_ban_temp cvar is set to 1440 or 24 hours by default.
*
*/


Again there are two defined here:

#define NORMAL_BAN ADMIN_BAN
#define LOW_BAN ADMIN_LEVEL_E

So modify the LOW_BAN level to whatever admin level you like.

Coffin_Dancer
08-18-2005, 22:24
I'm downloaded and installed the plugin but can't get it associate with the letter 'e' in the user.ini. I put it before the admincmd.amxx in the plugin.ini as well. And I know the plugin is running.

Any thoughts?

Thanks,
Coffin Dancer

kILL-jOY
08-18-2005, 23:14
nice looks useful

jsauce
08-18-2005, 23:50
I'm downloaded and installed the plugin but can't get it associate with the letter 'e' in the user.ini. I put it before the admincmd.amxx in the plugin.ini as well. And I know the plugin is running.

Any thoughts?

Thanks,
Coffin Dancer

Yeah its not the flag e but rather ADMIN_LEVEL_E which is equal to the flag q as the flag e is equal to ADMIN_SLAY.


#define ADMIN_ALL 0 /* everyone */
#define ADMIN_IMMUNITY (1<<0) /* flag "a" */
#define ADMIN_RESERVATION (1<<1) /* flag "b" */
#define ADMIN_KICK (1<<2) /* flag "c" */
#define ADMIN_BAN (1<<3) /* flag "d" */
#define ADMIN_SLAY (1<<4) /* flag "e" */
#define ADMIN_MAP (1<<5) /* flag "f" */
#define ADMIN_CVAR (1<<6) /* flag "g" */
#define ADMIN_CFG (1<<7) /* flag "h" */
#define ADMIN_CHAT (1<<8) /* flag "i" */
#define ADMIN_VOTE (1<<9) /* flag "j" */
#define ADMIN_PASSWORD (1<<10) /* flag "k" */
#define ADMIN_RCON (1<<11) /* flag "l" */
#define ADMIN_LEVEL_A (1<<12) /* flag "m" */
#define ADMIN_LEVEL_B (1<<13) /* flag "n" */
#define ADMIN_LEVEL_C (1<<14) /* flag "o" */
#define ADMIN_LEVEL_D (1<<15) /* flag "p" */
#define ADMIN_LEVEL_E (1<<16) /* flag "q" */
#define ADMIN_LEVEL_F (1<<17) /* flag "r" */
#define ADMIN_LEVEL_G (1<<18) /* flag "s" */
#define ADMIN_LEVEL_H (1<<19) /* flag "t" */
#define ADMIN_MENU (1<<20) /* flag "u" */
#define ADMIN_ADMIN (1<<24) /* flag "y" */
#define ADMIN_USER (1<<25) /* flag "z" */

Coffin_Dancer
08-20-2005, 00:06
I've given these abilities in admin "cefgijmnopqrstu"

but they don't have any of the temp bans in amx_help or the adminmodmenu.

Any more thoughts? I know the plugin is running but they don't have that ability.

Thanks,
Coffin Dancer

jsauce
08-20-2005, 01:09
I've given these abilities in admin "cefgijmnopqrstu"

but they don't have any of the temp bans in amx_help or the adminmodmenu.

Any more thoughts? I know the plugin is running but they don't have that ability.

Thanks,
Coffin Dancer

Okay the way it works is if the user has access flag q but not access flag d than they can do an amx_ban whatever and if that ban is either 0 meaning permanent or anything over 1440 minutes it will default to 1440 minutes. This will only work with the console it wont work with menu or however you are trying to do it. And I don't understand what you mean "they don't have any of the temp bans in the amx_help" I don't understand that. Explain further, I have tested this plugin thoroughly and its currently running on my server and the person's I wrote it for. I know that its working exactly as it was designed. Also if its not working make sure its above the admincmd.amxx line in your plugins.ini or it will do absolutely nothing.

Coffin_Dancer
08-21-2005, 01:06
Okay, what I meant by temp bans in the amx_help. When looking for the command in the amx_help in console, nothing is there.

I have it above the admincmd.amxx line.

I have the admin command "d" and can ban but the people who only have "q" can not.

And I didn't follow a thing about the 1440 and such.

I've never fully understood this program or how to make it run exactly the way I wanted/need it to.

I really appreciate your help.

Thanks,
Coffin Dancer

jsauce
08-21-2005, 01:14
If a person with the flag q but not d attempts the command amx_ban whoever 99999 what happens? At the very least the user should receive a message saying, "You have insufficient access to use this command." in the console. If you're not even getting that then there is something wrong. If that's the case try changing the line:

register_concmd("amx_ban","cmdBan",ADMIN_ADMIN,"<name or #userid> <minutes> [reason]")

to

register_concmd("amx_ban","cmdBan",ADMIN_ALL,"<name or #userid> <minutes> [reason]")

Which will let everyone have access to it but because I have it checking flag by flag, if the user doesn't have either d or q then you will get that message.

Coffin_Dancer
08-25-2005, 01:21
Thank you. Apparently, they did have the command but it doesn't show up in the list of amx commands when doing amx_help. They can temp ban now.

Will those admins be able to do amx_ban 0 for a perma ban? And how long is amx_ban 1440?

Those are just secondary questions. Thank you for your help!

jsauce
08-25-2005, 01:58
If an admin with that level attempts to set a ban for 0 or more than 1440 the plugin intercepts that and replaces it with 1440 minutes. 1440 minutes is 24 hours. So the admin could set a max of 24 hours ban, however they can set any normal ban lower than that. So what I mean is they can set a ban from 1-1440 minutes.

Coffin_Dancer
10-15-2005, 20:23
Hello,

I have installed the amx_ban2.amxx but now my transfer team command doesn't seem to work properly. Is this a problem anyone else has had?

Thanks,

Coffin Dancer

jsauce
10-27-2005, 18:20
can you give me a link to this transfer team plugin i can take a look.

[TGA]CrewDawg
07-31-2006, 22:43
so if I modify the "1440" to "5" then will will only allow them to ban for 5 min?

Jellric
02-21-2008, 22:55
This is not working for me. The plugin is running, is listed above admincmd.amxx in plugins.ini (in fact it's listed first) and admins have flags "q". When you attempt to ban you get "You have no access to that command" msg.

Jellric
02-29-2008, 12:46
Is this plugin no longer supported?

Is there another plugin or way of configuring my amxx to do the same thing?

Jellric
03-05-2008, 19:46
Heeelloooo??????????????????????????????

*crickets*

rlalier
12-29-2008, 12:52
amxmodx 1.81
metamod 1.19

Is not funcion.

I try with parameters:

plugins.ini

; AMX Mod X plugins

; Admin Base - Always one has to be activated
admin.amxx ; admin base (required for any admin-related)
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)

; Basic
admincmd.amxx ; basic admin console commands
amx_ban2.amxx ; Ban Temp Admins controles
adminhelp.amxx ; help command for admin console commands
;adminslots.amxx ; slot reservation
multilingual.amxx ; Multi-Lingual management

user.ini
"MY STEAM" "" "cefgijmnopqrstu" "ce"

No work, i try:

plugins.ini

; AMX Mod X plugins
admincmd.amxx ; basic admin console commands

; Admin Base - Always one has to be activated
admin.amxx ; admin base (required for any admin-related)
;admin_sql.amxx ; admin base - SQL version (comment admin.amxx)

; Basic
amx_ban2.amxx ; Ban Temp Admins controles
adminhelp.amxx ; help command for admin console commands
;adminslots.amxx ; slot reservation
multilingual.amxx ; Multi-Lingual management

user.ini
"MY STEAM" "" "cefgijmnopqrstu" "ce"

no work.

someone can help ?

Gam3ronE
01-18-2011, 12:58
amx_ban2 1.0 AMXX Dev Team/js amx_ban2.amxx running

But when player with the flags "eq" tries amx_slay


] amx_ban
You have no access to that command

no n@me
10-07-2012, 13:19
Can someone add a Screenshot to ban and banmenu