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

Geoslide 02-24-2012 15:20

Re: Super Admin Update* 2.0
 
GJ

rak 02-24-2012 18:32

Re: Super Admin Update* 2.0
 
Quote:

Originally Posted by Geoslide (Post 1656604)
GJ

thanks man! update :mrgreen:

Emp` 02-24-2012 19:52

Re: Super Admin Update* 2.1
 
Please at least use the proper defines with cmd_target, so I know you have an idea of what you are doing, and I will not trash this.

You should be using a Trie instead of an Array to hold "Super Admin" steam ids.

You don't need to check if the SuperAdmin file exists if you are also going to check the file handle.

You should use trim instead of replace.

You don't need to read the file in precache.

Please use charsmax for string lengths.

rak 02-25-2012 04:01

Re: Super Admin Update* 2.1
 
Quote:

Originally Posted by Emp` (Post 1656754)
Please at least use the proper defines with cmd_target, so I know you have an idea of what you are doing, and I will not trash this.

You should be using a Trie instead of an Array to hold "Super Admin" steam ids.

You don't need to check if the SuperAdmin file exists if you are also going to check the file handle.

You should use trim instead of replace.

You don't need to read the file in precache.

Please use charsmax for string lengths.

Done :) Update*

leonard19941 02-25-2012 06:28

Re: Super Admin Update* 2.2
 
good job rak, thanks :)

Lolz0r 02-25-2012 06:51

Re: Super Admin Update* 2.2
 
Suggestions:

1. Transfer function
2. Adding Menu

Neeeeeeeeeel.- 03-11-2012 04:10

Re: Super Admin Update* 2.2
 
No more update D: ?

rak 03-12-2012 01:22

Re: Super Admin Update* 2.2
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 1666491)
No more update D: ?

wait... i finish other plugin :3 give me some time :3

leonard19941 03-12-2012 12:09

Re: Super Admin Update* 2.2
 
Suggestions:


1. amx_super_team <name> <team>

<team> = <T> <CT> <SPEC>

Info:Super Admins can change team the Normal Admins.


2. amx_super_nick <current name> <new name>

Info:Super Admins can rename the Normal Admins.

Neeeeeeeeeel.- 03-17-2012 20:01

Re: Super Admin Update* 2.2
 
Quote:

Originally Posted by leonard19941 (Post 1667503)
Suggestions:

1. amx_super_team <name> <team>

<team> = <T> <CT> <SPEC>

What do you mean? Give him a little description to understand what are you talking about.

fysiks 03-18-2012 01:46

Re: Super Admin Update* 2.2
 
Quote:

Originally Posted by rak (Post 1656173)

I didn't only provide a name, I provided the plugins (3) to do exactly this already without the extra file, which in my opinion just make things more cluttered and confusing. Using just a flag (customizable) so that administrators can have all admins in one file is the most convenient method IMO.

Even better yet, as DarkGod mentions in his reply (#20) would be to edit cmd_target() then recompile all plugins that use that function which would cascade the changes for all functions that use it.

leonard19941 03-19-2012 11:16

Re: Super Admin Update* 2.2
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 1670901)
What do you mean? Give him a little description to understand what are you talking about.

ok, edit :)

SkiGz 03-26-2012 00:24

Re: Super Admin Update* 2.2
 
good job rak ;)

TpbIHb 04-30-2012 17:59

Re: Super Admin Update* 2.2
 
Good Job, thx. And can you make this for all commands and plugins, which use immunity (not only for kick,ban and slay)? e.g. AMX Super and others.

Sidix 06-10-2012 15:14

Re: Super Admin Update* 2.2
 
good job rak

rak 06-11-2012 17:50

Re: Super Admin Update* 3.0
 
update ^-^

Destro- 06-12-2012 13:31

Re: Super Admin Update* 3.0
 
good job rak

rak 06-13-2012 09:03

Re: Super Admin Update* 3.1
 
update ^-^

thanks to all

rak 06-14-2012 23:52

Re: Super Admin Update* 4.0
 
new command :D

update*

thesnakebiter 06-24-2012 15:24

Re: Super Admin Update* 4.0
 
This plugin is useful for the servers.
You can give for your admins the inmunity and the super admins can ban.

Sorry for bad english.

chriss 09-01-2012 14:46

Re: Super Admin Update* 4.0
 
is this gonna work with amxbans?

rak 09-05-2012 00:41

Re: Super Admin Update* 4.0
 
Quote:

Originally Posted by chriss (Post 1788896)
is this gonna work with amxbans?

this don't have support for amxbans

ESPADONGAMING 09-13-2012 16:40

Re: Super Admin Update* 4.0
 
very nice:D

Allied Modder 10-05-2012 16:21

Re: Super Admin Update* 4.0
 
It Would Be Better If You Use Exolent's Ban It's Real Time , Add It And Second Thing Making Super Admin By Nick Is Better Instead Of Steam Id :) Because Every Does Not Have Steam In Net Cafes And Other Places So They Can Use Nicks To Play From Any Where :) - My Suggestion
And The Second Thing How Will People Know If A Super Admin Is Online :3 ? So Make /superadmins s% No Super Administrators Online. And ... Thanks For Reading

rak 10-05-2012 19:57

Re: Super Admin Update* 4.0
 
Quote:

Originally Posted by Allied Modder (Post 1813240)
It Would Be Better If You Use Exolent's Ban It's Real Time , Add It And Second Thing Making Super Admin By Nick Is Better Instead Of Steam Id :) Because Every Does Not Have Steam In Net Cafes And Other Places So They Can Use Nicks To Play From Any Where :) - My Suggestion
And The Second Thing How Will People Know If A Super Admin Is Online :3 ? So Make /superadmins s% No Super Administrators Online. And ... Thanks For Reading

If you use no-steam use the first version.. 1.1.. if you want all features.. use steam :)

Don Marco 10-19-2012 10:27

Re: Super Admin Update* 4.0
 
Quote:

Originally Posted by rak (Post 1813326)
If you use no-steam use the first version.. 1.1..

Supporting non-steam !!! F**K YEAH!!! :grrr:

This plugin is useless.

rak 10-19-2012 20:03

Re: Super Admin Update* 4.0
 
Your opinion doesn't matter too much for me, since the first moment I read that you use and approve dproto.

aco aco ;)

alicx 03-29-2013 11:20

Re: Super Admin Update* 4.0
 
hey i advise you to add this: (show super admin online)
Like this: http://forums.alliedmods.net/showthread.php?p=830495

Unkolix 03-29-2013 11:24

Re: Super Admin Update* 4.0
 
Quote:

Originally Posted by alicx (Post 1922488)
hey i advise you to add this: (show super admin online)
Like this: http://forums.alliedmods.net/showthread.php?p=830495

I advice you to run that plugin you gave...

alicx 03-29-2013 13:35

Re: Super Admin Update* 4.0
 
Quote:

Originally Posted by Unkolix (Post 1922491)
I advice you to run that plugin you gave...

I'm working on it :D so wait :)
and if i create it secefully i will post it :D


All times are GMT -4. The time now is 02:27.

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