Как узнать флаг администратора?

sehor

Участник
Сообщения
75
Реакции
4
В многих плагинах я вижу тему о " Флаг админа "
Я посмотрел в интернете и не чего не нашел.
Можете объяснить как узнать или какие есть флаги у админов?
 

Mr_panica

XenForo one 💖
Сообщения
921
Реакции
435
Бывают такие:
Для плагинов (в основном)
C-подобный:
#define ADMFLAG_RESERVATION            (1<<0)        /**< Convenience macro for Admin_Reservation as a FlagBit */
#define ADMFLAG_GENERIC                (1<<1)        /**< Convenience macro for Admin_Generic as a FlagBit */
#define ADMFLAG_KICK                (1<<2)        /**< Convenience macro for Admin_Kick as a FlagBit */
#define ADMFLAG_BAN                    (1<<3)        /**< Convenience macro for Admin_Ban as a FlagBit */
#define ADMFLAG_UNBAN                (1<<4)        /**< Convenience macro for Admin_Unban as a FlagBit */
#define ADMFLAG_SLAY                (1<<5)        /**< Convenience macro for Admin_Slay as a FlagBit */
#define ADMFLAG_CHANGEMAP            (1<<6)        /**< Convenience macro for Admin_Changemap as a FlagBit */
#define ADMFLAG_CONVARS                (1<<7)        /**< Convenience macro for Admin_Convars as a FlagBit */
#define ADMFLAG_CONFIG                (1<<8)        /**< Convenience macro for Admin_Config as a FlagBit */
#define ADMFLAG_CHAT                (1<<9)        /**< Convenience macro for Admin_Chat as a FlagBit */
#define ADMFLAG_VOTE                (1<<10)        /**< Convenience macro for Admin_Vote as a FlagBit */
#define ADMFLAG_PASSWORD            (1<<11)        /**< Convenience macro for Admin_Password as a FlagBit */
#define ADMFLAG_RCON                (1<<12)        /**< Convenience macro for Admin_RCON as a FlagBit */
#define ADMFLAG_CHEATS                (1<<13)        /**< Convenience macro for Admin_Cheats as a FlagBit */
#define ADMFLAG_ROOT                (1<<14)        /**< Convenience macro for Admin_Root as a FlagBit */
#define ADMFLAG_CUSTOM1                (1<<15)        /**< Convenience macro for Admin_Custom1 as a FlagBit */
#define ADMFLAG_CUSTOM2                (1<<16)        /**< Convenience macro for Admin_Custom2 as a FlagBit */
#define ADMFLAG_CUSTOM3                (1<<17)        /**< Convenience macro for Admin_Custom3 as a FlagBit */
#define ADMFLAG_CUSTOM4                (1<<18)        /**< Convenience macro for Admin_Custom4 as a FlagBit */
#define ADMFLAG_CUSTOM5                (1<<19)        /**< Convenience macro for Admin_Custom5 as a FlagBit */
#define ADMFLAG_CUSTOM6                (1<<20)        /**< Convenience macro for Admin_Custom6 as a FlagBit */

И такие (для всего остального, например прописывания в admin_overrides.cfg)
Прописываются буквы (a,b,c,d и т.д)
C-подобный:
Flags
    {
        "reservation"    "a"            //Reserved slots
        "generic"        "b"            //Generic admin, required for admins
        "kick"            "c"            //Kick other players
        "ban"            "d"            //Banning other players
        "unban"            "e"            //Removing bans
        "slay"            "f"            //Slaying other players
        "changemap"        "g"            //Changing the map
        "cvars"            "h"            //Changing cvars
        "config"        "i"            //Changing configs
        "chat"            "j"            //Special chat privileges
        "vote"            "k"            //Voting
        "password"        "l"            //Password the server
        "rcon"            "m"            //Remote console
        "cheats"        "n"            //Change sv_cheats and related commands
      
        /**
         * Custom flags can be used by plugins, but they can also be used to
         * for you to expand on the previous groups, using Overrides.
         */
      
        "custom1"        "o"
        "custom2"        "p"
        "custom3"        "q"
        "custom4"        "r"
        "custom5"        "s"
        "custom6"        "t"
      
        /**
         * Root is a magic access flag that grants all permissions.
         * This should only be given to trusted administrators.
         * Root users can target anyone regardless of immunity,
         * however, they themselves are not automatically immune.
         */
        "root"            "z"
    }
 

hirowatch

