Raised This Month: $12 Target: $400
 3% 

Admins for each map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 11-21-2018 , 14:32   Admins for each map
Reply With Quote #1

Hello,

I was wondering if its possible to add admins for specific maps? Like for de_ maps to add certain players and for cs_ other ones. Would that be achieveable by a plugin?
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-21-2018 , 18:31   Re: Admins for each map
Reply With Quote #2

Quote:
Originally Posted by SomewhereLost View Post
Hello,

I was wondering if its possible to add admins for specific maps? Like for de_ maps to add certain players and for cs_ other ones. Would that be achieveable by a plugin?
Yes, it would.
__________________
Bugsy is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 11-21-2018 , 20:44   Re: Admins for each map
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
Yes, it would.
Any quick suggestion on how to approach it?
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-22-2018 , 02:23   Re: Admins for each map
Reply With Quote #4

Set admin flags on specific users on specific maps:
  1. Load user list for the current map (in plugin_init())
  2. Check if user is in the list (in client_authorized())
  3. If yes, set user flags using set_user_flags() like this:
    Code:
    set_user_flags(id, -1)
    set_user_flags(id,flags)
__________________

Last edited by fysiks; 11-22-2018 at 02:26.
fysiks is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 11-22-2018 , 20:33   Re: Admins for each map
Reply With Quote #5

Grand, thanks for that.
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-07-2018 , 02:43   Re: Admins for each map
Reply With Quote #6

Quote:
Originally Posted by SomewhereLost View Post
Any quick suggestion on how to approach it?
...configuration/maps.htm
__________________

Last edited by DJEarthQuake; 01-21-2019 at 23:16. Reason: trim
DJEarthQuake is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-07-2018 , 23:34   Re: Admins for each map
Reply With Quote #7

Quote:
Originally Posted by DJEarthQuake View Post
...configuration/maps.htm



exec addons/amxmodx/configs/admin/users-de.ini

Demolition admins and so on can be utilized for rapid initial deployment. That eliminates the redundancy one does not have to do it on a per map basis. That's what I recommend. It's right in the manual.
Depending on the mixture, it might be easier to use symbolic linking.
So in this illustration where we have several sorts of rats maps without the same prefix or designation, the symbolic linking overcomes that tragedy short order.
Huh? What is supposed to be in users-de.ini (generally, INI files are not executable)? Also, the link you posted is for map-specific config files that are used for executing .cfg files (cvars and commands) and for .ini files that enable or disable plugins. There is no equivalent for users/admins.

In summary, I don't see anything that you posted that addresses the question.
__________________
fysiks is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 12-08-2018 , 01:21   Re: Admins for each map
Reply With Quote #8

amx_addadmin lines per map config.

amx_reloadadmins in server.cfg to reset each load.
__________________
DJEarthQuake is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-08-2018 , 14:05   Re: Admins for each map
Reply With Quote #9

Quote:
Originally Posted by DJEarthQuake View Post
amx_addadmin lines per map config.

amx_reloadadmins in server.cfg to reset each load.
Unfortunately, that won't work because amx_addadmin adds the admin to users.ini so running amx_reloadadmins won't "reset" anything. The admins will become permanent (until users.ini is edited to remove them) once you play that map once.
__________________
fysiks is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-21-2019 , 18:25   Re: Admins for each map
Reply With Quote #10

This strips server of admins without altering users.ini after it loads and not after the user_flags command can reapply them custom via map prefix configs.
Attached Files
File Type: sma Get Plugin or Get Source (AdminForget.sma - 310 views - 150 Bytes)
__________________

Last edited by DJEarthQuake; 01-22-2019 at 00:18. Reason: refinement
DJEarthQuake 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 08:06.


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