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

Actions taken on admins with certain flags


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DJBosma
Member
Join Date: Dec 2009
Old 03-31-2020 , 15:50   Actions taken on admins with certain flags
Reply With Quote #1

Dear all,

Some basic skills need to be refreshed in my memory.

I've divided administrators into groups and am setting up the plmenu and certain commands for admins.
Administrators with Flags:
PHP Code:
ADMIN_CVAR ADMIN_CFG 
are the ones overseeing, governing positions so to say.

PHP Code:
Creator (ADMIN_CVAR)        - abcdefgklnopqrstuy
CHIEF (ADMIN_CFG)            - abcdefhkly
MEMBER (ADMIN_CHAT)        - bcdefikly
SUPPORT (ADMIN_VOTE)        - bcefjkly 
What I need is that no admins should be able to use commands against the group's Creator and Chief.

As well that only administrators with
PHP Code:
ADMIN_IMMUNITY 
can take actions on other administrators with
PHP Code:
ADMIN_IMMUNITY 
I am using this already to hide my own name in the menu. When setting an example, please do not include this since it's an option I've disabled due to testing purposes.

PHP Code:
#if defined HIDE_ME_IN_MENU
        
if (id == i) {
            continue;
        }
#endif 
This is the whole searching for players function

PHP Code:
findPlayersForMenu(const id, const TeamName:team) {
    new 
num Players[id][PlayerNum];
    for (new 
player 1player <= MaxClientsplayer++) {
        if (!
is_user_connected(player) || TeamName:get_member(playerm_iTeam) != team) {
            continue;
        }

#if defined HIDE_ME_IN_MENU
        
if (id == i) {
            continue;
        }
#endif

        
Players[id][PlayerList][num] = player;
        
Players[id][PlayerIds][num] = get_user_userid(player);
        
num++;
    }

    
Players[id][PlayerNum] = num;

I'm wondering if these definitions apply only to commands made in the console?

PHP Code:
#define CMDTARGET_OBEY_IMMUNITY (1<<0)
#define CMDTARGET_ALLOW_SELF    (1<<1)
#define CMDTARGET_ONLY_ALIVE    (1<<2)
#define CMDTARGET_NO_BOTS        (1<<3) 
Greetings

Last edited by DJBosma; 03-31-2020 at 15:51.
DJBosma is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-31-2020 , 22:55   Re: Actions taken on admins with certain flags
Reply With Quote #2

It sounds like you might be interested in Admin Hierarchy by Bugsy. Not entirely sure but check it out and see how it works, maybe it can do something similar to what you're trying to do.

The CMDTARGET constants apply only when they are used i.e. when cmd_target() is used.
__________________
fysiks is offline
DJBosma
Member
Join Date: Dec 2009
Old 04-01-2020 , 03:44   Re: Actions taken on admins with certain flags
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
It sounds like you might be interested in Admin Hierarchy by Bugsy. Not entirely sure but check it out and see how it works, maybe it can do something similar to what you're trying to do.

The CMDTARGET constants apply only when they are used i.e. when cmd_target() is used.
@bugsy 's plugin removes flags when a higher ranking admin joins. Not what I am looking for. There sure must be a way to acomplish this..
DJBosma is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-01-2020 , 14:10   Re: Actions taken on admins with certain flags
Reply With Quote #4

Maybe this will help - https://github.com/alliedmodders/amxmodx/pull/480
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 20:18.


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