01命令
| 名称 | 说明 |
|---|---|
/buyvending | Purchase a player-owned vending machine of the given type at your current position. Args: [type]. |
/vendingmenu | Open the overview menu listing all of your owned vending machines. |
/restockvending | Restock a slot on the closest owned machine using items from inventory. Args: [slot] [amount]. |
/setprice | Set the price for a slot on the closest owned machine. Args: [slot] [price]. |
/withdrawvending | Withdraw accumulated earnings from the closest owned machine to your bank. |
/deletevending | Sell the closest owned machine for half price plus pending earnings. |
/vendingdebug | Developer helper that scans for vending props and player-owned machines within 15m. |
/vendingspawn | Admin opens the placement spawner UI for placing/deleting world vending machines (Config.SpawnerCommand).仅管理员 |
+值得了解
本页列出了 Agency-Vending 中所有可用的游戏内命令。这些命令允许玩家管理他们的自动售货机、补充库存、设置价格和提取利润。管理员可以使用额外命令放置或删除世界自动售货机。命令名称和权限由配置和组设置决定,详见您的服务器文件。
- 玩家售货命令
- 玩家可以使用命令购买自动售货机,打开售货概览,补充货槽,设置价格,提取收益,并使用 /deletevending 以半价加待结算收益出售最近的拥有机器。每个命令作用于最近的拥有售货机,且必须按需提供如 [type]、[slot]、[amount] 或 [price] 等参数。
- 仅限管理员的生成命令
- /vendingspawn 命令由配置中的命令名称定义,仅限属于 admin、superadmin 或 god 组的用户,或拥有 ace 权限 agency-vending.admin 的用户使用。该命令打开放置生成器界面,用于管理世界自动售货机。
- 开发者调试命令
- /vendingdebug 命令会扫描15米范围内的自动售货机道具和玩家拥有的机器。这有助于排查道具检测问题或在开发及服务器设置期间验证机器放置情况。
?常见问题
如何更改自动售货机生成命令的名称?
您可以通过编辑配置中的 Config.SpawnerCommand 值来更改管理员自动售货机生成命令。修改后,重启 Agency-Vending 资源以使新命令名称生效。
谁可以使用 /vendingspawn 命令?
只有属于 admin、superadmin 或 god 组的用户,或被授予 ace 权限 agency-vending.admin 的用户,才能使用 /vendingspawn 命令。此限制确保只有授权人员可以放置或移除世界中的自动售货机。
如果命令无法使用,我该怎么办?
首先,检查命令名称是否与配置中设置的匹配。确保您拥有管理员命令所需的权限或组成员资格。如果您更改了配置中的命令,重启 Agency-Vending 资源以应用更改。
命令运行需要依赖项吗?
是的,Agency-Vending 需要 oxmysql 才能正常运行。可选依赖如 ox_target、qb-target 和 agency-phone 对命令非必需,但可能提供额外功能。请确保所有必需依赖已安装并启动,且在 Agency-Vending 之前运行。
