插件介绍
将命令绑定到电话号码
Allows you to bind set of commands to telephone number with support of permissions and cooldowns. Players can use any phone to call those numbers and server will execute commands for them if all conditions are met. Command phone numbers are automatically added to top of public directory and all crafted phones have them in contact list.
DEMO
There are no default permissons, but you can assign permission to telephone number. More info in configuration section.
Discord: marcuzz#6608
主要用途
主要用于phone、commands、telephone、mobile等服务端功能。 本插件由 marcuzz 发布,当前目录记录版本为 v0.0.10,uMod 累计下载 2,023 次。
适用场景
- 希望扩展原版服务器功能的服主
功能分类
查看 uMod 官方英文简介
Bind commands to phone numbers
权限节点
There are no default permissons, but you can assign permission to telephone number. More info in configuration section.
授权示例:oxide.grant user 玩家名 权限节点;撤销使用 oxide.revoke。
配置说明
{ "AddCommandsToContactList": true, "BlockChatCommandsBoundToPhoneNumber": false, "EffectEnabled": true, "EffectFailed": "assets/prefabs/npc/scientist/sound/death.prefab", "EffectSuccess": "assets/prefabs/npc/scientist/sound/respondok.prefab", "PhoneCommands": [ { "Cooldown": 3600, "Permission": "phonecommands.vip", "RestrictLandlinePhones": false, "RestrictMobilePhones": false, "RestrictPublicPhones": false, "PhoneActions": [ { "Command": "inventory.giveto {0} xmas.present.large 1", "Type": "command" }, { "Command": "{1} just recieved large gift! Call {6:####-####} to get it too.", "Type": "broadcast" } ], "PhoneName": "Hourly gift", "PhoneNumber": 12345678 }, { "Cooldown": 0, "Permission": null, "RestrictLandlinePhones": false, "RestrictMobilePhones": false, "RestrictPublicPhones": false, "PhoneActions": [ { "Command": "Command executed - player id: {0}, player name: {1}, position x,y,z: {2},{3},{4}, grid coord: {5}, called number: {6:####-####}", "Type": "reply" } ], "PhoneName": "Another example", "PhoneNumber": 87654321 } ] }
AddCommandsToContactList - true/false - automatically add commands to crafted phone contact list.
BlockChatCommandsBoundToPhoneNumber - true/false - allows only phone execution of bound chat commands
EffectEnabled - true/false - allow response sound effects
EffectFailed - prefab name - response effect to be played when on cooldown or without permission
EffectSuccess - prefab name - response effect to be played when all conditions are met
PhoneName - name to be listed in public directory and contact list, maximum of 19 characters
PhoneNumber - 8 digits, no spaces
Cooldown - how many seconds player needs to wait before using that number again (cooldown not applied to admins)
Permission - specify permission required to use, or set null (permission requirement not applied to admins)
RestrictLandlinePhones - prevents using deployed phones to call this number
RestrictMobilePhones - prevents using mobile phones to call this number
RestrictPublicPhones - prevents using public phone booths to call this number
PhoneActions - one or more actions to be executedCommand - command string with placeholders (see configuration example)Type - type of command: server for server command, broadcast for message to all player, reply for message to calling player, playerchat for message from calling player (used for chat commands, see below)
Command - command string with placeholders (see configuration example)
Type - type of command: server for server command, broadcast for message to all player, reply for message to calling player, playerchat for message from calling player (used for chat commands, see below)
for chat commands, use playerchat type
make sure to add slash / or it will be just player message
optionaly set BlockChatCommandsBoundToPhoneNumber to true, so only phone call can execute this command
note that chat command's permission, cooldowns and other conditions are handled by its plugin, so PhoneCommands will play success effect every time, unless you add cooldown or permission to this configuration aswell
{ "Cooldown": 0, "Permission": null, "PhoneActions": [ { "Command": "/callheli", "Type": "playerchat" } ], "PhoneName": "Request heli", "PhoneNumber": 79463164 }
官方配置示例
{
"AddCommandsToContactList": true,
"BlockChatCommandsBoundToPhoneNumber": false,
"EffectEnabled": true,
"EffectFailed": "assets/prefabs/npc/scientist/sound/death.prefab",
"EffectSuccess": "assets/prefabs/npc/scientist/sound/respondok.prefab",
"PhoneCommands": [
{
"Cooldown": 3600,
"Permission": "phonecommands.vip",
"RestrictLandlinePhones": false,
"RestrictMobilePhones": false,
"RestrictPublicPhones": false,
"PhoneActions": [
{
"Command": "inventory.giveto {0} xmas.present.large 1",
"Type": "command"
},
{
"Command": "{1} just recieved large gift! Call {6:####-####} to get it too.",
"Type": "broadcast"
}
],
"PhoneName": "Hourly gift",
"PhoneNumber": 12345678
},
{
"Cooldown": 0,
"Permission": null,
"RestrictLandlinePhones": false,
"RestrictMobilePhones": false,
"RestrictPublicPhones": false,
"PhoneActions": [
{
"Command": "Command executed - player id: {0}, player name: {1}, position x,y,z: {2},{3},{4}, grid coord: {5}, called number: {6:####-####}",
"Type": "reply"
}
],
"PhoneName": "Another example",
"PhoneNumber": 87654321
}
]
}
{
"Cooldown": 0,
"Permission": null,
"PhoneActions": [
{
"Command": "/callheli",
"Type": "playerchat"
}
],
"PhoneName": "Request heli",
"PhoneNumber": 79463164
}
更新日志
本站记录 uMod 官方插件信息。完整的历史更新日志请参阅 uMod 官方页面。
安装方法
- 确认服务器已安装 Oxide / uMod 或兼容的 Carbon 框架。
- 登录本站后点击"下载",由本站已校验的本地缓存提供作者发布的文件。
- 将 .cs 文件放入服务器的
oxide/plugins目录。 - 观察服务端控制台,确认插件编译并成功加载。
- 具体配置、权限、指令和依赖请查看原作者的 uMod 页面。
使用前注意
- Rust 更新后,请先确认插件是否仍兼容当前服务端版本。
- 修改配置前建议备份原配置文件,并在测试服验证后再部署到正式服。
- 若插件依赖其他扩展或库,以 uMod 原作者页面的最新说明为准。
- 本站中文内容用于辅助理解,遇到版本差异时以官方英文文档和源码为准。
中文介绍由 uMod 官方简介翻译整理。插件著作权、许可证、完整文档和最新发布状态均以原作者及 uMod 官方页面为准。