Изменение флага в плагине Weapons Restricks

guccigay

Участник
Сообщения
50
Реакции
18
Люди добрые, не подскажете, как изменить флаг доступа админов к меню плагина на сервере?
P.S какой путь у файла, и как изменить в нем флаг.По дефолту h)
 

Mr_panica

XenForo one 💖
Сообщения
942
Реакции
453
Во всех плагинах принцип один и тот же.
Найдите строчку которая начинается с RegAdminCmd, замените там третье значение на нужное Вам.
Значение можно взять тут: Checking Admin Flags (SourceMod Scripting) - AlliedModders Wiki

Тоесть:
У нас есть команда sm_kick, она в плагине будет зарегистрирована как RegAdminCmd("sm_kick", Command_Kick, ADMFLAG_KICK, "sm_kick <#userid|name> [reason]");
1574710301597.png



Вот буквенное обозначение флагов, то есть берём значение от сюда Checking Admin Flags (SourceMod Scripting) - AlliedModders Wiki и смотрим:
#define ADMFLAG_CONVARS == cvar h флаг (h)
NameFlagPurpose
reservationaReserved slot access.
genericbGeneric admin; required for admins.
kickcKick other players.
bandBan other players.
unbaneRemove bans.
slayfSlay/harm other players.
changemapgChange the map or major gameplay features.
cvarhChange most cvars.
configiExecute config files.
chatjSpecial chat privileges.
votekStart or create votes.
passwordlSet a password on the server.
rconmUse RCON commands.
cheatsnChange sv_cheats or use cheating commands.
rootzMagically enables all flags and ignores immunity values.
custom1oCustom Group 1.
custom2pCustom Group 2.
custom3qCustom Group 3.
custom4rCustom Group 4.
custom5sCustom Group 5.
custom6tCustom Group 6.
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 */

P.S
Или же через admin_overrides.cfg...
 
Последнее редактирование:
Сверху Снизу