Actions taken on admins with certain flags

Сообщения
27
Реакции
6
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:
ADMIN_CVAR & ADMIN_CFG
are the ones overseeing, governing positions so to say.

PHP:
; g - Creator (ADMIN_CVAR)        - abcdefgklnopqrstuy
; h - CHIEF (ADMIN_CFG)            - abcdefhkly
; i - MEMBER (ADMIN_CHAT)        - bcdefikly
; j - 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:
ADMIN_IMMUNITY
can take actions on other administrators with
PHP:
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:
#if defined HIDE_ME_IN_MENU
        if (id == i) {
            continue;
        }
#endif
This is the whole searching for players function

PHP:
findPlayersForMenu(const id, const TeamName:team) {
    new num = Players[id][PlayerNum];
    for (new player = 1; player <= MaxClients; player++) {
        if (!is_user_connected(player) || TeamName:get_member(player, m_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:
#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
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу