rust区域控制器,生成各种特殊区域圆顶

rust区域管理器是用于游戏内创建高级区域的管理器,之前我就用来添加PVP或者PVE区域,就比如你的pve服,可以在某个地方设置成pvp区域,这样想打架的在一边,不想打架的在另一边,非常好用的插件。如果你是pvp服,可以设置一片区域是pve,玩家进入这片以后都无法攻击其他玩家。当然不止于此,代码都给大家翻译过来了,自己慢慢研究一下。

rust区域控制器,生成各种特殊区域圆顶

权限

该插件使用权限系统。要分配权限,请使用

oxide.grant <user or group> <name or steam id> <permission>. 要删除权限,请使用

oxide.revoke <user or group> <name or steam id> <permission>.

zonemanager.zone— 允许访问聊天/控制台命令

zonemanager.ignoreflag.<flagtype>— 允许玩家绕过区域上设置的任何标志。替换<flagtype为您希望忽略的标志

确保您不会盲目地授予玩家任何忽略标志!

如果您不确定授予忽略标志的结果是什么,只需查看标志的作用,并通过授予忽略标志权限,玩家将能够绕过标志影响

聊天命令

这些仅适用于具有 auth 级别 2 或权限的玩家zonemanager.zone

/zone_add – 在您的位置创建一个新区域

/zone_edit <区域 ID> – 编辑具有指定 ID 的区域

/zone_list – 列出所有区域及其对应的区域 ID

/zone_remove <zone ID> – 删除指定 ID 的 zone

/zone_wipe – 删除所有区域

/zone_player <opt:player ID or name> – 显示指定玩家所在区域的信息以及他们当前拥有的标志

/zone_stats – 显示所有区域中各种实体的数量

/zone flags – 打开 UI 标志编辑器

/zone <flag> <value> – 设置指定的字段或标志

区域标志

区域标志是可以应用于区域的条件。要设置区域标志,您必须首先编辑目标区域。然后,您可以通过键入 将标志应用到区域/zone <option> <value>

您可以通过继续该模式在一行中应用多个标志(例如/zone弹出真正的killsleepers true nobuild true)

或者,您可以键入/zone flags以打开一个 GUI 菜单,您可以在其中轻松切换标志。

标志类型

