关于 Admin Toggle
安装
- 将 AdminToggle.cs 文件放在 /oxide/plugins/ 中
- 将 XLIB.dll 依赖项放在 /RustDedicated_Data/managed/ 中
- 授予自己默认权限 o.grant user YOURNAME admintoggle.master 需要调整 .master 权限选择器,以适应您所谓的模式权限设置
信息
- AdminToggle允许有权限的管理员在玩家和管理员模式之间切换
- 重置命令打开f1控制台并写入.fix – 将您恢复到玩家模式(困难的方式)
- (权限、优先级、切换命令) – 必须唯一
核心模式特性
- 无限的自定义模式
- 可自定义的权限名称
- 模式的优先级系统
- 主模式
- 氧化物基团切换
- 要切换的自定义命令
- 限制系统指定 Steam ID a certan 模式
模式设置 (admin)
- 需要切换理由
- 切换时自动运行命令
- 分离的库存
- 退出时传送回切换位置
- 断开连接时将身份验证恢复为 0
- 阻止的命令
- 模式中的自定义服装
- 通知(全球聊天通知、本地聊天通知、弹出通知、声音渗透通知和Discord嵌入通知)
- 界面切换按钮、脉冲面板、作菜单
- 阻止的作
- 被阻止的插件钩子
模式设置(播放器)
- 还原时自动运行命令
- 通知(全球聊天通知、本地聊天通知、弹出通知、声音渗透通知和Discord嵌入通知)
- 阻止的命令
- 被阻止的插件钩子
API 钩子
void admintoggle_onAdmin (BasePlayer player) { /*Do something epic*/ } void admintoggle_onPlayer (BasePlayer player) { /*Do something epic*/ }
API 方法
bool IsAdmin(BasePlayer player); object[] GetMode(BasePlayer player, bool TrueMode = false); /* IF player.userID IS ASSIGNED ANY MODE RETURNS TRUE IF player.userID IS NOT ASSIGNED ANY MODE RETURNS FALSE */ bool isAdmin = AdminToggle.Call<bool>("IsAdmin", player.userID); /* IF player IS NOT ASSIGNED MODE RETURNS NULL IF bool IS SET FALSE RETURNS CURRENT MODE -- object[0] permission (string), object[1] priority (int), object[2] isMaster (bool) IF bool IS SET TRUE RETURNS HIGHEST MODE -- object[0] permission (string), object[1] priority (int), object[2] isMaster (bool) */ object[] getMode = AdminToggle.Call<object[]>("GetMode", player, false);
报价{ "MODES": [ { "Permission": "master", "Priority": 999, "Master Level CAREFUL! (Enabling this does the following #Overrides priority, mode & permission system! #Allows to set/get modes for yourself or others! #Overrides limitations by current or lower modes": false, "Toggle Commands": [ "admin", "mode" ], "Restrict Mode To Specfic SteamIds (Leave blank to disable)": [], "Settings": { "On Admin": { "Require Reason": true, "Autorun Commands Use Forward Slash '/' For Chat-Commands & Leave It Blank For Console-Commands": [], "Toggle Groups To Grant (Leave blank to disable)": [ "admin" ], "Specified Auth Level (1 = moderators, 2 = owners) Must either be 1 or 2 cannot be below or above": 2, "Keep Separate Inventories": true, "Teleport Back Upon Exiting": true, "Revert On Disconnect, Restart, Reload": true, "Ignore Server Violations (Bans, Kicks Etc) (Recommended to keep true)": true, "Blocked Commands": [], "Name Prefix Changes your name to a set prefix (Leave blank to disable)": "", "Admin Outfit": { "Enabled": true, "Lock Outfit": true, "Settings": { "(Shortnam::SkinID)": [ "hoodie::1234567890", "pants::1234567890", "shoes.boots::1234567890" ] } }, "Notifications": { "Global Chat": { "Enabled": false, "Settings": { "Chat Icon (SteamID64)": 0, "Text Message Special Color (HEX) Example %message%": "#faaf19", "Text Message": "%{player.name}% Activated %{mode.permission}% Mode" } }, "Self Chat": { "Enabled": true, "Settings": { "Chat Icon (SteamID64)": 0, "Text Message Special Color (HEX) Example %message%": "#faaf19", "Text Message": "%You% Activated %{mode.permission}% Mode" } }, "Self Popup": { "Enabled": false, "Settings": { "Text Message Special Color (HEX) Example %message%": "#faaf19", "Text Message": "%You% Activated %{mode.permission}% Mode" } }, "Self Sound": { "Enabled": false, "Settings": { "Sound (Prefab)": "assets/prefabs/misc/easter/painted eggs/effects/eggpickup.prefab" } }, "Discord": { "Enabled": false, "Settings": { "Webhook": "https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks", "Embed Color": 3315400 } } }, "Interface": { "Button": { "Enabled": false, "Settings": { "Opacity (0.0 to 1.0)": 0.64, "Active Color (HEX)": "#008000", "Inactive Color (HEX)": "#800000", "Active Text": "Activated", "Inactive Text": "Disabled", "Active Text Color (HEX)": "#ffffff", "Inactive Text Color (HEX)": "#ffffff", "Design (Advanced)": { "Anchor": { "Min Width (0.0 - 1.0)": 0.5, "Min Height (0.0 - 1.0)": 0.0, "Max Width (0.0 - 1.0)": 0.5, "Max Height (0.0 - 1.0)": 0.0 }, "Offset": { "Min Width (pixels)": 0, "Min Height (pixels)": 0, "Max Width (pixels)": 60, "Max Height (pixels)": 60, "Offset Points (Relative To Offset)": { "Top (pixels)": 0, "Bottom (pixels)": 18, "Left (pixels)": 0, "Right (pixels)": 263 } } } } }, "Panel": { "Enabled": false, "Settings": { "Text": "A D M I N M O D E A C T I V A T E D", "Text Color (HEX)": "#ffffff", "Pulse Duration ": 1.0, "Design (Advanced)": { "Anchor": { "Min Width (0.0 - 1.0)": 0.5, "Min Height (0.0 - 1.0)": 0.0, "Max Width (0.0 - 1.0)": 0.5, "Max Height (0.0 - 1.0)": 0.0 }, "Offset": { "Min Width (pixels)": 0, "Min Height (pixels)": 0, "Max Width (pixels)": 380, "Max Height (pixels)": 20, "Offset Points (Relative To Offset)": { "Top (pixels)": 0, "Bottom (pixels)": 82, "Left (pixels)": 0, "Right (pixels)": 200 } } } } }, "Menu": { "Enabled": true, "Settings": { "Opacity (0.0 to 1.0)": 0.64, "Not Found Color (HEX)": "#000000", "Active Color (HEX)": "#008000", "Inactive Color (HEX)": "#800000", "Text Color (HEX)": "#ffffff", "Design (Advanced)": { "Anchor": { "Min Width (0.0 - 1.0)": 1.0, "Min Height (0.0 - 1.0)": 0.0, "Max Width (0.0 - 1.0)": 1.0, "Max Height (0.0 - 1.0)": 0.0 }, "Offset": { "Min Width (pixels)": 0, "Min Height (pixels)": 0, "Max Width (pixels)": 180, "Max Height (pixels)": 81, "Offset Points (Relative To Offset)": { "Top (pixels)": 0, "Bottom (pixels)": 16, "Left (pixels)": 0, "Right (pixels)": 392 } } } } } }, "Actions": { "Allow All Actions (Overrides Specfic Actions)": false, "Allow Specfic Actions": { "Can Build": false, "Can Craft": false, "Can Loot Players": true, "Can Loot Entities": true, "Can Damage Structures": true, "Can Interact With Items In Weapons Category": true, "Can Hurt Players": true, "Can Drop Items": true } }, "Third-Party Plugins": { "Autorun Plugins": { "Autorun All": false, "Autorun Specfic": { "AdminRadar": false, "Vanish": true, "Godmode": true } }, "Blocked Plugins": { "Block All": false, "Block Specfic": { "Backpacks": false, "AdminRadar": false, "Vanish": false, "Godmode": false } } } }, "On Player": { "Autorun Commands Use Forward Slash '/' For Chat-Commands & Leave It Blank For Console-Commands": [], "Toggle Groups To Revoke (Leave blank to disable)": [ "admin" ], "Notifications": { "Global Chat": { "Enabled": false, "Settings": { "Chat Icon (SteamID64)": 0, "Text Message Special Color (HEX) Example %message%": "#faaf19", "Text Message": "%{player.name}% Returned To %Player% Mode" } }, "Self Chat": { "Enabled": true, "Settings": { "Chat Icon (SteamID64)": 0, "Text Message Special Color (HEX) Example %message%": "#faaf19", "Text Message": "%You% Returned To %Player% Mode" } }, "Self Popup": { "Enabled": false, "Settings": { "Text Message Special Color (HEX) Example %message%": "#faaf19", "Text Message": "%You% Returned To %Player% Mode" } }, "Self Sound": { "Enabled": false, "Settings": { "Sound (Prefab)": "assets/prefabs/misc/easter/painted eggs/effects/eggpickup.prefab" } }, "Discord": { "Enabled": false, "Settings": { "Webhook": "https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks", "Embed Color": 3315400 } } }, "Blocked Commands": [ "god", "vanish", "freeze", "viewinv", "inspect", "padmin", "playeradministration.show", "spectate" ], "Third-Party Plugins": { "Blocked Plugins": { "Block All": true, "Block Specfic": { "AdminRadar": false, "Vanish": false, "Godmode": false } } } } } } ] }
已知的不兼容插件
默认配置 (1 模式)
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容