FiveM多部门MDT PS-MDT

FiveM多部门MDT PS-MDT

安装

  • 下载 ZIP
  • 将资源拖放到服务器文件中,确保删除文件夹名称中的 -main
  • 运行附加的 SQL 脚本 (mdt.sql)

武器信息导出

exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel)

图像

ox_inventory的设置

  • 在模块>商店中查找> server.luaox_inventory:buyItem
  • 添加以下代码块
\\Existing code below for reference, put it right under it. \\
local message = locale('purchased_for', count, fromItem.label, (currency == 'money' and locale('$') or math.groupdigits(price)), (currency == 'money' and math.groupdigits(price) or ' '..Items(currency).label))
\\Existing code above for reference, put it right under it. \\

if string.find(fromData.name, "WEAPON_") then
					local serial = metadata.serial
					local imageurl = ("https://cfx-nui-ox_inventory/web/images/%s.png"):format(fromData.name)
					local notes = "Purchased from shop"
					local owner = playerInv.owner
					local weapClass = "Class"
					local weapModel = fromData.name
					
					AddWeaponToMDT(serial, imageurl, notes, owner, weapClass, weapModel)
				end
  • 在脚本末尾添加 follow 函数。
\\Existing code below for reference, put it right under it. \\
server.shops = Shops
\\Existing code above for reference, put it right under it. \\

function AddWeaponToMDT(serial, imageurl, notes, owner, weapClass, weapModel)
    Citizen.CreateThread(function()
        Wait(500)

        local success, result = pcall(function()
            return exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel)
        end)

        if not success then
            print("Unable to add weapon to MDT")
        end
    end)
end

自助注册武器

 

  • 您的公民可以自行注册其库存中发现的武器。如果您使用的是 qb-target,则要触发的事件如下。还有一个名为 Named 的命令可用,但如果您想使用它,则需要取消注释。registerweapon
ps-mdt:client:selfregister

自动面部照片

图像

自动面部照片的设置

  • 将 Config.UseCQCMugshot 设置为 true,默认为 true。(Config.lua 中的第 5 行)
Config.UseCQCMugshot = true
  • 通过更改此项来选择所需的照片:(Config.lua 中的第 8 行)
-- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. Config.MugPhotos = 1
  • 创建一个 Discord Webhook 并在此处添加它
-- Images for mug shots will be uploaded here. Add a Discord webhook. local MugShotWebhook = ''

通过项目罚款和引用

  • 将项目添加到 shared.lua > items.lua
['mdtcitation'] = {['name'] = 'mdtcitation', ['label'] = 'Citation', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'citation.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Citation from a police officer!'},
  • 将以下代码添加到您的库存> app.js。应该在标记钞票周围的某个地方,请参阅下面的参考。
} else if (itemData.name == "mdtcitation") { $(".item-info-title").html("<p>" + itemData.label + "</p>"); $(".item-info-description").html( '<p><strong>Citizen ID: </strong><span>' + itemData.info.citizenId + '</span></p>' + '<p><strong>Fine: </strong><span>' + itemData.info.fine + '</span></p>' + '<p><strong>Citation Date: </strong><span>' + itemData.info.date + '</span></p>' + '<p><strong>Incident ID: </strong><span>' + itemData.info.incidentId + '</span></p>' + '<p><strong>Involved Officer: </strong><span>' + itemData.info.officer + '</span></p>' );
  • 正确放置的参考。

图像

打卡/打卡和排行榜

  • 当警官从 mdt 内部切换职责时触发。
  • 创建一个 Discord Webhook 并在此处添加它
local ClockinWebhook = ''

图像 图像

监狱和社区服务

  • 如果您在入狱期间因滥用漏洞而被踢。在 main.lua >> 的 qb-policejob 服务器中找到以下事件
police:server:JailPlayer
  • 然后在第 779 行附近注释掉,如下所示
-- if #(playerCoords - targetCoords) > 2.5 then return DropPlayer(src, "Attempted exploit abuse") end

库存编辑 |自动添加带有图像的武器

  1. 编辑以下事件
RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, toInventory, fromSlot, toSlot, fromAmount, toAmount)
elseif QBCore.Shared.SplitStr(shopType, "_")[1] == "Itemshop" then if Player.Functions.RemoveMoney("cash", price, "itemshop-bought-item") then if QBCore.Shared.SplitStr(itemData.name, "_")[1] == "weapon" then itemData.info.serie = tostring(QBCore.Shared.RandomInt(2) .. QBCore.Shared.RandomStr(3) .. QBCore.Shared.RandomInt(1) .. QBCore.Shared.RandomStr(2) .. QBCore.Shared.RandomInt(3) .. QBCore.Shared.RandomStr(4)) itemData.info.quality = 100 end local serial = itemData.info.serie local imageurl = ("https://cfx-nui-qb-inventory/html/images/%s.png"):format(itemData.name) local notes = "Purchased at Ammunation" local owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname local weapClass = 1 local weapModel = QBCore.Shared.Items[itemData.name].label AddItem(src, itemData.name, fromAmount, toSlot, itemData.info) TriggerClientEvent('qb-shops:client:UpdateShop', src, QBCore.Shared.SplitStr(shopType, "_")[2], itemData, fromAmount) QBCore.Functions.Notify(src, itemInfo["label"] .. " bought!", "success") exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) TriggerEvent("qb-log:server:CreateLog", "shops", "Shop item bought", "green", "**"..GetPlayerName(src) .. "** bought a " .. itemInfo["label"] .. " for $"..price) elseif bankBalance >= price then Player.Functions.RemoveMoney("bank", price, "itemshop-bought-item") if QBCore.Shared.SplitStr(itemData.name, "_")[1] == "weapon" then itemData.info.serie = tostring(QBCore.Shared.RandomInt(2) .. QBCore.Shared.RandomStr(3) .. QBCore.Shared.RandomInt(1) .. QBCore.Shared.RandomStr(2) .. QBCore.Shared.RandomInt(3) .. QBCore.Shared.RandomStr(4)) itemData.info.quality = 100 end local serial = itemData.info.serie local imageurl = ("https://cfx-nui-qb-inventory/html/images/%s.png"):format(itemData.name) local notes = "Purchased at Ammunation" local owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname local weapClass = 1 local weapModel = QBCore.Shared.Items[itemData.name].label AddItem(src, itemData.name, fromAmount, toSlot, itemData.info) TriggerClientEvent('qb-shops:client:UpdateShop', src, QBCore.Shared.SplitStr(shopType, "_")[2], itemData, fromAmount) QBCore.Functions.Notify(src, itemInfo["label"] .. " bought!", "success") exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) TriggerEvent("qb-log:server:CreateLog", "shops", "Shop item bought", "green", "**"..GetPlayerName(src) .. "** bought a " .. itemInfo["label"] .. " for $"..price) else QBCore.Functions.Notify(src, "You don't have enough cash..", "error") end