这些都是可用的标志。首先是标志的名称,然后是它接受的值类型。

  autolights – true/false -根据时间自动打开和关闭灯(时间可以在配置中设置)

  eject – true/false – 所有玩家在尝试进入该区域时都会被踢出该区域,除非他们在区域白名单上,或者拥有与该区域相关的权限。(此标志不会影响管理员)

  jectsleepers – true/false – 玩家睡觉时将被移出区域(此标志不会影响管理员)

  infinitetrapammo – true/false – 火焰炮塔、机关炮和自动炮塔不会消耗燃料

  kill – true/false – 玩家进入区域时将被杀死

  killsleepers – true/false – 玩家睡觉时将被杀死(此标志不会影响管理员)

  lootself – true/false -玩家将能够掠夺自己的尸体/包。此标志仅适用于标志 NoPlayerLoot 在区域上处于活动状态时

  noapctargeting – true/false -APC 不会瞄准区域内的玩家

  nobleed – true/false – 玩家不会流血

  noboxloot – true/false – 防止玩家抢劫箱子

  nobuild – true/false – 阻止玩家建造(此标志不会影响管理员)

  nochat – true/false – 阻止玩家使用聊天(此标志不会影响管理员)

  nocollect – true/false – 防止玩家捡起收藏品

  nocorpse – true/false – 移除玩家尸体

  nocraft – true/false -禁用区域中的制作

  nocup – true/false – 防止玩家放置工具柜

  nodecay – true/false – 不会腐蚀

  nodeploy – true/false – 阻止玩家部署物品(此标志不会影响管理员)

  nodooraccess – true/false – 阻止玩家开门

  nodrop – true/false -移除掉落的物品

  nodrown – true/false -防止玩家溺水

  noentitypickup – true/false -防止玩家拾取实体,例如门、锁等

  nofalldamage – true/false – 防止玩家受到坠落伤害

  nogather – true/false – 阻止玩家收集资源

  nohelitargeting – true/false – 阻止直升机瞄准玩家并将他们发送到新位置

  nokits – true/false – 防止玩家领取装备(装备插件)

  nolootspawns – true/false -防止战利品在该区域生成

  nonpcspawns – true/false -防止动物在区域中生成

  nonpctargeting – true/false – NPC 玩家不会瞄准区域内的玩家

  nooventoggle – true/false – 防止玩家打开/关闭烤箱/灯/火等

  nopickup – true/false – 防止玩家捡起掉落的物品

  noplayerloot – true/false – 防止玩家掠夺其他玩家

  nopve – true/false – 动物对玩家的攻击是无敌的

  noremove – true/false – 阻止玩家使用移除工具(RemoveTool 插件)

  nosignupdates – true/false – 阻止玩家更新标志

  noshop – true/false -阻止玩家使用商店 (GUIShop/ServerRewards)

  nostability – true/false -禁用结构稳定性

  nostash – true/false – 防止玩家隐藏藏匿处

  nosuicide – true/false – 阻止玩家使用自杀命令

  notp – true/false – 防止玩家使用传送(传送插件)

  notrade – true/false – 阻止玩家交易(交易插件)

  noturrettargeting – true/false – 阻止炮塔瞄准玩家(autoturret/flameturret/guntrap)

  noupgrade – true/false – 建筑物无法升级(此标志不会影响管理员)

  novending – true/false – 阻止玩家使用自动售货机

  novoice – true/false – 阻止玩家使用语音聊天(此标志不会影响管理员)

  nowounded – true/false – 当玩家死亡时跳过受伤状态

  keepvehiclesin – true/false – 区域内的车辆将被阻止离开

  keepvehiclesout – true/false – 车辆将被阻止进入该区域

  npcfreeze – true/false – 阻止动物四处走动

  pvegod – true/false – 玩家将拥有 PVE 神模式

  pvpgod – true/false – 玩家将拥有 PVP 神模式

  sleepgod – true/false – 睡觉的玩家会有上帝模式

  undestr – true/false – 建筑物不会受到伤害

  区域选项

  还有一些区域选项可以像设置标志一样设置/调整。

  name – “Zone Name” – 设置区域名称

  id – “ID number” – 设置区域ID

  location – “here” 或 “x y z” – 通过使用“这里”值,区域位置将移动到您的位置,否则通过键入坐标 (xyz) 手动设置位置

  radius – Number amount – 设置区域的半径(如果使用球形区域)

  size – “width height length” – 设置区域的大小(用于创建矩形区域。确保输入宽度、高度和长度为代表您希望区域大小的数字

  rotation – “y rotation” or no value – 将矩形区域旋转到指定的 Y 值,或者如果没有给出值,它将是您所面对的方向

  radiation – Number amount – 向该区域添加辐射

  safezone – true/false – 将区域设置为与复合区相同的安全区,在该区域中无法拔出武器且无法对玩家造成伤害

  enter_message – “修改这里可以设置玩家进入区域的提示” -设置玩家进入区域时向他们显示的消息

  leave_message – “修改这里可以设置玩家离开区域的提示” – 设置在玩家离开区域时显示给玩家的消息

  ejectspawns – “Spawnfile name” – 指定一个 spawnfile 来弹出玩家,作为将他们传送到区域外的替代方法

  permission – “Permission name” – 为这个区域分配一个权限,以防止没有权限的玩家进入它

  enabled – true/false – 启用或禁用此区域

  parentid – “Zone ID” – 设置父区域

  管理房屋的示例区域创建:

  复制/zone_add

  /zone nobuild true nodeploy true name “Admin House” undestr true

  在这里您可以看到我们创建了一个新区域,将其命名为“Admin House”,并将 nobuild、nodeploy 和 undest 标志设置为 true。这将阻止玩家在该区域建造、部署物品和破坏建筑物。

父/子区

默认情况下,其他区域内的较小区域继承较大区域的标志,以及分配给较小区域的标志。

要解决此问题,您可以使用命令“/zone parentid <zoneid>”将父区域 ID 分配给较小的区域。

该插件仍会将玩家注册为位于两个区域内,但是当该玩家进入子区域(外部区域内的较小区域)时,该玩家将禁用父区域(较大的外部区域)的所有标志。

如果您正在使用此功能并且仍希望将父区域中的某些标志应用到播放器,请同时将这些标志应用到子区域。

配置

可以在目录

ZoneManager下的文件中配置设置和选项

config。建议使用编辑器和验证器来避免格式​​问题和语法错误。

{
  "Autolight Options": {
    "Time to turn lights on": 18.0,
    "Time to turn lights off": 6.0,
    "Lights require fuel to activate automatically": true
  },
  "Notification Options": {
    "Display notifications via PopupNotifications": false,
    "Chat prefix": "[Zone Manager] :",
    "Chat color (hex)": "#d85540"
  },
  "NPC players can deal player damage in zones with PvpGod flag": false,
  "Allow decay damage in zones with Undestr flag": false,
  "Version": {
    "Major": 3,
    "Minor": 0,
    "Patch": 0
  }
}

开发者 API

(bool) CreateOrUpdateZone(string ZoneID, string[] args, Vector3 position = default(Vector3)) // Create or Update a Zone from an external plugin
// Parameter 1: is the Zone ID that you want (can be a name)
// Parameter 2: are the options as you would put them in /zone ex:
// args[0] = "name"
// args[1] = "Jail"
// args[2] = "eject"
// args[3] = "true"
// args[4] = "enter_message"
// args[5] = "Welcome to the jail"
// args[6] = "radius"
// args[7] = "120"
// Parameter 3 (optional): is to set or edit the location of the zone
// Returns true if the zone is valid, else returns false if it was saved but not created (only reason would be that no position for the zone was set)
(bool) EraseZone(string ZoneID) // Erase a zone by ZoneID or name.
// Returns true if the zone was deleted or false if the zone doesn't exist
(List<BasePlayer>) GetPlayersInZone(string ZoneID) // Get the list of players in the specified zone
(List<BaseEntity>) GetEntitiesInZone(string ZoneID) // Get the list of entities in the specified zone
(bool) IsPlayerInZone(string ZoneID, BasePlayer player) // Returns true if the player is in the specified zone, else returns false
(bool) IsEntityInZone(string ZoneID, BaseEntity entity) // Returns true if the entity is in the specified zone, else returns false
(bool) AddPlayerToZoneKeepinlist(string ZoneID, BasePlayer player) // Will "jail" the player to the specified zone and keep them from leaving. If the player is not already in the zone they will automatically be teleported to the zone.
// Make sure that if you have the zone flag "eject" set to true that you add the player to the zone whitelist before forcing them inside!
// Returns true if all went accordingly or false if the zone does not exist
(bool) RemovePlayerFromZoneKeepinlist(string ZoneID, BasePlayer player) // Will allow previously "jailed" players to leave the zone. This will not teleport the player out of the zone.
// Returns true if all went accordingly or false if the zone does not exist
(void) SetZoneStatus(string zoneID, bool active) // Set the zone with the specified ID as enabled or disabled
(object) GetZoneRadius(string zoneID) // Returns the radius (float), or null if the zone does not exist.
(object) GetZoneSize(string zoneID) // Returns the size (Vector3), or null if the zone does not exist.
(object) GetZoneName(string zoneID) // Returns the zone name (string), or null if the zone does not exist.
(object) CheckZoneID(string zoneID) // Returns the zone ID (string) if it exists, or null if the zone does not exist.
(object) GetZoneIDs() // Returns the a string[] or zone ID's, or null if no zones exist.
(Vector3) GetZoneLocation(string zoneID) // Returns the position of the specified zone, or Vector3.zero if the zone does not exist.
(Dictionary<string, string>) ZoneFieldList(string zoneID) // Returns the zone with the specified ID's zone definition. This includes all the fields and data that make the zone what it is
(bool) HasFlag(string zoneId, string flagString) // Returns true if the zone with the specified ID has the specified flag, else returns false
(void) AddFlag(string zoneId, string flagString) // Adds the specified flag to the zone with the specified ID
(void) RemoveFlag(string zoneId, string flagString) // Removes the specified flag from the zone with specified ID
// Disabled flags are temporary. They do not persist through reloads
(bool) HasDisabledFlag(string zoneId, string flagString) // Returns true if the zone with the specified ID has the specified flag disabled, else returns false
(void) AddDisabledFlag(string zoneId, string flagString) // Adds the specified disabled flag to the zone with the specified ID
(void) RemoveDisabledFlag(string zoneId, string flagString) // Removes the specified disabled flag from the zone with specified ID
(bool) EntityHasFlag(BaseEntity entity, string flagString) // Returns true if the entity is in any zone with the specified flag, else returns false
(bool) PlayerHasFlag(BasePlayer player, string flagString) // Returns true if the player is in any zone with the specified flag, else returns false
(string[]) GetPlayerZoneIDs(BasePlayer player) // Returns a string[] of IDs for zones the specified player is currently in, or null if none found
(string[]) GetEntityZoneIDs(BaseEntity entity) // Returns a string[] of IDs for zones the specified entity is currently in, or null if none found

挂钩

void OnEnterZone(string ZoneID, BasePlayer player) // Called when a player enters a zone
{
}
void OnExitZone(string ZoneID, BasePlayer player) // Called when a player leaves a zone
{
}
void OnEntityEnterZone(string ZoneID, BaseEntity entity) // Called when a entity enters a zone
{
}
复制void OnEntityExitZone(string ZoneID, BaseEntity entity) // Called when a entity leaves a zone
{
}
© 版权声明
THE END
苦逼小编求支持
点赞10赞赏 分享
相关推荐
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容