Живет ХЛмод`ом
Сообщения
2,722
Реакции
1,634
@sehor,
upload_2019-2-5_19-59-7.png

Нету ничего в интернете?
 

sehor

Участник
Сообщения
75
Реакции
4
Есть, но я вписывал "флаг админ" и не чего не находило.
--- Добавлено позже ---
Бывают такие:
Для плагинов (в основном)
C-подобный:
#define ADMFLAG_RESERVATION            (1<<0)        /**< Convenience macro for Admin_Reservation as a FlagBit */
#define ADMFLAG_GENERIC                (1<<1)        /**< Convenience macro for Admin_Generic as a FlagBit */
#define ADMFLAG_KICK                (1<<2)        /**< Convenience macro for Admin_Kick as a FlagBit */
#define ADMFLAG_BAN                    (1<<3)        /**< Convenience macro for Admin_Ban as a FlagBit */
#define ADMFLAG_UNBAN                (1<<4)        /**< Convenience macro for Admin_Unban as a FlagBit */
#define ADMFLAG_SLAY                (1<<5)        /**< Convenience macro for Admin_Slay as a FlagBit */
#define ADMFLAG_CHANGEMAP            (1<<6)        /**< Convenience macro for Admin_Changemap as a FlagBit */
#define ADMFLAG_CONVARS                (1<<7)        /**< Convenience macro for Admin_Convars as a FlagBit */
#define ADMFLAG_CONFIG                (1<<8)        /**< Convenience macro for Admin_Config as a FlagBit */
#define ADMFLAG_CHAT                (1<<9)        /**< Convenience macro for Admin_Chat as a FlagBit */
#define ADMFLAG_VOTE                (1<<10)        /**< Convenience macro for Admin_Vote as a FlagBit */
#define ADMFLAG_PASSWORD            (1<<11)        /**< Convenience macro for Admin_Password as a FlagBit */
#define ADMFLAG_RCON                (1<<12)        /**< Convenience macro for Admin_RCON as a FlagBit */
#define ADMFLAG_CHEATS                (1<<13)        /**< Convenience macro for Admin_Cheats as a FlagBit */
#define ADMFLAG_ROOT                (1<<14)        /**< Convenience macro for Admin_Root as a FlagBit */
#define ADMFLAG_CUSTOM1                (1<<15)        /**< Convenience macro for Admin_Custom1 as a FlagBit */
#define ADMFLAG_CUSTOM2                (1<<16)        /**< Convenience macro for Admin_Custom2 as a FlagBit */
#define ADMFLAG_CUSTOM3                (1<<17)        /**< Convenience macro for Admin_Custom3 as a FlagBit */
#define ADMFLAG_CUSTOM4                (1<<18)        /**< Convenience macro for Admin_Custom4 as a FlagBit */
#define ADMFLAG_CUSTOM5                (1<<19)        /**< Convenience macro for Admin_Custom5 as a FlagBit */
#define ADMFLAG_CUSTOM6                (1<<20)        /**< Convenience macro for Admin_Custom6 as a FlagBit */

И такие (для всего остального, например прописывания в admin_overrides.cfg)
Прописываются буквы (a,b,c,d и т.д)
C-подобный:
Flags
    {
        "reservation"    "a"            //Reserved slots
        "generic"        "b"            //Generic admin, required for admins
        "kick"            "c"            //Kick other players
        "ban"            "d"            //Banning other players
        "unban"            "e"            //Removing bans
        "slay"            "f"            //Slaying other players
        "changemap"        "g"            //Changing the map
        "cvars"            "h"            //Changing cvars
        "config"        "i"            //Changing configs
        "chat"            "j"            //Special chat privileges
        "vote"            "k"            //Voting
        "password"        "l"            //Password the server
        "rcon"            "m"            //Remote console
        "cheats"        "n"            //Change sv_cheats and related commands
     
        /**
         * Custom flags can be used by plugins, but they can also be used to
         * for you to expand on the previous groups, using Overrides.
         */
     
        "custom1"        "o"
        "custom2"        "p"
        "custom3"        "q"
        "custom4"        "r"
        "custom5"        "s"
        "custom6"        "t"
     
        /**
         * Root is a magic access flag that grants all permissions.
         * This should only be given to trusted administrators.
         * Root users can target anyone regardless of immunity,
         * however, they themselves are not automatically immune.
         */
        "root"            "z"
    }
Спасибо большое
 

Grey83

не пишу плагины с весны 2022
Сообщения
8,521
Реакции
4,980
@sehor, буквенное обозначение флагов можно увидеть/настроить в файле ...\addons\sourcemod\configs\admin_levels.cfg
Сами флаги можно найти в файле ...\addons\sourcemod\scripting\include\admin.inc
Само содержание этих фалов процитировал Mr_panica
 
Сверху Снизу