Wolfknight读板器和雷达兼容性

支持 Wolfknight Radar & Plate Reader https://github.com/WolfKnight98/wk_wars2x

如果出现以下情况,板式读取器会自动锁定并提醒警方:

  • 车主被通缉
  • 车主没有驾驶执照
  • 车辆有 BOLO

重要:

  • 确保在 wk_wars2x/config.lua 中设置“CONFIG.use_sonorancad = true”

这会将车牌读取器事件减少到玩家的车辆,并且不会查询数据库中数百辆 NPC 车辆

视频演示

https://youtu.be/w9PAVc3ER_c

图像 图像 图像 图像

交通停止径向菜单警报

  • 启动交通停止时,您可以通知您的同事您的位置,并通过径向菜单提供有关当前位置和停止车辆的详细信息。
  1. 在上面添加以下代码function READER:Main()cl_plate_reader.lua
local Vehicle = nil local function GetFrontPlate() local data = { locked = READER.vars.cams["front"].locked, plate = READER.vars.cams["front"].plate, veh = Vehicle, } return data end exports("GetFrontPlate", GetFrontPlate)
  1. 将以下内容添加到函数的 after 中cl_plate_reader.lualocal veh = UTIL:GetVehicleInDirection( PLY.veh, start, offset )function READER:Main()
if i == 1 then Vehicle = veh end
  • 完成上述步骤后,应如下所示。图像
  1. 将 ps-mdt:client:trafficStop 添加到径向菜单中
  • 预览。

图像

花名册和 SOP 设置

 

  • 您需要一个可查看的 Google 文档/工作表链接。

将您在配置中获得的链接粘贴到此处:

-- Google Docs Link Config.sopLink = { ['police'] = '', ['ambulance'] = '', ['bcso'] = '', ['doj'] = '', ['sast'] = '', ['sasp'] = '', ['doc'] = '', ['lssd'] = '', ['sapr'] = '', } -- Google Docs Link Config.RosterLink = { ['police'] = '', ['ambulance'] = '', ['bcso'] = '', ['doj'] = '', ['sast'] = '', ['sasp'] = '', ['doc'] = '', ['lssd'] = '', ['sapr'] = '', }

预览

图像 图像 图像 图像 图像 图像 图像 图像

多部门

  • LSPD图像
  • BCSO图像
  • SASP图像
  • SAST图像
  • SAPR图像
  • LSSD图像
  • DOT
    图像

常见问题

  • 如何在事件中向罪犯添加指控?– 找到犯罪公民并将其添加到事件中后,右键单击犯罪分子姓名下方的空白处,然后选择“添加指控”。

图片[27]-FiveM多部门MDT PS-MDT – FiveM插件网-FiveM插件网

  • 我的调度呼叫未被填充?– 您尚未在 mdt 之前启动调度资源或重命名调度资源名称,并且未在 mdt 中进行必要的更改以反映这一点。

  • 收到有关utf8mb4_unicode非法排序的错误?– QBCore 已决定更改他们在新的 txAdmin 配方上的排序规则,将玩家表上的排序规则更改为 utf8mb4_general_ci。在数据库上运行下面的查询以自动更改它。

-- Google Docs Link Config.sopLink = { ['police'] = '', ['ambulance'] = '', ['bcso'] = '', ['doj'] = '', ['sast'] = '', ['sasp'] = '', ['doc'] = '', ['lssd'] = '', ['sapr'] = '', } -- Google Docs Link Config.RosterLink = { ['police'] = '', ['ambulance'] = '', ['bcso'] = '', ['doj'] = '', ['sast'] = '', ['sasp'] = '', ['doc'] = '', ['lssd'] = '', ['sapr'] = '', }
 
 
© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容