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

Actions taken on admins with certain flags


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 17:02.


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