AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Super Admin Update* 4.1 (https://forums.alliedmods.net/showthread.php?t=178971)

rak 02-23-2012 21:43

Super Admin Update* 4.1
 
5 Attachment(s)
  • Description
SuperAdmin 1.1 = Any admin with the FLAG ADMIN_RCON >> "L" he can kick, ban, slap and slay any user and admin with immunity
SuperAdmin 2.2 = Any player with SteamID added in SuperAdmin.ini(File location: $moddir/addons/amxmodx/configs/SuperAdmin.ini) has the possibility to kick, ban, slap and slay any user and admin with immunity
SuperAdmin 3.1 = Menu added
SuperAdmin 4.1 = New command and auto create .ini File
  • Commands
Code:

amx_super_kick <name|#userid> <reason>
amx_super_ban <name|#userid> <time> <reason>
amx_super_banip <name|#userid> <time> <reason>
amx_super_slap <name|#userid> <damage>
amx_super_slay <name|#userid>
amx_addsuperadmin <name|#userid|steamid> |*NEW*|

amxsupermenu
amx_addsuperadmin_menu |*NEW*|
amx_super_kickmenu
amx_super_banmenu
amx_super_banipmenu
amx_super_slapmenu
amx_super_slaymenu

  • Additional Info
Admins can't ban Admins with Immunity or Super Admins, but to users. On the other side, Admins with Immunity must be able to ban Admins and users, but not to Staff Admins. Super Admins ban everybody. This is the primary function for this plugin.
  • Credits
  • Changelog
  • Super Admin 1.0 - First release
  • Super Admin 1.1 - Fix amx_super_slay
  • Super Admin 2.0 - SuperAdmin by SteamID
  • Super Admin 2.1 - Fix my mistake >> precache >> trim(Data) :arrow: remove_quotes(Data)
  • Super Admin 2.2 - DinamicArrays >> Tries || Corrects Defines CMD || add charsmax in all string lengths || plugin_precache >> plugin_cfg || Delete file_exists || replace >> trim || Fix amx_super_slay
  • Super Admin 3.0 - Menu added and cmd_target deleted
  • Super Admin 3.1 - Good bye "goto"
  • Super Admin 4.0 - Add SuperAdmin by command || AutoCreate .ini File || add USAGE info
  • Super Admin 4.1 - Bug Super_Ban

Napoleon_be 02-23-2012 21:45

Re: Super Admin By [R]ak
 
Why should you give someone immunity if you want to kick or ban someone? This can be usefull but imo, it's pretty useless..

rak 02-23-2012 21:54

Re: Super Admin By [R]ak
 
Quote:

Originally Posted by Napoleon_be (Post 1656174)
Why should you give someone immunity if you want to kick or ban someone? This can be usefull but imo, it's pretty useless..

Only a few have access to FLAG ADMIN_RCON >> "L". It could be useful just for fun or supervision.

Neeeeeeeeeel.- 02-23-2012 23:23

Re: Super Admin By [R]ak
 
Good job:D

PHP Code:

new Authid[32]
get_user_authid(playerAuthid31

Should be
PHP Code:

new Authid[19]
get_user_authid(playerAuthid18

Code:

STEAM_X:X:XXXXXXXX
:B

rak 02-23-2012 23:38

Re: Super Admin By [R]ak
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 1656200)
Good job:D

PHP Code:

new Authid[32]
get_user_authid(playerAuthid31

Should be
PHP Code:

new Authid[19]
get_user_authid(playerAuthid18

Code:

STEAM_X:X:XXXXXXXX
:B

yes but.. i use 32 because in the original plugin(admincmd) use 32.. but in get_user_authid
Code:

The max lenght of a STEAM`id is 34 bytes.
... i don't know if is better use 18 or 32 or 34 xD
Thanks you :3

[ES]
en el plugin original usa 32 de lenght.. pero en wiki aparece 34... no se que seria mejor.. quien los entiende xD... gracias :3

Devil259 02-24-2012 05:21

Re: Super Admin By [R]ak
 
new AuthID[ 35 ];
get_user_authid( player , Authid , charsmax( Authid ) );

Don't hardcode authid's lenght.

Also, you should use custom flag instead of rcon flag.

Another suggestion: add a *.ini file to get Super Admin by SteamID.

rak 02-24-2012 05:42

Re: Super Admin By [R]ak
 
Quote:

Originally Posted by Devil259 (Post 1656342)
new AuthID[ 35 ];
get_user_authid( player , Authid , charsmax( Authid ) );

Don't hardcode authid's lenght.

Also, you should use custom flag instead of rcon flag.

Another suggestion: add a *.ini file to get Super Admin by SteamID.

thanks! nice idea... i do this quickly :)

rak 02-24-2012 09:04

Re: Super Admin Update* 2.0
 
Update

Moody92 02-24-2012 09:45

Re: Super Admin Update* 2.0
 
I wonder if you can make
the admins ( Without immunity ) can't ban/kick/slap another admins ( Without immunity )

rak 02-24-2012 10:00

Re: Super Admin Update* 2.0
 
Quote:

Originally Posted by Moody92 (Post 1656427)
I wonder if you can make
the admins ( Without immunity ) can't ban/kick/slap another admins ( Without immunity )

try this

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Block Admins Without Immunity"
#define VERSION "1.0"
#define AUTHOR "[R]ak"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_ban""Check")
    
register_concmd("amx_kick""Check")
    
register_concmd("amx_slap""Check")
    
register_concmd("amx_slay""Check")
}

public 
Check(id) {
    new 
Victim[32]
    
    
read_argv(1Victim31)
    
    new 
player cmd_target(idVictim8)
    
    if(!
player)
        return 
PLUGIN_HANDLED
    
    
if(get_user_flags(id) & ADMIN_IMMUNITY || !is_user_admin(player))
        return 
PLUGIN_CONTINUE
        
    
return PLUGIN_HANDLED


EDIT: put this plugin first in plugin.ini


All times are GMT -4. The time now is 10:18.

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