Super Admin - Override other admin's access when ur playing
2 Attachment(s)
* Super Admin Override feature
* coded by Torch a.k.a. Kurian Abraham. * * When an admin with the OVERRIDE access flag joins the server, all the other * admin's powers are rendered useless. Only admins with the OVERRIDE flag * can use the commands that require admin access flags like amx_kick, map, etc. * When an ordinary admin tries to use an admin command while a Super Admin is on the server, "A Super Administrator is playing on the server. Access overridden." * Ordinary admins will be able to access commands once all Super Admins * have left the server. * * The default OVERRIDE access flag is set to ADMIN_RCON. This is ideal * for obvious reasons. In this case "l" is the corresponding letter in users.ini * * This is a modified version of the default amxmisc.inc file that comes with AMX Mod X. * To use this modification you must recompile all your plugins after replacing * the default amxmisc.inc file with this one. * * Only commands that check access using the cmd_access() function are affected. * Plugins that use get_user_flags() are not supported. * You must modify such plugins to use cmd_access() instead. * * I find this really useful when there are many admins on my server and * they all want to change the map. No more changing map when I'm around. * *Heh heh heh* Instructions People seem to be having a hard time figuring out how to use this. This is not a plugin. There is no SMA file. This is a modified include file which is used by other plugins. 1. Download the attached amxmisc.inc 2. Copy it to the amxmodx\scripting\include folder overwriting the old one. 3. Open up AMXX Studio. 4. In options set the Output path to "<mod dir>\addons\amxmodx\plugins". For example "E:\Program Files\CS\cstrike\addons\amxmodx\plugins". This will make it place the compiled plugins directly in the plugins folder so you need not manually copy the compiled plugins to the plugins folder. 5. Open up all the SMA's in the scripting folder one by one and click Compile. These are the default SMA's that come with AMX Mod X which need recompiling. admin.sma adminchat.sma admincmd.sma adminvote.sma cmdmenu.sma mapsmenu.sma menufront.sma multilingual.sma pausecfg.sma plmenu.sma restmenu.sma statscfg.sma statsx.sma telemenu.sma You should do this for any additional plugins you have installed. So you will have to download the SMA's from their respective forums and recompile them. 6. If you have setup the Output path properly, the recompiled plugins should already be in your plugins folder and ready for action. If you have a rented server then just upload the new plugins as you would normally do. 7. Now you must edit the users.ini file to assign Super Admins. "Torch" "password" "abcdefghijklmnopqrstu" "a" <-- add "l" in access flags for Super Admin. "Jonny" "password" "abcdefghijkmnopqrstu" "a" <-- no "l" means ordinary admin. Jonny cannot use his powers while Torch is playing on the server. Update June 05 Added a CVAR amx_override_spec. If set to 0 then regular admins can access commands if all the Super Admins are in spectator. If set to 1 then regular admins cannot access commands at all if a Super Admin is on the server. Non Counter-Strike mod users should modify the team check. In the switch case, replace the 'T' and 'C' with the first letter of the teams in your mod. Update November 05 It is now compatible with AMX Mod X v1.80. This is NOT backward compatible with previous versions. Update April 12 Made the CVAR amx_override_spec as Static and changed the way it checks if its already registered. This *should* fix any problems people are having with the CVAR. Note that its CVAR so you can only change it through RCON on a dedicated server, or in a Listenserver it can be typed in the console. Recompile ALL plugins with the new version, including AMXX default plugins. Any plugins that were compiled with the old version MUST be recompiled or removed, else they will interfere with the new version. |
Re: Super Admin - Override other admin's access when ur playing
Hi there good work! But it seems a lot of work that you might spare us if you could post the smas with the include in it to us the lazy people. Add a zip with all the plugins in it already prepared. Or for safety reasons ask sanwce or Bail to to this version just in case. and to post it here. Thanks!
|
Re: Super Admin - Override other admin's access when ur playing
Quote:
|
Re: Super Admin - Override other admin's access when ur playing
sounds good
but where is the sma? |
Re: Super Admin - Override other admin's access when ur playing
Quote:
Quote:
|
Re: Super Admin - Override other admin's access when ur playing
I like this idea but what happens if a "super admin" is in specing/afk, can the regular admins sitll do stuff like change map?
|
Re: Super Admin - Override other admin's access when ur playing
Quote:
|
Re: Super Admin - Override other admin's access when ur playing
I have a question. I want to add a CVAR amx_override_spec.
If its set to 0 then regular admins will be able to access commands if all the Super Admins are in Spectator. If its set to 1 then regular admins cannot access commands at all if a Super Admin is on the server in any team or spec. I have coded the logic in the cmd_access function, but i cant register the CVAR! Since its an include file, global variables are not allowed! The only solution i can think of is to write a plugin just for the sake of registering the CVAR. And it must be the VERY FIRST entry in plugins.ini so that the CVAR will be registered before any other plugin can try to read it. |
Re: Super Admin - Override other admin's access when ur playing
OK I just added a check to see if the CVAR already exists. Get_cvar_pointer returns 0 if the CVAR doesnt exist. If it doesnt then the CVAR is registered.
Although this check is performed everytime as its not possible any other way in an include file, I dont think its going to pose an efficiency problem as its only going to be executed when an admin types a command. Which doesnt happed every frame or something :mrgreen: |
Re: Super Admin - Override other admin's access when ur playing
Installed this, works.
Verry usefull for adding some mini admins who are not supposed to have amx powers while there are real admins on the server. GJ man ! ;) |
| All times are GMT -4. The time now is 20:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.