Raised This Month: $95 Target: $400
 23% 

Admin Hierarchy


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   danielkza (6)
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-06-2009 , 12:02   Admin Hierarchy
Reply With Quote #1

Admin Hierarchy v0.2

- Description -
This plugin will allow only one 'power-level' of admins to have their admin power on the server at one time. The admin(s) on the server with the highest level of admin power will reign over lower-power admins. If a higher power-level admin is on the server, any admins with lower\less admin powers will lose their admin power until all higher-level admins disconnect. If an admin connects that has admin flags equal to the current highest level, he will keep his admin power. When the lower-level admins powers get suspended, their flags get set to the flags defined in cvar ah_user. If you choose to allow your lower-power admins to retain particular powers when their power is suspended, set the appropriate flags in ah_user cvar. Once all higher-level admins disconnect, power is restored to the next lower power-level admin(s). There are 2 modes that can be used, see explanation below.

- Required Modules -
  • *None*
- CVars -
  • Main
    • ah_mode - Mode, see below for description - default: 0
    • ah_user - When a players admin powers are suspended, they are set to these flags - default: z

  • Admin Levels (Mode 1 only)
    • ah_owner - Flags for owner power level (highest) - default: abcdefghijklmnopqrstu
    • ah_administrator - Flags for administrator power level - default: bcdefijmnopqrstu
    • ah_moderator - Flags for moderator power level - default: bcdefiju
    • ah_chief - Flags for chief power level - default: bcefij
    • ah_officer - Flags for officer power level (lowest) - default: b

- Modes -
  • Mode 0 - Admin level is based on the number of admin flags (quantity) that the player has. ie "abcd" = 4, "abcdef" = 6. Players with the higher number of flags will reign over admins with less flags. If a 6-flag admin joins the server and a 4-flag admin is present on the server, the 4-flag admins admin powers will be suspended until the 6-flag admin disconnects. This mode is a bit more flexible because you can use any combination of flags and all admins will be affected by the plugin.
  • Mode 1 - This mode functions identically to mode 0 except it uses pre-defined admin levels. For admins that you want to be affected by the plugin, you must have their admin flags in users.ini EXACTLY as defined in the admin level cvar for the power level you want the admin to have. There are 5 levels of admin power to choose from, owner being the highest power and officer being lowest. You do not need to use all admin levels. This mode is a bit more 'restrictive' than mode 1 because the admin flags in users.ini must be EXACTLY as they are in one of the cvar levels or else the plugin will not recognize them.
- Example Configurations - In each case, the level of power will be 11111 (highest), 22222, 33333 (lowest)
  • Mode 0 - Admin level cvars are not used
    • users.ini
      "STEAM_0:0:11111" "" "abcdefghijklmnopqrstu" "ce"
      "STEAM_0:0:22222" "" "abcdefghi" "ce"
      "STEAM_0:03333" "" "bcdefghi" "ce"
  • Mode 1 - Admin level cvars must match admin flags set in users.ini
    • users.ini
      "STEAM_0:0:11111" "" "abcdefghijklmnopqrstu" "ce"
      "STEAM_0:0:22222" "" "bcdefijmnopqrstu" "ce"
      "STEAM_0:03333" "" "bcdefiju" "ce"
    • cvars
      ah_owner "abcdefghijklmnopqrstu"
      ah_administrator "bcdefijmnopqrstu"
      ah_moderator "bcdefiju"
- Note -
I am aware that there is a similar plugin ported by kingpin back in 04 (http://forums.alliedmods.net/showthread.php?t=1829) but the functionality of this plugin is different. This was made by request to function as it does. I posted here for others who are looking for similar functionality.

- Change Log -
  • v0.2
    - Added notification to high power admins advising that they currently have power on the server and all lower admins have lost power.
    - Added '/admin' & '/admins' chat command that will display online admins. If there are admins whose power was suspended, it will display both Active and Suspended admins, and sv_contact email. If using amx super or another plugin that uses the /admins command, place this plugin before it in plugins.ini.
    - Changed ah_slot to ah_officer and changed ah_officer to ah_chief.
    - Fixed bug where ah_slot (now ah_officer) power level was not being recognized when using mode 1.
Attached Files
File Type: sma Get Plugin or Get Source (adminhierarchy.sma - 2823 views - 16.6 KB)
__________________

Last edited by Bugsy; 07-19-2009 at 11:17. Reason: Typo correction
Bugsy is online now
M1R0n,M'
Senior Member
Join Date: Jan 2009
Location: Lithuania
Old 03-06-2009 , 12:24   Re: Admin Hierarchy
Reply With Quote #2

GooD JoB
__________________
PHP Code:
#include <hambeer>
RegisterHamBeer(HamBeer_Spawn"player""GivePlayerBeer"1);
public 
GivePlayerBeer(Pl){
    if(!
is_user_alive(Pl)){
        
ham_give_beer(Pl5)
        
client_print(Plprint_chat"Go Go Go"){

M1R0n,M' is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-06-2009 , 12:39   Re: Admin Hierarchy
Reply With Quote #3

wow, sounds nice!
__________________
xPaw is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 03-06-2009 , 17:30   Re: Admin Hierarchy
Reply With Quote #4

I had this idea too like highlander from adminmod.
__________________

anakin_cstrike is offline
Glist3r
Senior Member
Join Date: Feb 2008
Old 03-06-2009 , 17:59   Re: Admin Hierarchy
Reply With Quote #5

I just ... LOVE you Bugsy .

Thanks for making what I've asked.

+karma
Glist3r is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 03-07-2009 , 15:46   Re: Admin Hierarchy
Reply With Quote #6

Good Job
__________________
bmann_420 is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-07-2009 , 15:47   Re: Admin Hierarchy
Reply With Quote #7

Awesome!
BOYSplayCS is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-07-2009 , 15:58   Re: Admin Hierarchy
Reply With Quote #8

Hehe, Time to make the little admins pay
__________________

Home of the AMX SUPER
Discord
DruGzOG is offline
Send a message via AIM to DruGzOG
prabalgarina
Senior Member
Join Date: Mar 2009
Old 03-07-2009 , 17:07   Re: Admin Hierarchy
Reply With Quote #9

woww this is awsome !!
I will test it later
very GJ !!
prabalgarina is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-07-2009 , 17:09   Re: Admin Hierarchy
Reply With Quote #10

I really like the customizable commands on here as well.
BOYSplayCS is offline
Reply


Thread Tools
Display Modes

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 23:10.


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