[免费] [QBCore/Qbox] 命令链:部门、职位、权限和游戏内职位编辑器

命令链

一次性设置你的部门、职位等级、分支、呼号和权限。所有兼容的脚本都会遵循这些设置。

警务脚本很少相互交流。每个脚本都有自己的职位名称、职位等级检查和老板设置,所以更改你的职位结构意味着要编辑十个资源。命令链是一个免费、开源的核心,将你的部门结构保存在一个地方,并为其他脚本提供了一个简单的方式来读取它。

预览

[视频预览]

特性

  • 多个部门: LSPD, BCSO, SAHP, EMS, DOJ 或任何你命名的部门,每个部门都映射到框架职位。
  • 职位等级映射到职位等级。 职位等级始终来自框架,所以它永远不会与同步脱节。
  • 权限按链传递: 每个职位等级都会继承其下所有职位等级拥有的权限。
  • 游戏内职位等级编辑器 (/ranks): 添加职位等级、重命名它们、设置薪资和选择权限。职位等级会为你自动创建。
  • 花名册菜单 (/roster): 招聘、解雇、晋升、降级、设置呼号和分支,在线或离线。
  • 呼号和分支: 格式检查、唯一的呼号和分支标签(巡逻、侦探、SWAT、警犬、新员工培训或你自己的)。
  • 职位等级上限: 没有人可以晋升到自己的职位等级或更高,编辑器也不能发放他们没有的权限。
  • 变更审计日志,以及管理员使用 /setjob 时的自动同步。
  • 开发者API: 导出和事件,稳定在1.x版本。

为开发者

if exports.cmd_chain:HasPermission(source, 'reports.approve') then
    -- allow it
end

local me = exports.cmd_chain:GetMember(source)
print(me.rank, me.callsign, me.onDuty)

完整API文档: GitHub – Schlongburg-Studios/chain-of-command: Chain of Command Script FiveM · GitHub

安装(5分钟)

  1. 从发布页面下载 cmd_chain-v1.1.0.zip 并将 cmd_chain 放入你的资源文件夹。
  2. 确保在框架之后添加 cmd_chain,ox_lib 和 oxmysql。
  3. Qbox: 添加 add_filesystem_permission cmd_chain write qbx_core(必需)。
  4. 从控制台任命你的第一位警长: cc hire 6 lspd

完整指南: GitHub – Schlongburg-Studios/chain-of-command: Chain of Command Script FiveM · GitHub

下载

GitHub: 发布命令链 v1.1.0 · Schlongburg-Studios/chain-of-command · GitHub

代码可访问 是(MIT许可)
订阅制 否
行数(约) 2,700
要求 ox_lib, oxmysql, QBCore 或 Qbox
支持 是,通过Discord和GitHub Issues

支持和路线图

加入Discord以获得支持、更新和未来计划: Discord
即将推出:基于命令链的MDT。ESX支持计划在v1.2版本中实现。

想让你的部门从一开始就看起来正式?我们的 警察局起步文档(SOPs、刑法、培训计划、职位等级结构、Discord设置)都在这里: [TEBEX链接]

查看英文原文 (Original)

Chain of Command

Set up your departments, ranks, divisions, callsigns and permissions once. Every compatible script follows them.

Police scripts rarely talk to each other. Each one has its own job names, rank checks and boss settings, so changing your rank structure means editing ten resources. Chain of Command is a free, open-source core that holds your department structure in one place and gives every other script a simple way to read it.

Preview

[VIDEO PREVIEW]

Features

  • Multiple departments: LSPD, BCSO, SAHP, EMS, DOJ, or anything you name, each mapped to a framework job.
  • Ranks mapped to job grades. Rank always comes from the framework, so it can never drift out of sync.
  • Permissions that flow down the chain: each rank inherits everything the ranks below it have.
  • In-game rank editor (/ranks): add ranks, rename them, set pay and choose permissions. Job grades are created for you.
  • Roster menu (/roster): hire, fire, promote, demote, set callsigns and divisions, online or offline.
  • Callsigns and divisions: format-checked, unique callsigns and division tags (Patrol, Detectives, SWAT, K9, FTO, or your own).
  • Rank ceiling: nobody can promote someone to their own rank or higher, and editors can’t hand out powers they don’t have.
  • Audit log of every change, plus automatic sync when an admin uses /setjob.
  • Developer API: exports and events, stable within 1.x.

For developers

if exports.cmd_chain:HasPermission(source, 'reports.approve') then
    -- allow it
end

local me = exports.cmd_chain:GetMember(source)
print(me.rank, me.callsign, me.onDuty)

Full API docs: GitHub – Schlongburg-Studios/chain-of-command: Chain of Command Script FiveM · GitHub

Install (5 minutes)

  1. Download cmd_chain-v1.1.0.zip from the release page and put cmd_chain in your resources.
  2. ensure cmd_chain after your framework, ox_lib and oxmysql.
  3. Qbox: add add_filesystem_permission cmd_chain write qbx_core (required).
  4. Appoint your first Chief from the console: cc hire <citizenid> 6 lspd

Full guide: GitHub – Schlongburg-Studios/chain-of-command: Chain of Command Script FiveM · GitHub

Download

GitHub: Release Chain of Command v1.1.0 · Schlongburg-Studios/chain-of-command · GitHub

Code is accessible Yes (MIT license)
Subscription-based No
Lines (approximately) 2,700
Requirements ox_lib, oxmysql, QBCore or Qbox
Support Yes, via Discord and GitHub Issues

Support and roadmap

Join the Discord for support, updates and what’s next: Discord
Coming next: an MDT built on Chain of Command. ESX support is planned for v1.2.

Want your department to look official from day one? Our Police Department Starter Docs (SOPs, penal code, training program, rank structure, Discord setup) are here: [TEBEX LINK]

本文资源搬运自 CFX.re FiveM 官方论坛,原作者:Pyro_14。原帖地址:https://forum.cfx.re/t/free-qbcore-qbox-chain-of-command-departments-ranks-permissions-and-an-in-game-rank-editor/5435241

原帖标签:script, qbcore, free, qbox

THE END
喜欢就支持一下吧
点赞8 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容