QBCore警车枪架 警车专属储物空间

QBCore警车枪架 警车专属储物空间

keep-gunrack

允许警察添加和打开枪架。 枪架对其他非警察玩家是隐藏的。

预览

视频

钥匙

  • 要使用钥匙,您需要先使用切割机切割它们

  • 为此,您需要一台“键盘切割机”,并确保您的citizenid被列入白名单。

  • 将一把钥匙(gunrackkey)添加到您的物品栏(脚本,并会尝试找到未使用的钥匙)。

  • 输入车辆的车牌,您就完成了钥匙切割。

  • 单独使用 key 是行不通的,它必须在您的库存中才能让 keybind 或 raidal 菜单正常工作。

  • 停用作业检查后,径向菜单将被停用,您只能使用键绑定打开枪架。

依赖

  • qb-core
  • progressbar
  • qb-radialmenu

如何安装

  • step0: 添加到images/policegunrack.pngqb-inventory/html/images
  • step1:将以下代码添加到qb-core/shared/items.lua
["policegunrack"] = {
["name"] = "policegunrack",
["label"] = "Police Gun Rack",
["weight"] = 15000,
["type"] = "item",
["image"] = "policegunrack.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = "Gun rack for police vehicles"
},
-- optional if you want to open rack by keys
["gunrackkey"] = {
["name"] = "gunrackkey",
["label"] = "Police Gun Key",
["weight"] = 500,
["type"] = "item",
["image"] = "gunrackkey.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = "A key to open gun rack"
},
["keycuttingmachine"] = {
["name"] = "keycuttingmachine",
["label"] = "Key Cutting Machine",
["weight"] = 40000,
["type"] = "item",
["image"] = "keycuttingmachine.png",
["unique"] = false,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = "A Machine to Cut Keys"
},
["policegunrack"] = {
     ["name"] = "policegunrack",
     ["label"] = "Police Gun Rack",
     ["weight"] = 15000,
     ["type"] = "item",
     ["image"] = "policegunrack.png",
     ["unique"] = false,
     ["useable"] = true,
     ["shouldClose"] = true,
     ["combinable"] = nil,
     ["description"] = "Gun rack for police vehicles"
},
-- optional if you want to open rack by keys
["gunrackkey"] = {
     ["name"] = "gunrackkey",
     ["label"] = "Police Gun Key",
     ["weight"] = 500,
     ["type"] = "item",
     ["image"] = "gunrackkey.png",
     ["unique"] = false,
     ["useable"] = true,
     ["shouldClose"] = true,
     ["combinable"] = nil,
     ["description"] = "A key to open gun rack"
},
["keycuttingmachine"] = {
     ["name"] = "keycuttingmachine",
     ["label"] = "Key Cutting Machine",
     ["weight"] = 40000,
     ["type"] = "item",
     ["image"] = "keycuttingmachine.png",
     ["unique"] = false,
     ["useable"] = true,
     ["shouldClose"] = true,
     ["combinable"] = nil,
     ["description"] = "A Machine to Cut Keys"
},
["policegunrack"] = { ["name"] = "policegunrack", ["label"] = "Police Gun Rack", ["weight"] = 15000, ["type"] = "item", ["image"] = "policegunrack.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = "Gun rack for police vehicles" }, -- optional if you want to open rack by keys ["gunrackkey"] = { ["name"] = "gunrackkey", ["label"] = "Police Gun Key", ["weight"] = 500, ["type"] = "item", ["image"] = "gunrackkey.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = "A key to open gun rack" }, ["keycuttingmachine"] = { ["name"] = "keycuttingmachine", ["label"] = "Key Cutting Machine", ["weight"] = 40000, ["type"] = "item", ["image"] = "keycuttingmachine.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = "A Machine to Cut Keys" },
  • 打开 qb-inventory\js\app.js 并找到 FormatItemInfo()

  • 在结束 else 之前添加它

20240613075243376-inventory

else if (itemData.name == "gunrackkey") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html("<p>Cutted Key<p/><p>Plate: " + itemData.info.plate + "</p>");
}
else if (itemData.name == "gunrackkey") {
     $(".item-info-title").html("<p>" + itemData.label + "</p>");
     $(".item-info-description").html("<p>Cutted Key<p/><p>Plate: " + itemData.info.plate + "</p>");
}
else if (itemData.name == "gunrackkey") { $(".item-info-title").html("<p>" + itemData.label + "</p>"); $(".item-info-description").html("<p>Cutted Key<p/><p>Plate: " + itemData.info.plate + "</p>"); }
  • 最后一步:在所有依赖项之后启动脚本 (server.cfg)ensure keep-gunrack
  • 如果您确实安装了密钥,请确保您有正确的配置设置示例:
disable_job_check = true, -- <--- this value will disable job check
use_keys_to_unlock_gunrack = true,
disable_job_check = true, -- <--- this value will disable job check
     use_keys_to_unlock_gunrack = true,
disable_job_check = true, -- <--- this value will disable job check use_keys_to_unlock_gunrack = true,

配置

  • 添加您希望列入白名单的车辆型号或类别
  • 自定义机架尺寸和持续时间

 

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
评论 共4条
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片快捷回复