From 241d813fa624e5cdf5db1f8f6d169c6fdac591cf Mon Sep 17 00:00:00 2001 From: imperial7eet Date: Tue, 18 Oct 2022 17:17:22 +0000 Subject: [PATCH 001/381] Officers involved in BOLOs overlap fix --- ui/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 391c3972..100c2db9 100644 --- a/ui/app.js +++ b/ui/app.js @@ -1354,7 +1354,9 @@ $(document).ready(() => { } }); - $(".manage-officers-tags-holder").each(function (index) { + $(".manage-officers-tags-holder") + .find("div") + .each(function () { if ($(this).text() != "") { officers.push($(this).text()); } From 027f8087a19563ea5d9ed4b9a6088f6f41ca19f0 Mon Sep 17 00:00:00 2001 From: Joe Szymkowicz Date: Wed, 19 Oct 2022 19:41:14 -0500 Subject: [PATCH 002/381] Added Copy Image Link --- ui/app.js | 40 +++++++++++++++++ ui/dashboard.html | 2 +- ui/style.css | 108 ++++++++++++++++++++++++---------------------- 3 files changed, 97 insertions(+), 53 deletions(-) diff --git a/ui/app.js b/ui/app.js index 100c2db9..fce3e7e6 100644 --- a/ui/app.js +++ b/ui/app.js @@ -811,6 +811,9 @@ $(document).ready(() => { $(".contextmenu").on("click", ".remove-image", function () { removeImage($(this).data("info")); }); + $(".contextmenu").on("click", ".copy-image-link", function () { + copyImageSource($(this).data("info")); + }); $(".contextmenu").on("click", ".remove-image-incident", function () { $(".manage-incidents-evidence-holder img") .filter("[src='" + $(this).data("info") + "']") @@ -835,6 +838,13 @@ $(document).ready(() => { info: $(this).attr("src"), status: $(this).css("filter"), }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, ]; openContextMenu(e, args); } @@ -1402,6 +1412,13 @@ $(document).ready(() => { info: $(this).attr("src"), status: $(this).css("filter"), }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, ]; openContextMenu(e, args); } @@ -1754,6 +1771,13 @@ $(document).ready(() => { info: $(this).attr("src"), status: $(this).css("filter"), }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, ]; openContextMenu(e, args); } @@ -2267,6 +2291,13 @@ $(document).ready(() => { info: $(this).attr("src"), status: $(this).css("filter"), }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, ]; openContextMenu(e, args); } @@ -4923,6 +4954,15 @@ function expandImage(url) { $(".gallery-image-enlarged").attr("src", url); } +function copyImageSource(url) { + const el = document.createElement('textarea'); + el.value = url; + document.body.appendChild(el); + el.select(); + document.execCommand('copy'); + document.body.removeChild(el); +} + function removeImage(url) { let cid = $(".manage-profile-citizenid-input").val(); $(".gallery-inner-container img") diff --git a/ui/dashboard.html b/ui/dashboard.html index 4cdf2e1c..a8ca64c4 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -10,7 +10,7 @@ - + diff --git a/ui/style.css b/ui/style.css index c94822b3..a7963d4f 100644 --- a/ui/style.css +++ b/ui/style.css @@ -241,7 +241,7 @@ input::-webkit-inner-spin-button { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -367,7 +367,7 @@ input::-webkit-inner-spin-button { flex-direction: column; height: 100%; width: 50vh; - margin-top: 10px; + margin-top: 10px; margin-bottom: 8px; margin-left: 10px; user-select: none; @@ -383,7 +383,7 @@ input::-webkit-inner-spin-button { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-right: 0px; margin-bottom: 0px; width: 83.5%; @@ -493,7 +493,7 @@ span.bulletin-item-info[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -853,7 +853,7 @@ a { flex-direction: column; height: 74.7vh; width: 50vh; - margin-top: 10px; + margin-top: 10px; margin-left: 10px; } @@ -868,7 +868,7 @@ a { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -886,7 +886,7 @@ a { padding-bottom: 10px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1055,7 +1055,7 @@ a { flex-direction: row; width: 95%; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; } @@ -1226,7 +1226,7 @@ a { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1279,7 +1279,7 @@ a { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-right: 0px; margin-bottom: 0px; width: 84%; @@ -1295,7 +1295,7 @@ a { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -1378,7 +1378,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1431,7 +1431,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1484,7 +1484,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-right: 0px; margin-bottom: 0px; width: 84%; @@ -1500,7 +1500,7 @@ span.tag-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -1546,7 +1546,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1712,6 +1712,10 @@ span.tag-input[contenteditable]:empty::before { background-color: #099517; } +.copy-image-link:hover { + background-color: #099517; +} + .gallery-upload-input { background-color: var(--color-3); color: white; @@ -1719,7 +1723,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 10px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1767,7 +1771,7 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; height: 74.7vh; width: 50vh; - margin-top: 10px; + margin-top: 10px; margin-left: 10px; } @@ -1780,7 +1784,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1798,7 +1802,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 10px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -2582,7 +2586,7 @@ span.civilians-incident-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -2882,7 +2886,7 @@ span.civilians-incident-input[contenteditable]:empty::before { flex-direction: column; height: 74.7vh; width: 50vh; - margin-top: 10px; + margin-top: 10px; margin-left: 10px; } @@ -2895,7 +2899,7 @@ span.civilians-incident-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -2913,7 +2917,7 @@ span.civilians-incident-input[contenteditable]:empty::before { padding-bottom: 10px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -2999,7 +3003,7 @@ span.civilians-incident-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-right: 0px; margin-bottom: 0px; width: 84%; @@ -3168,7 +3172,7 @@ span.civilians-incident-input[contenteditable]:empty::before { background-color: #8f1b1b; margin: auto; margin-left: 5px; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; color: white; text-align: center; @@ -3199,7 +3203,7 @@ span.civilians-incident-input[contenteditable]:empty::before { flex-direction: column; height: 95.7%; width: 50vh; - margin-top: 10px; + margin-top: 10px; margin-left: 10px; margin-right: 15px; } @@ -3249,7 +3253,7 @@ span.civilians-incident-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -3346,7 +3350,7 @@ span.civilians-incident-input[contenteditable]:empty::before { background-color: var(--color-10); margin: auto; margin-left: 5px; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; color: white; text-align: center; @@ -3387,7 +3391,7 @@ span.civilians-incident-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -3456,7 +3460,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -3474,7 +3478,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-bottom: 10px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -3569,7 +3573,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -3587,7 +3591,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-bottom: 10px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -3782,7 +3786,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { background-color: var(--color-10); margin: auto; margin-left: 5px; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; color: white; text-align: center; @@ -3802,7 +3806,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { background-color: var(--color-10); margin: auto; margin-left: 5px; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; color: white; text-align: center; @@ -3876,7 +3880,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-right: 0px; margin-bottom: 0px; width: 84%; @@ -4046,7 +4050,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { background-color: #8f1b1b; margin: auto; margin-left: 5px; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; color: white; text-align: center; @@ -4113,7 +4117,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { flex-direction: column; height: 95.7%; width: 50vh; - margin-top: 10px; + margin-top: 10px; margin-left: 10px; margin-right: 15px; } @@ -4163,7 +4167,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -4193,7 +4197,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -4211,7 +4215,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-bottom: 10px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -4257,7 +4261,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -4287,7 +4291,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -4458,7 +4462,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { flex-direction: column; height: 74.7vh; width: 50%; - margin-top: 10px; + margin-top: 10px; margin-left: 10px; } @@ -4471,7 +4475,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { background-color: var(--color-10); margin: auto; margin-left: 5px; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; color: white; text-align: center; @@ -4491,7 +4495,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -4509,7 +4513,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { padding-bottom: 10px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -4563,7 +4567,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { background-color: #1b8f25; margin: auto; margin-left: 5px; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; color: white; text-align: center; @@ -4667,7 +4671,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { flex-direction: row; width: 95%; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; } @@ -4806,7 +4810,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; width: 95%; align-items: center; @@ -5647,7 +5651,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { background-color: var(--color-10); margin: auto; margin-left: 5px; - margin-top: 10px; + margin-top: 10px; margin-bottom: 0px; color: white; text-align: center; From 16425c210539c78b15b85c2eaeec0a04499f0e87 Mon Sep 17 00:00:00 2001 From: Joe Szymkowicz Date: Wed, 19 Oct 2022 19:56:26 -0500 Subject: [PATCH 003/381] onResourceStop: Prop deletion --- client/main.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index 86b553c3..edfffab6 100644 --- a/client/main.lua +++ b/client/main.lua @@ -3,7 +3,7 @@ local PlayerData = {} local CurrentCops = 0 local isOpen = false local callSign = "" -local tablet = 0 +local tabletObj = nil local tabletDict = "amb@code_human_in_bus_passenger_idles@female@tablet@base" local tabletAnim = "base" local tabletProp = `prop_cs_tablet` @@ -58,6 +58,14 @@ AddEventHandler('onResourceStart', function(resourceName) callSign = PlayerData.metadata.callsign end) +AddEventHandler('onResourceStop', function(resourceName) + if (GetCurrentResourceName() ~= resourceName) then return end + ClearPedSecondaryTask(PlayerPedId()) + SetEntityAsMissionEntity(tabletObj) + DetachEntity(tabletObj, true, false) + DeleteObject(tabletObj) +end) + --==================================================================================== ------------------------------------------ -- Functions -- @@ -92,7 +100,7 @@ local function doAnimation() while not HasModelLoaded(tabletProp) do Citizen.Wait(100) end local plyPed = PlayerPedId() - local tabletObj = CreateObject(tabletProp, 0.0, 0.0, 0.0, true, true, false) + tabletObj = CreateObject(tabletProp, 0.0, 0.0, 0.0, true, true, false) local tabletBoneIndex = GetPedBoneIndex(plyPed, tabletBone) AttachEntityToEntity(tabletObj, plyPed, tabletBoneIndex, tabletOffset.x, tabletOffset.y, tabletOffset.z, tabletRot.x, tabletRot.y, tabletRot.z, true, false, false, false, 2, true) From fb6eab1a7fe616c37fdb1841767e50853f1a3f7b Mon Sep 17 00:00:00 2001 From: Joe Szymkowicz <70592880+JoeSzymkowiczFiveM@users.noreply.github.com> Date: Sun, 13 Nov 2022 15:55:35 -0600 Subject: [PATCH 004/381] add: Weapons info and vehicle points (#125) * Fixed Vehicle Make and Model display * Weapons page, Vehicle points, incomplete word * Weapon SQL Additions * Fix for vehicle points * vars fix * sql fix * Update app.js * Update app.js * More fixes * Adding tables * Cameras Swapped, profilepic * Revert * Added local images * Vehicle points fix * Type casting * Fix * Charges context menu * z-indexing for charges context, more webp * Fix for first charge not displaying context * Update dashboard.html * Fix for flickering * css fix * DOJ MDT fix * weapon info fix * remove dbid * Added export for weapons info insert --- client/main.lua | 71 ++++- mdt.sql | 12 + server/main.lua | 91 ++++++- shared/config.lua | 362 ++++++++++++------------- ui/app.js | 291 +++++++++++++++++--- ui/dashboard.html | 109 ++++++-- ui/img/9Xn6xXK.webp | Bin 0 -> 200 bytes ui/img/court.webp | Bin 0 -> 13892 bytes ui/img/ems_badge.webp | Bin 0 -> 2950 bytes ui/img/ems_badge_zonah.webp | Bin 0 -> 5220 bytes ui/img/h7S5f9J.webp | Bin 0 -> 180 bytes ui/img/sasp_badge.webp | Bin 0 -> 12718 bytes ui/style.css | 519 +++++++++++++++++++++++++++++++++++- 13 files changed, 1196 insertions(+), 259 deletions(-) create mode 100644 ui/img/9Xn6xXK.webp create mode 100644 ui/img/court.webp create mode 100644 ui/img/ems_badge.webp create mode 100644 ui/img/ems_badge_zonah.webp create mode 100644 ui/img/h7S5f9J.webp create mode 100644 ui/img/sasp_badge.webp diff --git a/client/main.lua b/client/main.lua index edfffab6..ad6e708f 100644 --- a/client/main.lua +++ b/client/main.lua @@ -316,11 +316,12 @@ RegisterNUICallback("getProfileData", function(data, cb) end local propertiesResult = getProfileProperties(id) result.properties = propertiesResult - ]] + ]] local vehicles=result.vehicles for i=1,#vehicles do local vehicle=result.vehicles[i] - result.vehicles[i]['model'] = GetLabelText(GetDisplayNameFromVehicleModel(vehicle['vehicle'])) + local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] + result.vehicles[i]['model'] = vehData["name"] end p = nil return cb(result) @@ -373,10 +374,8 @@ RegisterNetEvent('mdt:client:getProfileData', function(sentData, isLimited) sentData['vehicles'][i]['plate'] = string.upper(sentData['vehicles'][i]['plate']) local tempModel = vehicles[i]['model'] if tempModel and tempModel ~= "Unknown" then - local DisplayNameModel = GetDisplayNameFromVehicleModel(tempModel) - local LabelText = GetLabelText(DisplayNameModel) - if LabelText == "NULL" then LabelText = DisplayNameModel end - sentData['vehicles'][i]['model'] = LabelText + local vehData = QBCore.Shared.Vehicles[tempModel] + sentData['vehicles'][i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] end end end @@ -552,7 +551,8 @@ RegisterNUICallback("searchVehicles", function(data, cb) result[i]['plate'] = string.upper(result[i]['plate']) result[i]['color'] = Config.ColorInformation[mods['color1']] result[i]['colorName'] = Config.ColorNames[mods['color1']] - result[i]['model'] = GetLabelText(GetDisplayNameFromVehicleModel(vehicle['vehicle'])) + local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] + result[i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] end cb(result) @@ -572,6 +572,7 @@ RegisterNUICallback("saveVehicleInfo", function(data, cb) local stolen = data.stolen local code5 = data.code5 local impound = data.impound + local points = data.points local JobType = GetJobType(PlayerData.job.name) if JobType == 'police' and impound.impoundChanged == true then if impound.impoundActive then @@ -586,7 +587,7 @@ RegisterNUICallback("saveVehicleInfo", function(data, cb) if dist < 5.0 then found = VehToNet(v) SendNUIMessage({ type = "greenImpound" }) - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound) + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) end break end @@ -602,17 +603,60 @@ RegisterNUICallback("saveVehicleInfo", function(data, cb) for k, v in pairs(Config.ImpoundLocations) do if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then impound.CurrentSelection = k - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound) + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) break end end end else - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound) + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) end cb(true) end) +--==================================================================================== +------------------------------------------ +-- Weapons PAGE -- +------------------------------------------ +--==================================================================================== +RegisterNUICallback("searchWeapons", function(data, cb) + local p = promise.new() + + QBCore.Functions.TriggerCallback('mdt:server:SearchWeapons', function(result) + p:resolve(result) + end, data.name) + + local result = Citizen.Await(p) + cb(result) +end) + +RegisterNUICallback("saveWeaponInfo", function(data, cb) + local serial = data.serial + local notes = data.notes + local imageurl = data.imageurl + local owner = data.owner + local weapClass = data.weapClass + local weapModel = data.weapModel + local JobType = GetJobType(PlayerData.job.name) + if JobType == 'police' then + TriggerServerEvent('mdt:server:saveWeaponInfo', serial, imageurl, notes, owner, weapClass, weapModel) + end + cb(true) +end) + +RegisterNUICallback("getWeaponData", function(data, cb) + local serial = data.serial + TriggerServerEvent('mdt:server:getWeaponData', serial) + cb(true) +end) + +RegisterNetEvent('mdt:client:getWeaponData', function(sentData) + if sentData and sentData[1] then + local results = sentData[1] + SendNUIMessage({ type = "getWeaponData", data = results }) + end +end) + RegisterNUICallback("getAllLogs", function(data, cb) TriggerServerEvent('mdt:server:getAllLogs') cb(true) @@ -654,7 +698,8 @@ RegisterNetEvent('mdt:client:getVehicleData', function(sentData) local vehData = json.decode(vehicle['vehicle']) vehicle['color'] = Config.ColorInformation[vehicle['color1']] vehicle['colorName'] = Config.ColorNames[vehicle['color1']] - vehicle['model'] = GetLabelText(GetDisplayNameFromVehicleModel(vehicle['vehicle'])) + local vehData = QBCore.Shared.Vehicles[vehicle.vehicle] + vehicle.model = vehData["brand"] .. ' ' .. vehData["name"] vehicle['class'] = Config.ClassList[GetVehicleClassFromName(vehicle['vehicle'])] vehicle['vehicle'] = nil SendNUIMessage({ type = "getVehicleData", data = vehicle }) @@ -665,6 +710,10 @@ RegisterNetEvent('mdt:client:updateVehicleDbId', function(sentData) SendNUIMessage({ type = "updateVehicleDbId", data = tonumber(sentData) }) end) +RegisterNetEvent('mdt:client:updateWeaponDbId', function(sentData) + SendNUIMessage({ type = "updateWeaponDbId", data = tonumber(sentData) }) +end) + RegisterNetEvent('mdt:client:getAllLogs', function(sentData) SendNUIMessage({ type = "getAllLogs", data = sentData }) end) diff --git a/mdt.sql b/mdt.sql index 03bb0ae9..ba2b899c 100644 --- a/mdt.sql +++ b/mdt.sql @@ -98,6 +98,18 @@ CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( `stolen` tinyint(1) NOT NULL DEFAULT 0, `code5` tinyint(1) NOT NULL DEFAULT 0, `image` text NOT NULL DEFAULT '', + `points` int(11) DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `serial` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `weapClass` varchar(50) DEFAULT NULL, + `weapModel` varchar(50) DEFAULT NULL, + `image` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/server/main.lua b/server/main.lua index 19c8357e..9aac014b 100644 --- a/server/main.lua +++ b/server/main.lua @@ -307,8 +307,12 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local mdtData2 = GetPfpFingerPrintInformation(sentId) if mdtData2 then - person.fingerprint = mdtData2.fingerprint - person.profilepic = mdtData and mdtData.pfp or "" + if mdtData2.fingerprint then + person.fingerprint = mdtData2.fingerprint + end + if mdtData2.pfp ~= "" then + person.profilepic = mdtData2.pfp + end end return cb(person) @@ -770,6 +774,7 @@ RegisterNetEvent('mdt:server:getVehicleData', function(plate) if info then vehicle[1]['information'] = info['information'] vehicle[1]['dbid'] = info['id'] + vehicle[1]['points'] = info['points'] vehicle[1]['image'] = info['image'] vehicle[1]['code'] = info['code5'] vehicle[1]['stolen'] = info['stolen'] @@ -784,7 +789,7 @@ RegisterNetEvent('mdt:server:getVehicleData', function(plate) end end) -RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, notes, stolen, code5, impoundInfo) +RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, notes, stolen, code5, impoundInfo, points) if plate then local src = source local Player = QBCore.Functions.GetPlayer(src) @@ -794,14 +799,14 @@ RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, n local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname TriggerEvent('mdt:server:AddLog', "A vehicle with the plate ("..plate..") has a new image ("..imageurl..") edited by "..fullname) if tonumber(dbid) == 0 then - MySQL.insert('INSERT INTO `mdt_vehicleinfo` (`plate`, `information`, `image`, `code5`, `stolen`) VALUES (:plate, :information, :image, :code5, :stolen)', { plate = string.gsub(plate, "^%s*(.-)%s*$", "%1"), information = notes, image = imageurl, code5 = code5, stolen = stolen }, function(infoResult) + MySQL.insert('INSERT INTO `mdt_vehicleinfo` (`plate`, `information`, `image`, `code5`, `stolen`, `points`) VALUES (:plate, :information, :image, :code5, :stolen, :points)', { plate = string.gsub(plate, "^%s*(.-)%s*$", "%1"), information = notes, image = imageurl, code5 = code5, stolen = stolen, points = tonumber(points) }, function(infoResult) if infoResult then TriggerClientEvent('mdt:client:updateVehicleDbId', src, infoResult) TriggerEvent('mdt:server:AddLog', "A vehicle with the plate ("..plate..") was added to the vehicle information database by "..fullname) end end) elseif tonumber(dbid) > 0 then - MySQL.update("UPDATE mdt_vehicleinfo SET `information`= :information, `image`= :image, `code5`= :code5, `stolen`= :stolen WHERE `plate`= :plate LIMIT 1", { plate = string.gsub(plate, "^%s*(.-)%s*$", "%1"), information = notes, image = imageurl, code5 = code5, stolen = stolen }) + MySQL.update("UPDATE mdt_vehicleinfo SET `information`= :information, `image`= :image, `code5`= :code5, `stolen`= :stolen, `points`= :points WHERE `plate`= :plate LIMIT 1", { plate = string.gsub(plate, "^%s*(.-)%s*$", "%1"), information = notes, image = imageurl, code5 = code5, stolen = stolen, points = tonumber(points) }) end if impoundInfo.impoundChanged then @@ -862,6 +867,82 @@ RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, n end end) +QBCore.Functions.CreateCallback('mdt:server:SearchWeapons', function(source, cb, sentData) + if not sentData then return cb({}) end + local PlayerData = GetPlayerData(source) + if not PermCheck(source, PlayerData) then return cb({}) end + + local Player = QBCore.Functions.GetPlayer(source) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'doj' then + local matches = MySQL.query.await('SELECT * FROM mdt_weaponinfo') + cb(matches) + end + end +end) + +RegisterNetEvent('mdt:server:saveWeaponInfo', function(serial, imageurl, notes, owner, weapClass, weapModel) + if serial then + local PlayerData = GetPlayerData(source) + if not PermCheck(source, PlayerData) then return cb({}) end + + local Player = QBCore.Functions.GetPlayer(source) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'doj' then + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + if imageurl == nil then imageurl = 'img/not-found.webp' end + --AddLog event? + local result = false + result = MySQL.Async.insert('INSERT INTO mdt_weaponinfo (serial, owner, information, weapClass, weapModel, image) VALUES (:serial, :owner, :notes, :weapClass, :weapModel, :imageurl) ON DUPLICATE KEY UPDATE owner = :owner, information = :notes, weapClass = :weapClass, weapModel = :weapModel, image = :imageurl', { + ['serial'] = serial, + ['owner'] = owner, + ['notes'] = notes, + ['weapClass'] = weapClass, + ['weapModel'] = weapModel, + ['imageurl'] = imageurl, + }) + + if result then + TriggerEvent('mdt:server:AddLog', "A weapon with the serial number ("..serial..") was added to the weapon information database by "..fullname) + else + TriggerEvent('mdt:server:AddLog', "A weapon with the serial number ("..serial..") failed to be added to the weapon information database by "..fullname) + end + end + end + end +end) + +function CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) + if serial == nil then return end + if imageurl == nil then imageurl = 'img/not-found.webp' end + MySQL.Async.insert('INSERT INTO mdt_weaponinfo (serial, owner, information, weapClass, weapModel, image) VALUES (:serial, :owner, :notes, :weapClass, :weapModel, :imageurl) ON DUPLICATE KEY UPDATE owner = :owner, information = :notes, weapClass = :weapClass, weapModel = :weapModel, image = :imageurl', { + ['serial'] = serial, + ['owner'] = owner, + ['notes'] = notes, + ['weapClass'] = weapClass, + ['weapModel'] = weapModel, + ['imageurl'] = imageurl, + }) +end + +exports('CreateWeaponInfo', CreateWeaponInfo) +--exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) + +RegisterNetEvent('mdt:server:getWeaponData', function(serial) + if serial then + local Player = QBCore.Functions.GetPlayer(source) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'doj' then + local results = MySQL.query.await('SELECT * FROM mdt_weaponinfo WHERE serial = ?', { serial }) + TriggerClientEvent('mdt:client:getWeaponData', Player.PlayerData.source, results) + end + end + end +end) + RegisterNetEvent('mdt:server:getAllLogs', function() local src = source local Player = QBCore.Functions.GetPlayer(src) diff --git a/shared/config.lua b/shared/config.lua index 550db8b1..b90aff5c 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -35,205 +35,205 @@ Config.PenalCodeTitles = { Config.PenalCode = { [1] = { - [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green'}, - [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange'}, - [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange'}, - [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red'}, - [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red'}, - [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red'}, - [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red'}, - [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red'}, - [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red'}, - [10] = {title = 'First Degree Murder', class = 'Felony', id = 'P.C. 1010', months = 0, fine = 0, color = 'red'}, - [11] = {title = 'Accessory to First Degree Murder', class = 'Felony', id = 'P.C. 1011', months = 0, fine = 0, color = 'red'}, - [12] = {title = 'Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1012', months = 0, fine = 0, color = 'red'}, - [13] = {title = 'Attempted Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1013', months = 65, fine = 10000, color = 'red'}, - [14] = {title = 'Accessory to the Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1014', months = 0, fine = 0, color = 'red'}, - [15] = {title = 'Unlawful Imprisonment', class = 'Misdemeanor', id = 'P.C. 1015', months = 10, fine = 600, color = 'green'}, - [16] = {title = 'Kidnapping', class = 'Felony', id = 'P.C. 1016', months = 15, fine = 900, color = 'orange'}, - [17] = {title = 'Accessory to Kidnapping', class = 'Felony', id = 'P.C. 1017', months = 7, fine = 450, color = 'orange'}, - [18] = {title = 'Attempted Kidnapping', class = 'Felony', id = 'P.C. 1018', months = 10, fine = 450, color = 'orange'}, - [19] = {title = 'Hostage Taking', class = 'Felony', id = 'P.C. 1019', months = 20, fine = 1200, color = 'orange'}, - [20] = {title = 'Accessory to Hostage Taking', class = 'Felony', id = 'P.C. 1020', months = 10, fine = 600, color = 'orange'}, - [21] = {title = 'Unlawful Imprisonment of a Public Servant or Peace Officer.', class = 'Felony', id = 'P.C. 1021', months = 25, fine = 4000, color = 'orange'}, - [22] = {title = 'Criminal Threats', class = 'Misdemeanor', id = 'P.C. 1022', months = 5, fine = 500, color = 'orange'}, - [23] = {title = 'Reckless Endangerment', class = 'Misdemeanor', id = 'P.C. 1023', months = 10, fine = 1000, color = 'orange'}, - [24] = {title = 'Gang Related Shooting', class = 'Felony', id = 'P.C. 1024', months = 30, fine = 2500, color = 'red'}, - [25] = {title = 'Cannibalism', class = 'Felony', id = 'P.C. 1025', months = 0, fine = 0, color = 'red'}, - [26] = {title = 'Torture', class = 'Felony', id = 'P.C. 1026', months = 40, fine = 4500, color = 'red'}, + [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange', description = 'Insert Charge Description Here'}, + [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange', description = 'Insert Charge Description Here'}, + [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red', description = 'Insert Charge Description Here'}, + [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, + [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, + [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, + [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red', description = 'Insert Charge Description Here'}, + [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red', description = 'Insert Charge Description Here'}, + [10] = {title = 'First Degree Murder', class = 'Felony', id = 'P.C. 1010', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [11] = {title = 'Accessory to First Degree Murder', class = 'Felony', id = 'P.C. 1011', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [12] = {title = 'Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1012', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [13] = {title = 'Attempted Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1013', months = 65, fine = 10000, color = 'red', description = 'Insert Charge Description Here'}, + [14] = {title = 'Accessory to the Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1014', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [15] = {title = 'Unlawful Imprisonment', class = 'Misdemeanor', id = 'P.C. 1015', months = 10, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Kidnapping', class = 'Felony', id = 'P.C. 1016', months = 15, fine = 900, color = 'orange', description = 'Insert Charge Description Here'}, + [17] = {title = 'Accessory to Kidnapping', class = 'Felony', id = 'P.C. 1017', months = 7, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, + [18] = {title = 'Attempted Kidnapping', class = 'Felony', id = 'P.C. 1018', months = 10, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, + [19] = {title = 'Hostage Taking', class = 'Felony', id = 'P.C. 1019', months = 20, fine = 1200, color = 'orange', description = 'Insert Charge Description Here'}, + [20] = {title = 'Accessory to Hostage Taking', class = 'Felony', id = 'P.C. 1020', months = 10, fine = 600, color = 'orange', description = 'Insert Charge Description Here'}, + [21] = {title = 'Unlawful Imprisonment of a Public Servant or Peace Officer.', class = 'Felony', id = 'P.C. 1021', months = 25, fine = 4000, color = 'orange', description = 'Insert Charge Description Here'}, + [22] = {title = 'Criminal Threats', class = 'Misdemeanor', id = 'P.C. 1022', months = 5, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, + [23] = {title = 'Reckless Endangerment', class = 'Misdemeanor', id = 'P.C. 1023', months = 10, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, + [24] = {title = 'Gang Related Shooting', class = 'Felony', id = 'P.C. 1024', months = 30, fine = 2500, color = 'red', description = 'Insert Charge Description Here'}, + [25] = {title = 'Cannibalism', class = 'Felony', id = 'P.C. 1025', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [26] = {title = 'Torture', class = 'Felony', id = 'P.C. 1026', months = 40, fine = 4500, color = 'red', description = 'Insert Charge Description Here'}, }, [2] = { - [1] = {title = 'Petty Theft', class = 'Infraction', id = 'P.C. 2001', months = 0, fine = 250, color = 'green'}, - [2] = {title = 'Grand Theft', class = 'Misdemeanor', id = 'P.C. 2002', months = 10, fine = 600, color = 'green'}, - [3] = {title = 'Grand Theft Auto A', class = 'Felony', id = 'P.C. 2003', months = 15, fine = 900, color = 'green'}, - [4] = {title = 'Grand Theft Auto B', class = 'Felony', id = 'P.C. 2004', months = 35, fine = 3500, color = 'green'}, - [5] = {title = 'Carjacking', class = 'Felony', id = 'P.C. 2005', months = 30, fine = 2000, color = 'orange'}, - [6] = {title = 'Burglary', class = 'Misdemeanor', id = 'P.C. 2006', months = 10, fine = 500, color = 'green'}, - [7] = {title = 'Robbery', class = 'Felony', id = 'P.C. 2007', months = 25, fine = 2000, color = 'green'}, - [8] = {title = 'Accessory to Robbery', class = 'Felony', id = 'P.C. 2008', months = 12, fine = 1000, color = 'green'}, - [9] = {title = 'Attempted Robbery', class = 'Felony', id = 'P.C. 2009', months = 20, fine = 1000, color = 'green'}, - [10] = {title = 'Armed Robbery', class = 'Felony', id = 'P.C. 2010', months = 30, fine = 3000, color = 'orange'}, - [11] = {title = 'Accessory to Armed Robbery', class = 'Felony', id = 'P.C. 2011', months = 15, fine = 1500, color = 'orange'}, - [12] = {title = 'Attempted Armed Robbery', class = 'Felony', id = 'P.C. 2012', months = 25, fine = 1500, color = 'orange'}, - [13] = {title = 'Grand Larceny', class = 'Felony', id = 'P.C. 2013', months = 45, fine = 7500, color = 'orange'}, - [14] = {title = 'Leaving Without Paying', class = 'Infraction', id = 'P.C. 2014', months = 0, fine = 500, color = 'green'}, - [15] = {title = 'Possession of Nonlegal Currency', class = 'Misdemeanor', id = 'P.C. 2015', months = 10, fine = 750, color = 'green'}, - [16] = {title = 'Possession of Government-Issued Items', class = 'Misdemeanor', id = 'P.C. 2016', months = 15, fine = 1000, color = 'green'}, - [17] = {title = 'Possession of Items Used in the Commission of a Crime', class = 'Misdemeanor', id = 'P.C. 2017', months = 10, fine = 500, color = 'green'}, - [18] = {title = 'Sale of Items Used in the Commission of a Crime', class = 'Felony', id = 'P.C. 2018', months = 15, fine = 1000, color = 'orange'}, - [19] = {title = 'Theft of an Aircraft', class = 'Felony', id = 'P.C. 2019', months = 20, fine = 1000, color = 'green'}, + [1] = {title = 'Petty Theft', class = 'Infraction', id = 'P.C. 2001', months = 0, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Grand Theft', class = 'Misdemeanor', id = 'P.C. 2002', months = 10, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Grand Theft Auto A', class = 'Felony', id = 'P.C. 2003', months = 15, fine = 900, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Grand Theft Auto B', class = 'Felony', id = 'P.C. 2004', months = 35, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Carjacking', class = 'Felony', id = 'P.C. 2005', months = 30, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, + [6] = {title = 'Burglary', class = 'Misdemeanor', id = 'P.C. 2006', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Robbery', class = 'Felony', id = 'P.C. 2007', months = 25, fine = 2000, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Accessory to Robbery', class = 'Felony', id = 'P.C. 2008', months = 12, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [9] = {title = 'Attempted Robbery', class = 'Felony', id = 'P.C. 2009', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Armed Robbery', class = 'Felony', id = 'P.C. 2010', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, + [11] = {title = 'Accessory to Armed Robbery', class = 'Felony', id = 'P.C. 2011', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [12] = {title = 'Attempted Armed Robbery', class = 'Felony', id = 'P.C. 2012', months = 25, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [13] = {title = 'Grand Larceny', class = 'Felony', id = 'P.C. 2013', months = 45, fine = 7500, color = 'orange', description = 'Insert Charge Description Here'}, + [14] = {title = 'Leaving Without Paying', class = 'Infraction', id = 'P.C. 2014', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Possession of Nonlegal Currency', class = 'Misdemeanor', id = 'P.C. 2015', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Possession of Government-Issued Items', class = 'Misdemeanor', id = 'P.C. 2016', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [17] = {title = 'Possession of Items Used in the Commission of a Crime', class = 'Misdemeanor', id = 'P.C. 2017', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [18] = {title = 'Sale of Items Used in the Commission of a Crime', class = 'Felony', id = 'P.C. 2018', months = 15, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, + [19] = {title = 'Theft of an Aircraft', class = 'Felony', id = 'P.C. 2019', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, }, [3] = { - [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green'}, - [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green'}, - [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green'}, - [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green'}, - [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green'}, - [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange'}, - [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green'}, - [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green'}, - [9] = {title = 'Money Laundering', class = 'Felony', id = 'P.C. 3009', months = 0, fine = 0, color = 'red'}, + [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange', description = 'Insert Charge Description Here'}, + [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [9] = {title = 'Money Laundering', class = 'Felony', id = 'P.C. 3009', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, }, [4] = { - [1] = {title = 'Trespassing', class = 'Misdemeanor', id = 'P.C. 4001', months = 10, fine = 450, color = 'green'}, - [2] = {title = 'Felony Trespassing', class = 'Felony', id = 'P.C. 4002', months = 15, fine = 1500, color = 'green'}, - [3] = {title = 'Arson', class = 'Felony', id = 'P.C. 4003', months = 15, fine = 1500, color = 'orange'}, - [4] = {title = 'Vandalism', class = 'Infraction', id = 'P.C. 4004', months = 0, fine = 300, color = 'green'}, - [5] = {title = 'Vandalism of Government Property', class = 'Felony', id = 'P.C. 4005', months = 20, fine = 1500, color = 'green'}, - [6] = {title = 'Littering', class = 'Infraction', id = 'P.C. 4006', months = 0, fine = 200, color = 'green'}, + [1] = {title = 'Trespassing', class = 'Misdemeanor', id = 'P.C. 4001', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Felony Trespassing', class = 'Felony', id = 'P.C. 4002', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Arson', class = 'Felony', id = 'P.C. 4003', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [4] = {title = 'Vandalism', class = 'Infraction', id = 'P.C. 4004', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Vandalism of Government Property', class = 'Felony', id = 'P.C. 4005', months = 20, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Littering', class = 'Infraction', id = 'P.C. 4006', months = 0, fine = 200, color = 'green', description = 'Insert Charge Description Here'}, }, [5] = { - [1] = {title = 'Bribery of a Government Official', class = 'Felony', id = 'P.C. 5001', months = 20, fine = 3500, color = 'green'}, - [2] = {title = 'Anti-Mask Law', class = 'Infraction', id = 'P.C. 5002', months = 0, fine = 750, color = 'green'}, - [3] = {title = 'Possession of Contraband in a Government Facility', class = 'Felony', id = 'P.C. 5003', months = 25, fine = 1000, color = 'green'}, - [4] = {title = 'Criminal Possession of Stolen Property', class = 'Misdemeanor', id = 'P.C. 5004', months = 10, fine = 500, color = 'green'}, - [5] = {title = 'Escaping', class = 'Felony', id = 'P.C. 5005', months = 10, fine = 450, color = 'green'}, - [6] = {title = 'Jailbreak', class = 'Felony', id = 'P.C. 5006', months = 30, fine = 2500, color = 'orange'}, - [7] = {title = 'Accessory to Jailbreak', class = 'Felony', id = 'P.C. 5007', months = 25, fine = 2000, color = 'orange'}, - [8] = {title = 'Attempted Jailbreak', class = 'Felony', id = 'P.C. 5008', months = 20, fine = 1500, color = 'orange'}, - [9] = {title = 'Perjury', class = 'Felony', id = 'P.C. 5009', months = 0, fine = 0, color = 'green'}, - [10] = {title = 'Violation of a Restraining Order', class = 'Felony', id = 'P.C. 5010', months = 20, fine = 2250, color = 'green'}, - [11] = {title = 'Embezzlement', class = 'Felony', id = 'P.C. 5011', months = 45, fine = 10000, color = 'green'}, - [12] = {title = 'Unlawful Practice', class = 'Felony', id = 'P.C. 5012', months = 15, fine = 1500, color = 'orange'}, - [13] = {title = 'Misuse of Emergency Systems', class = 'Infraction', id = 'P.C. 5013', months = 0, fine = 600, color = 'orange'}, - [14] = {title = 'Conspiracy', class = 'Misdemeanor', id = 'P.C. 5014', months = 10, fine = 450, color = 'green'}, - [15] = {title = 'Violating a Court Order', class = 'Misdemeanor', id = 'P.C. 5015', months = 0, fine = 0, color = 'orange'}, - [16] = {title = 'Failure to Appear', class = 'Misdemeanor', id = 'P.C. 5016', months = 0, fine = 0, color = 'orange'}, - [17] = {title = 'Contempt of Court', class = 'Felony', id = 'P.C. 5017', months = 0, fine = 0, color = 'orange'}, - [18] = {title = 'Resisting Arrest', class = 'Misdemeanor', id = 'P.C. 5018', months = 5, fine = 300, color = 'orange'}, + [1] = {title = 'Bribery of a Government Official', class = 'Felony', id = 'P.C. 5001', months = 20, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Anti-Mask Law', class = 'Infraction', id = 'P.C. 5002', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Possession of Contraband in a Government Facility', class = 'Felony', id = 'P.C. 5003', months = 25, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Criminal Possession of Stolen Property', class = 'Misdemeanor', id = 'P.C. 5004', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Escaping', class = 'Felony', id = 'P.C. 5005', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Jailbreak', class = 'Felony', id = 'P.C. 5006', months = 30, fine = 2500, color = 'orange', description = 'Insert Charge Description Here'}, + [7] = {title = 'Accessory to Jailbreak', class = 'Felony', id = 'P.C. 5007', months = 25, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, + [8] = {title = 'Attempted Jailbreak', class = 'Felony', id = 'P.C. 5008', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Perjury', class = 'Felony', id = 'P.C. 5009', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Violation of a Restraining Order', class = 'Felony', id = 'P.C. 5010', months = 20, fine = 2250, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'Embezzlement', class = 'Felony', id = 'P.C. 5011', months = 45, fine = 10000, color = 'green', description = 'Insert Charge Description Here'}, + [12] = {title = 'Unlawful Practice', class = 'Felony', id = 'P.C. 5012', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [13] = {title = 'Misuse of Emergency Systems', class = 'Infraction', id = 'P.C. 5013', months = 0, fine = 600, color = 'orange', description = 'Insert Charge Description Here'}, + [14] = {title = 'Conspiracy', class = 'Misdemeanor', id = 'P.C. 5014', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Violating a Court Order', class = 'Misdemeanor', id = 'P.C. 5015', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, + [16] = {title = 'Failure to Appear', class = 'Misdemeanor', id = 'P.C. 5016', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, + [17] = {title = 'Contempt of Court', class = 'Felony', id = 'P.C. 5017', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, + [18] = {title = 'Resisting Arrest', class = 'Misdemeanor', id = 'P.C. 5018', months = 5, fine = 300, color = 'orange', description = 'Insert Charge Description Here'}, }, [6] = { - [1] = {title = 'Disobeying a Peace Officer', class = 'infraction', id = 'P.C. 6001', months = 0, fine = 750, color = 'green'}, - [2] = {title = 'Disorderly Conduct', class = 'Infraction', id = 'P.C. 6002', months = 0, fine = 250, color = 'green'}, - [3] = {title = 'Disturbing the Peace', class = 'infraction', id = 'P.C. 6003', months = 0, fine = 350, color = 'green'}, - [4] = {title = 'False Reporting', class = 'Misdemeanor', id = 'P.C. 6004', months = 10, fine = 750, color = 'green'}, - [5] = {title = 'Harassment', class = 'Misdemeanor', id = 'P.C. 6005', months = 10, fine = 500, color = 'orange'}, - [6] = {title = 'Misdemeanor Obstruction of Justice', class = 'Misdemeanor', id = 'P.C. 6006', months = 10, fine = 500, color = 'green'}, - [7] = {title = 'Felony Obstruction of Justice', class = 'Felony', id = 'P.C. 6007', months = 15, fine = 900, color = 'green'}, - [8] = {title = 'Inciting a Riot', class = 'Felony', id = 'P.C. 6008', months = 25, fine = 1000, color = 'orange'}, - [9] = {title = 'Loitering on Government Properties', class = 'Infraction', id = 'P.C. 6009', months = 0, fine = 500, color = 'green'}, - [10] = {title = 'Tampering', class = 'Misdemeanor', id = 'P.C. 6010', months = 10, fine = 500, color = 'green'}, - [11] = {title = 'Vehicle Tampering', class = 'Misdemeanor', id = 'P.C. 6011', months = 15, fine = 750, color = 'green'}, - [12] = {title = 'Evidence Tampering', class = 'Felony', id = 'P.C. 6012', months = 20, fine = 1000, color = 'green'}, - [13] = {title = 'Witness Tampering', class = 'Felony', id = 'P.C. 6013', months = 0, fine = 0, color = 'green'}, - [14] = {title = 'Failure to Provide Identification', class = 'Misdemeanor', id = 'P.C. 6014', months = 15, fine = 1500, color = 'green'}, - [15] = {title = 'Vigilantism', class = 'Felony', id = 'P.C. 6015', months = 30, fine = 1500, color = 'orange'}, - [16] = {title = 'Unlawful Assembly', class = 'Misdemeanor', id = 'P.C. 6016', months = 10, fine = 750, color = 'orange'}, - [17] = {title = 'Government Corruption', class = 'Felony', id = 'P.C. 6017', months = 0, fine = 0, color = 'red'}, - [18] = {title = 'Stalking', class = 'Felony', id = 'P.C. 6018', months = 40, fine = 1500, color = 'orange'}, - [19] = {title = 'Aiding and Abetting', class = 'Misdemeanor', id = 'P.C. 6019', months = 15, fine = 450, color = 'orange'}, - [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green'}, + [1] = {title = 'Disobeying a Peace Officer', class = 'infraction', id = 'P.C. 6001', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Disorderly Conduct', class = 'Infraction', id = 'P.C. 6002', months = 0, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Disturbing the Peace', class = 'infraction', id = 'P.C. 6003', months = 0, fine = 350, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'False Reporting', class = 'Misdemeanor', id = 'P.C. 6004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Harassment', class = 'Misdemeanor', id = 'P.C. 6005', months = 10, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, + [6] = {title = 'Misdemeanor Obstruction of Justice', class = 'Misdemeanor', id = 'P.C. 6006', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Felony Obstruction of Justice', class = 'Felony', id = 'P.C. 6007', months = 15, fine = 900, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Inciting a Riot', class = 'Felony', id = 'P.C. 6008', months = 25, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Loitering on Government Properties', class = 'Infraction', id = 'P.C. 6009', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Tampering', class = 'Misdemeanor', id = 'P.C. 6010', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'Vehicle Tampering', class = 'Misdemeanor', id = 'P.C. 6011', months = 15, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [12] = {title = 'Evidence Tampering', class = 'Felony', id = 'P.C. 6012', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [13] = {title = 'Witness Tampering', class = 'Felony', id = 'P.C. 6013', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, + [14] = {title = 'Failure to Provide Identification', class = 'Misdemeanor', id = 'P.C. 6014', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Vigilantism', class = 'Felony', id = 'P.C. 6015', months = 30, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [16] = {title = 'Unlawful Assembly', class = 'Misdemeanor', id = 'P.C. 6016', months = 10, fine = 750, color = 'orange', description = 'Insert Charge Description Here'}, + [17] = {title = 'Government Corruption', class = 'Felony', id = 'P.C. 6017', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [18] = {title = 'Stalking', class = 'Felony', id = 'P.C. 6018', months = 40, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [19] = {title = 'Aiding and Abetting', class = 'Misdemeanor', id = 'P.C. 6019', months = 15, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, + [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, }, [7] = { - [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Mask', id = 'P.C. 7001', months = 5, fine = 250, color = 'green'}, - [2] = {title = 'Felony Possession of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'green'}, - [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green'}, - [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange'}, - [5] = {title = 'Possession of Marijuana with Intent to Distribute', class = 'Felony', id = 'P.C. 7005', months = 30, fine = 3000, color = 'orange'}, - [6] = {title = 'Misdemeanor Possession of Cocaine', class = 'Misdemeanor', id = 'P.C. 7006', months = 7, fine = 500, color = 'green'}, - [7] = {title = 'Felony Possession of Cocaine', class = 'Felony', id = 'P.C. 7007', months = 25, fine = 1500, color = 'green'}, - [8] = {title = 'Possession of Cocaine with Intent to Distribute', class = 'Felony', id = 'P.C. 7008', months = 35, fine = 4500, color = 'orange'}, - [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green'}, - [10] = {title = 'Felony Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'green'}, - [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange'}, - [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7012', months = 7, fine = 500, color = 'green'}, - [13] = {title = 'Felony Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'green'}, - [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange'}, - [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green'}, - [16] = {title = 'Felony Possession of Ecstasy', class = 'Felony', id = 'P.C. 7016', months = 25, fine = 1500, color = 'green'}, - [17] = {title = 'Possession of Ecstasy with Intent to Distribute', class = 'Felony', id = 'P.C. 7017', months = 35, fine = 4500, color = 'orange'}, - [18] = {title = 'Misdemeanor Possession of Opium', class = 'Misdemeanor', id = 'P.C. 7018', months = 7, fine = 500, color = 'green'}, - [19] = {title = 'Felony Possession of Opium', class = 'Felony', id = 'P.C. 7019', months = 25, fine = 1500, color = 'green'}, - [20] = {title = 'Possession of Opium with Intent to Distribute', class = 'Felony', id = 'P.C. 7020', months = 35, fine = 4500, color = 'orange'}, - [21] = {title = 'Misdemeanor Possession of Adderall', class = 'Misdemeanor', id = 'P.C. 7021', months = 7, fine = 500, color = 'green'}, - [22] = {title = 'Felony Possession of Adderall', class = 'Felony', id = 'P.C. 7022', months = 25, fine = 1500, color = 'green'}, - [23] = {title = 'Possession of Adderall with Intent to Distribute', class = 'Felony', id = 'P.C. 7023', months = 35, fine = 4500, color = 'orange'}, - [24] = {title = 'Misdemeanor Possession of Xanax', class = 'Misdemeanor', id = 'P.C. 7024', months = 7, fine = 500, color = 'green'}, - [25] = {title = 'Felony Possession of Xanax', class = 'Felony', id = 'P.C. 7025', months = 25, fine = 1500, color = 'green'}, - [26] = {title = 'Possession of Xanax with Intent to Distribute', class = 'Felony', id = 'P.C. 7026', months = 35, fine = 4500, color = 'orange'}, - [27] = {title = 'Misdemeanor Possession of Shrooms', class = 'Misdemeanor', id = 'P.C. 7027', months = 7, fine = 500, color = 'green'}, - [28] = {title = 'Felony Possession of Shrooms', class = 'Felony', id = 'P.C. 7028', months = 25, fine = 1500, color = 'green'}, - [29] = {title = 'Possession of Shrooms with Intent to Distribute', class = 'Felony', id = 'P.C. 7029', months = 35, fine = 4500, color = 'orange'}, - [30] = {title = 'Misdemeanor Possession of Lean', class = 'Misdemeanor', id = 'P.C. 7030', months = 7, fine = 500, color = 'green'}, - [31] = {title = 'Felony Possession of Lean', class = 'Felony', id = 'P.C. 7031', months = 25, fine = 1500, color = 'green'}, - [32] = {title = 'Possession of Lean with Intent to Distribute', class = 'Felony', id = 'P.C. 7032', months = 35, fine = 4500, color = 'orange'}, - [33] = {title = 'Sale of a controlled substance', class = 'Misdemeanor', id = 'P.C. 7033', months = 10, fine = 1000, color = 'green'}, - [34] = {title = 'Drug Trafficking', class = 'Felony', id = 'P.C. 7034', months = 0, fine = 0, color = 'red'}, - [35] = {title = 'Desecration of a Human Corpse', class = 'Felony', id = 'P.C. 7035', months = 20, fine = 1500, color = 'orange'}, - [36] = {title = 'Public Intoxication', class = 'Infraction', id = 'P.C. 7036', months = 0, fine = 500, color = 'green'}, - [37] = {title = 'Public Indecency', class = 'Misdemeanor', id = 'P.C. 7037', months = 10, fine = 750, color = 'green'}, + [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Mask', id = 'P.C. 7001', months = 5, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Felony Possession of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [5] = {title = 'Possession of Marijuana with Intent to Distribute', class = 'Felony', id = 'P.C. 7005', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, + [6] = {title = 'Misdemeanor Possession of Cocaine', class = 'Misdemeanor', id = 'P.C. 7006', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Felony Possession of Cocaine', class = 'Felony', id = 'P.C. 7007', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Possession of Cocaine with Intent to Distribute', class = 'Felony', id = 'P.C. 7008', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Felony Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7012', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [13] = {title = 'Felony Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Felony Possession of Ecstasy', class = 'Felony', id = 'P.C. 7016', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [17] = {title = 'Possession of Ecstasy with Intent to Distribute', class = 'Felony', id = 'P.C. 7017', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [18] = {title = 'Misdemeanor Possession of Opium', class = 'Misdemeanor', id = 'P.C. 7018', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [19] = {title = 'Felony Possession of Opium', class = 'Felony', id = 'P.C. 7019', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [20] = {title = 'Possession of Opium with Intent to Distribute', class = 'Felony', id = 'P.C. 7020', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [21] = {title = 'Misdemeanor Possession of Adderall', class = 'Misdemeanor', id = 'P.C. 7021', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [22] = {title = 'Felony Possession of Adderall', class = 'Felony', id = 'P.C. 7022', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [23] = {title = 'Possession of Adderall with Intent to Distribute', class = 'Felony', id = 'P.C. 7023', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [24] = {title = 'Misdemeanor Possession of Xanax', class = 'Misdemeanor', id = 'P.C. 7024', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [25] = {title = 'Felony Possession of Xanax', class = 'Felony', id = 'P.C. 7025', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [26] = {title = 'Possession of Xanax with Intent to Distribute', class = 'Felony', id = 'P.C. 7026', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [27] = {title = 'Misdemeanor Possession of Shrooms', class = 'Misdemeanor', id = 'P.C. 7027', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [28] = {title = 'Felony Possession of Shrooms', class = 'Felony', id = 'P.C. 7028', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [29] = {title = 'Possession of Shrooms with Intent to Distribute', class = 'Felony', id = 'P.C. 7029', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [30] = {title = 'Misdemeanor Possession of Lean', class = 'Misdemeanor', id = 'P.C. 7030', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [31] = {title = 'Felony Possession of Lean', class = 'Felony', id = 'P.C. 7031', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [32] = {title = 'Possession of Lean with Intent to Distribute', class = 'Felony', id = 'P.C. 7032', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [33] = {title = 'Sale of a controlled substance', class = 'Misdemeanor', id = 'P.C. 7033', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [34] = {title = 'Drug Trafficking', class = 'Felony', id = 'P.C. 7034', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [35] = {title = 'Desecration of a Human Corpse', class = 'Felony', id = 'P.C. 7035', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [36] = {title = 'Public Intoxication', class = 'Infraction', id = 'P.C. 7036', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [37] = {title = 'Public Indecency', class = 'Misdemeanor', id = 'P.C. 7037', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, }, [8] = { - [1] = {title = 'Criminal Possession of Weapon Class A', class = 'Felony', id = 'P.C. 8001', months = 10, fine = 500, color = 'green'}, - [2] = {title = 'Criminal Possession of Weapon Class B', class = 'Felony', id = 'P.C. 8002', months = 15, fine = 1000, color = 'green'}, - [3] = {title = 'Criminal Possession of Weapon Class C', class = 'Felony', id = 'P.C. 8003', months = 30, fine = 3500, color = 'green'}, - [4] = {title = 'Criminal Possession of Weapon Class D', class = 'Felony', id = 'P.C. 8004', months = 25, fine = 1500, color = 'green'}, - [5] = {title = 'Criminal Sale of Weapon Class A', class = 'Felony', id = 'P.C. 8005', months = 15, fine = 1000, color = 'orange'}, - [6] = {title = 'Criminal Sale of Weapon Class B', class = 'Felony', id = 'P.C. 8006', months = 20, fine = 2000, color = 'orange'}, - [7] = {title = 'Criminal Sale of Weapon Class C', class = 'Felony', id = 'P.C. 8007', months = 35, fine = 7000, color = 'orange'}, - [8] = {title = 'Criminal Sale of Weapon Class D', class = 'Felony', id = 'P.C. 8008', months = 30, fine = 3000, color = 'orange'}, - [9] = {title = 'Criminal Use of Weapon', class = 'Misdemeanor', id = 'P.C. 8009', months = 10, fine = 450, color = 'orange'}, - [10] = {title = 'Possession of Illegal Firearm Modifications', class = 'Misdemeanor', id = 'P.C. 8010', months = 10, fine = 300, color = 'green'}, - [11] = {title = 'Weapon Trafficking', class = 'Felony', id = 'P.C. 8011', months = 0, fine = 0, color = 'red'}, - [12] = {title = 'Brandishing a Weapon', class = 'Misdemeanor', id = 'P.C. 8012', months = 15, fine = 500, color = 'orange'}, - [13] = {title = 'Insurrection', class = 'Felony', id = 'P.C. 8013', months = 0, fine = 0, color = 'red'}, - [14] = {title = 'Flying into Restricted Airspace', class = 'Felony', id = 'P.C. 8014', months = 20, fine = 1500, color = 'green'}, - [15] = {title = 'Jaywalking', class = 'Infraction', id = 'P.C. 8015', months = 0, fine = 150, color = 'green'}, - [16] = {title = 'Criminal Use of Explosives', class = 'Felony', id = 'P.C. 8016', months = 30, fine = 2500, color = 'orange'}, + [1] = {title = 'Criminal Possession of Weapon Class A', class = 'Felony', id = 'P.C. 8001', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Criminal Possession of Weapon Class B', class = 'Felony', id = 'P.C. 8002', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Criminal Possession of Weapon Class C', class = 'Felony', id = 'P.C. 8003', months = 30, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Criminal Possession of Weapon Class D', class = 'Felony', id = 'P.C. 8004', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Criminal Sale of Weapon Class A', class = 'Felony', id = 'P.C. 8005', months = 15, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, + [6] = {title = 'Criminal Sale of Weapon Class B', class = 'Felony', id = 'P.C. 8006', months = 20, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, + [7] = {title = 'Criminal Sale of Weapon Class C', class = 'Felony', id = 'P.C. 8007', months = 35, fine = 7000, color = 'orange', description = 'Insert Charge Description Here'}, + [8] = {title = 'Criminal Sale of Weapon Class D', class = 'Felony', id = 'P.C. 8008', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Criminal Use of Weapon', class = 'Misdemeanor', id = 'P.C. 8009', months = 10, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, + [10] = {title = 'Possession of Illegal Firearm Modifications', class = 'Misdemeanor', id = 'P.C. 8010', months = 10, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'Weapon Trafficking', class = 'Felony', id = 'P.C. 8011', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [12] = {title = 'Brandishing a Weapon', class = 'Misdemeanor', id = 'P.C. 8012', months = 15, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, + [13] = {title = 'Insurrection', class = 'Felony', id = 'P.C. 8013', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [14] = {title = 'Flying into Restricted Airspace', class = 'Felony', id = 'P.C. 8014', months = 20, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Jaywalking', class = 'Infraction', id = 'P.C. 8015', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Criminal Use of Explosives', class = 'Felony', id = 'P.C. 8016', months = 30, fine = 2500, color = 'orange', description = 'Insert Charge Description Here'}, }, [9] = { - [1] = {title = 'Driving While Intoxicated', class = 'Misdemeanor', id = 'P.C. 9001', months = 5, fine = 300, color = 'green'}, - [2] = {title = 'Evading', class = 'Misdemeanor', id = 'P.C. 9002', months = 5, fine = 400, color = 'green'}, - [3] = {title = 'Reckless Evading', class = 'Felony', id = 'P.C. 9003', months = 10, fine = 800, color = 'orange'}, - [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green'}, - [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green'}, - [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green'}, - [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green'}, - [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange'}, - [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green'}, - [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green'}, - [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green'}, - [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green'}, - [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green'}, - [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green'}, - [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green'}, - [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green'}, - [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green'}, - [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green'}, - [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green'}, - [20] = {title = 'Driving without Headlights or Signals', class = 'Infraction', id = 'P.C. 9020', months = 0, fine = 300, color = 'green'}, - [21] = {title = 'Street Racing', class = 'Felony', id = 'P.C. 9021', months = 15, fine = 1500, color = 'green'}, - [22] = {title = 'Piloting without Proper Licensing', class = 'Felony', id = 'P.C. 9022', months = 20, fine = 1500, color = 'orange'}, - [23] = {title = 'Unlawful Use of a Motorvehicle', class = 'Misdemeanor', id = 'P.C. 9023', months = 10, fine = 750, color = 'green'}, + [1] = {title = 'Driving While Intoxicated', class = 'Misdemeanor', id = 'P.C. 9001', months = 5, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Evading', class = 'Misdemeanor', id = 'P.C. 9002', months = 5, fine = 400, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Reckless Evading', class = 'Felony', id = 'P.C. 9003', months = 10, fine = 800, color = 'orange', description = 'Insert Charge Description Here'}, + [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green', description = 'Insert Charge Description Here'}, + [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, + [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, + [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [20] = {title = 'Driving without Headlights or Signals', class = 'Infraction', id = 'P.C. 9020', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [21] = {title = 'Street Racing', class = 'Felony', id = 'P.C. 9021', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [22] = {title = 'Piloting without Proper Licensing', class = 'Felony', id = 'P.C. 9022', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [23] = {title = 'Unlawful Use of a Motorvehicle', class = 'Misdemeanor', id = 'P.C. 9023', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, }, [10] = { - [1] = {title = 'Hunting in Restricted Areas', class = 'Infraction', id = 'P.C. 10001', months = 0, fine = 450, color = 'green'}, - [2] = {title = 'Unlicensed Hunting', class = 'Infraction', id = 'P.C. 10002', months = 0, fine = 450, color = 'green'}, - [3] = {title = 'Animal Cruelty', class = 'Misdemeanor', id = 'P.C. 10003', months = 10, fine = 450, color = 'green'}, - [4] = {title = 'Hunting with a Non-Hunting Weapon', class = 'Misdemeanor', id = 'P.C. 10004', months = 10, fine = 750, color = 'green'}, - [5] = {title = 'Hunting outside of hunting hours', class = 'Infraction', id = 'P.C. 10005', months = 0, fine = 750, color = 'green'}, - [6] = {title = 'Overhunting', class = 'Misdemeanor', id = 'P.C. 10006', months = 10, fine = 1000, color = 'green'}, - [7] = {title = 'Poaching', class = 'Felony', id = 'P.C. 10007', months = 20, fine = 1250, color = 'red'}, + [1] = {title = 'Hunting in Restricted Areas', class = 'Infraction', id = 'P.C. 10001', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Unlicensed Hunting', class = 'Infraction', id = 'P.C. 10002', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Animal Cruelty', class = 'Misdemeanor', id = 'P.C. 10003', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Hunting with a Non-Hunting Weapon', class = 'Misdemeanor', id = 'P.C. 10004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Hunting outside of hunting hours', class = 'Infraction', id = 'P.C. 10005', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Overhunting', class = 'Misdemeanor', id = 'P.C. 10006', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Poaching', class = 'Felony', id = 'P.C. 10007', months = 20, fine = 1250, color = 'red', description = 'Insert Charge Description Here'}, } } diff --git a/ui/app.js b/ui/app.js index fce3e7e6..6adc6ab0 100644 --- a/ui/app.js +++ b/ui/app.js @@ -3,6 +3,7 @@ let canSaveProfile = true; let canRefreshBolo = true; let canRefreshReports = true; let canRefreshIncidents = true; +let canSearchForWeapons = true; let canInputTag = true; let canInputBoloTag = true; let canInputBoloOfficerTag = true; @@ -17,6 +18,7 @@ let canInputReportCivilianTag = true; let canSearchForVehicles = true; let canSearchForReports = true; let canSaveVehicle = true; +let canSaveWeapon = true; var LastName = ""; var DispatchNum = 0; var playerJob = ""; @@ -34,7 +36,8 @@ const AmbulanceJobs = { } const DojJobs = { - ['lawyer']: true + ['lawyer']: true, + ['judge']: true } const MONTH_NAMES = [ @@ -1281,7 +1284,7 @@ $(document).ready(() => { //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) //} else { var template = ""; - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { template = "ICU Room #: [ # ]\n\nReport ID: [ Report ID ]\n\nTime Admitted: [ Date and Time Here ]\n\nSurgery: [Yes/No]\n\nInjuries/Ailments:\n - [ Enter List Of Injuries Here ]\n\n\nAdditional Attending:\n - [ List Any Other Staff Here ]\n\n\n🧑‍🤝‍🧑 Additional Emergency Contacts:\n - [ Name And Number ]\n\n\nNotes:\n[Additional Notes Here]"; } @@ -1580,7 +1583,7 @@ $(document).ready(() => { $(".contextmenu").on("click", ".bolo-delete", function () { if ($(this).data("info") != 0) { - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { $(".bolos-items") .find("[data-id='" + $(this).data("info") + "']") .remove(); @@ -1614,7 +1617,7 @@ $(document).ready(() => { status: "", }, ]; - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { args = [ { className: "bolo-delete", @@ -1740,6 +1743,27 @@ $(document).ready(() => { } ); + var timeout; + $(".offenses-main-container").on("mouseenter",".offense-item",function (e) { + var descr = $(this).data("descr") + timeout = setTimeout(function() { + let args = [ + { + className: "incidents-remove-tag", + text: "Remove Tag", + info: descr, + status: "", + }, + ]; + openChargesContextMenu(e, args); + }, 500); + }); + + $(".offenses-main-container").on("mouseleave",".offense-item",function (e) { + clearTimeout(timeout) + hideChargesMenu(); + }); + $(".bolo-gallery-inner-container").on("click", ".bolo-img", function () { if ($(this).css("filter") == "none") { $(this).css("filter", "blur(5px)"); @@ -1947,7 +1971,7 @@ $(document).ready(() => { this ).data( "cid" - )}">
@@ -2385,7 +2409,7 @@ $(document).ready(() => { //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) //} else { let template = ""; - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { template = "Submitted to ICU?: [Yes/No]\n\nIncident Report:\n[ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]\n\n\nList of Injuries:\n- [ State what injury or injuries occurred ]\n\n\n💉 Surgical Report:\n[ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]\n\n\nAttending:\n- [ List Any Attending Here ]\n\n\nMedications Applied:\n- [ List Any Attending Here ]\n\n\nNotes:\n[ Additional Notes Here ]"; } @@ -2650,11 +2674,10 @@ $(document).ready(() => { canSaveVehicle = true; }, 750); setTimeout(() => { - let dbid = $(".vehicle-information-title-holder").data( - "dbid" - ); + let dbid = $(".vehicle-information-title-holder").data("dbid"); let plate = $(".vehicle-info-plate-input").val(); let notes = $(".vehicle-info-content").val(); + let points = $("#vehiclePointsSlider").val(); let imageurl = $(".vehicle-info-image").attr("src"); let newImageurl = $(".vehicle-info-imageurl-input").val(); @@ -2698,6 +2721,7 @@ $(document).ready(() => { stolen: stolen, code5: code5, impound: impoundInfo, + points: points, }) ); @@ -2960,6 +2984,148 @@ $(document).ready(() => { } }); + $(".weapons-search-title").click(function () { + if (canSearchForWeapons == true) { + if ($(".weapons-search-input").css("display") == "none") { + $(".weapons-search-input").slideDown(250); + $(".weapons-search-input").css("display", "block"); + } else { + $(".weapons-search-input").slideUp(250); + setTimeout(() => { + $(".weapons-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#weapons-search-input").keydown(async function (e) { + if (e.keyCode === 13 && canSearchForWeapons == true) { + let name = $("#weapons-search-input").val(); + if (name !== "") { + canSearchForWeapons = false; + $(".weapons-items").empty(); + $(".weapons-items").prepend(`
`); + + let result = await $.post( + `https://${GetParentResourceName()}/searchWeapons`, + JSON.stringify({ + name: name, + }) + ); + console.log(result) + if (result.length === 0) { + $(".weapons-items").html( + ` +
+ +
+
+
No Weapons Matching that search
+
+
+
+
+
+ ` + ); + canSearchForWeapons = true; + return true; + } + $(".weapons-items").empty(); + + let weaponHTML = ""; + + result.forEach((value) => { + weaponHTML += ` +
+ +
+
+
${value.weapModel} - Class ${value.weapClass}
+ +
+
+
Serial Number: ${value.serial} · Owner: ${value.owner}
+
+
+
+ `; + }); + + $(".weapons-items").html(weaponHTML); + + canSearchForWeapons = true; + } + } + }); + + $(".weapon-information-title-holder").on("click", ".weapon-information-new", function () { + $(".weapon-information-title-holder").data("dbid", 0); + $(".weapon-info-serial-input").val(""); + $(".weapon-info-owner-input").val(""); + $(".weapon-info-class-input").val(""); + $(".weapon-info-model-input").val(""); + $(".weapon-info-imageurl-input").val("img/not-found.webp"); + + canSaveWeapon = true; + } +); + + $(".weapon-information-title-holder").on("click", ".weapon-information-save", function () { + if (canSaveProfile == true) { + canSaveProfile = false; + $(".manage-profile-save").empty(); + $(".manage-profile-save").prepend( + `` + ); + setTimeout(() => { + $(".manage-profile-save").empty(); + $(".manage-profile-save").html("Save"); + canSaveProfile = true; + }, 750); + + setTimeout(() => { + let serial = $(".weapon-info-serial-input").val(); + let notes = $(".weapon-info-content").val(); + let owner = $(".weapon-info-owner-input").val(); + let weapClass = $(".weapon-info-class-input").val(); + let weapModel = $(".weapon-info-model-input").val(); + + let imageurl = $(".weapon-info-image").attr("src"); + let newImageurl = $(".weapon-info-imageurl-input").val(); + if (newImageurl.includes("base64")) { + imageurl = "img/not-found.webp"; + } else { + imageurl = newImageurl; + } + + $.post( + `https://${GetParentResourceName()}/saveWeaponInfo`, + JSON.stringify({ + serial: serial, + imageurl: imageurl, + notes: notes, + owner: owner, + weapClass: weapClass, + weapModel: weapModel, + }) + ); + + $(".weapon-info-image").attr("src", newImageurl); + }, 250); + } + } +); + + $(".weapons-items").on("click", ".weapons-item", function () { + $.post( + `https://${GetParentResourceName()}/getWeaponData`, + JSON.stringify({ + serial: $(this).data("serial"), + }) + ); + }); + $(".contextmenu").on("click", ".view-profile", async function () { const cid = $(this).data("info"); fidgetSpinner(".profile-page-container"); @@ -3212,6 +3378,12 @@ $(document).ready(() => { $("#respondcalls").val("")*/ }); + $('#vehiclePointsSlider').change(function(){ + //console.log(this.value); + var currentValue = $('#vehiclePointsSliderValue'); + currentValue.html(this.value); + }); + $(".active-calls-list").on( "contextmenu", ".active-calls-item", @@ -3583,7 +3755,7 @@ $(document).ready(() => { "--color-10", "#8f741b" ); - $(".badge-logo").attr("src", "img/sasp_badge.png"); + $(".badge-logo").attr("src", "img/sasp_badge.webp"); $(".header-title").html("SAN ANDREAS STATE POLICE"); $(".bolo-nav-item").html("BOLOs"); $(".bolos-search-title").html("Bolos"); @@ -3614,6 +3786,7 @@ $(document).ready(() => { $(".incidents-nav-item").show(); $(".bolo-nav-item").show(); $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() $(".cams-nav-item").show(); $(".dispatch-title-ofsomesort").html("Dispatch"); $(".dispatch-comms-container").fadeIn(0); @@ -3679,7 +3852,7 @@ $(document).ready(() => { "--color-10", "#444444" ); - $(".badge-logo").attr("src", "img/ems_badge.png"); + $(".badge-logo").attr("src", "img/ems_badge.webp"); $(".header-title").html("PILLBOX HILL MEDICAL CENTER"); //$(".quote-span").html("The simplest explanation is almost always somebody screwed up."); $(".bolo-nav-item").html("ICU"); @@ -3766,10 +3939,11 @@ $(document).ready(() => { "--color-8", "#cc9225" ); - $(".badge-logo").attr("src", "img/court.png"); + $(".badge-logo").attr("src", "img/court.webp"); $(".header-title").html("DEPARTMENT OF JUSTICE"); //$(".quote-span").html("Actually useless."); //$(".dmv-nav-item").hide(); + $(".weapons-nav-item").show() $(".bolo-nav-item").hide(); $(".dispatch-title-ofsomesort").html("Message Board"); $(".dispatch-comms-container").fadeOut(0); @@ -4323,7 +4497,7 @@ $(document).ready(() => { $.each(penalcode, function (index, value) { $.each(value, function (i, v) { $(`#penal-${index}`).append(` -
+
${v.title}
${v.class}
@@ -4461,13 +4635,13 @@ $(document).ready(() => { - + - + - + - +
` ); } else { @@ -4483,13 +4657,13 @@ $(document).ready(() => {
Recommended Fine
-
+
Recommended Sentence
-
+
Fine
-
+
Sentence
-
+
` ); } @@ -4545,7 +4719,7 @@ $(document).ready(() => { "You are currently editing BOLO " + table["id"] ); - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { $(".manage-bolos-editing-title").html( "You are editing ICU Check-in " + table["id"] ); @@ -4586,7 +4760,7 @@ $(document).ready(() => { var reportName = "General BOLO"; canSearchForProfiles = true; $(".bolos-items").empty(); - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { reportName = "ICU Check-in"; } $.each(table, function (index, value) { @@ -4712,6 +4886,9 @@ $(document).ready(() => { $(".vehicle-info-class-input").val(table["class"]); $(".vehicle-info-model-input").val(table["model"]); $(".vehicle-info-imageurl-input").val(table["image"]); + let vehiclePoints = table["points"] != null ? table["points"] : 0; + $("#vehiclePointsSlider").val(vehiclePoints); + $("#vehiclePointsSliderValue").html(vehiclePoints); $(".vehicle-info-content").val(table["information"]); @@ -4742,19 +4919,28 @@ $(document).ready(() => { stolen = "green-tag"; } - $(".vehicle-tags").append( - `
Impound
` - ); - $(".vehicle-tags").append( - `
BOLO
` - ); - $(".vehicle-tags").append( - `
Code 5
` - ); - $(".vehicle-tags").append( - `
Stolen
` - ); + $(".vehicle-tags").append(`
Impound
`); + $(".vehicle-tags").append(`
BOLO
`); + $(".vehicle-tags").append(`
Code 5
`); + $(".vehicle-tags").append(`
Stolen
`); $(".vehicle-info-imageurl-input").val(table["image"]); + } else if (eventData.type == "getWeaponData") { + impoundChanged = false; + let table = eventData.data; + + $(".weapon-information-title-holder").data( "dbid", table["id"] ); + + $(".weapon-info-serial-input").val(table["serial"]); + $(".weapon-info-owner-input").val(table["owner"]); + $(".weapon-info-class-input").val(table["weapClass"]); + $(".weapon-info-model-input").val(table["weapModel"]); + $(".weapon-info-imageurl-input").val(table["image"]); + + $(".weapon-info-content").val(table["information"]); + + $(".weapon-info-image").attr("src", table["image"]); + + $(".weapon-info-imageurl-input").val(table["image"]); } else if (eventData.type == "updateVehicleDbId") { $(".vehicle-information-title-holder").data("dbid", Number(eventData.data)); } else if (eventData.type == "updateIncidentDbId") { @@ -4917,12 +5103,23 @@ function showMenu(x, y) { $(".contextmenu").addClass("contextmenu-show"); } +function showChargesMenu(x, y) { + $(".ccontextmenu").css("left", x + "px"); + $(".ccontextmenu").css("top", y + "px"); + $(".ccontextmenu").addClass("ccontextmenu-show"); +} + function hideMenu() { $(".contextmenu").removeClass("contextmenu-show"); } +function hideChargesMenu() { + $(".ccontextmenu").removeClass("ccontextmenu-show"); +} + function onMouseDown(e) { hideMenu(); + hideChargesMenu(); document.removeEventListener("mouseup", onMouseDown); } @@ -4947,6 +5144,24 @@ function openContextMenu(e, args) { document.addEventListener("mouseup", onMouseDown); } +function openChargesContextMenu(e, args) { + e.preventDefault(); + showChargesMenu(e.pageX, e.pageY); + $(".ccontextmenu").empty(); + $.each(args, function (index, value) { + if (value.status !== "blur(5px)") { + $(".ccontextmenu").prepend( + ` +
  • + ${value.info} +
  • + ` + ); + } + }); + document.addEventListener("mouseup", onMouseDown); +} + function expandImage(url) { $(".close-all").css("filter", "brightness(35%)"); $(".gallery-image-enlarged").fadeIn(150); diff --git a/ui/dashboard.html b/ui/dashboard.html index a8ca64c4..e8164ce8 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -15,8 +15,8 @@ -
      -
    +
      +
        @@ -88,7 +88,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -113,6 +113,7 @@ +
        @@ -120,7 +121,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -144,6 +145,7 @@ +
        @@ -209,7 +211,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -233,6 +235,7 @@ +
        @@ -317,7 +320,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -341,6 +344,7 @@ +
        @@ -420,7 +424,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -444,6 +448,7 @@ +
        @@ -513,7 +518,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -537,6 +542,7 @@ +
        @@ -605,7 +611,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -629,6 +635,7 @@ +
        @@ -639,7 +646,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -663,6 +670,7 @@ +
        @@ -696,6 +704,8 @@
        Image URL
        +
        Vehicle Points: 0
        +
        @@ -714,9 +724,76 @@
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        Weapons
        +
        +
        + +
        +
        +
        +
        +
        Weapon Information
        +
        New
        +
        Save
        +
        +
        + +
        +
        Serial Number
        +
        +
        +
        Registered To
        +
        +
        +
        Model
        +
        +
        +
        Class
        +
        +
        +
        Image URL
        +
        +
        +
        +
        + +
        +
        +
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -740,6 +817,7 @@ +
        @@ -748,7 +826,7 @@
        - +
        SAN ANDREAS STATE POLICE
        Mobile Database Terminal
        @@ -772,6 +850,7 @@ +
        @@ -796,8 +875,8 @@
        24/7 Supermarkt Route 68
        Rob's Liqour Route 68
        24/7 Supermarkt Senora Fwy CAM 1
        -
        24/7 Supermarkt Senora Fwy CAM 2
        -
        24/7 Supermarkt Alhambra Dr.
        +
        24/7 Supermarkt Alhambra Dr.
        +
        24/7 Supermarkt Senora Fwy CAM 2
        Fleeca Bank Hawick Ave CAM 1
        Fleeca Bank Hawick Ave CAM 2
        Fleeca Bank Legion Square
        @@ -830,4 +909,4 @@
        - \ No newline at end of file + diff --git a/ui/img/9Xn6xXK.webp b/ui/img/9Xn6xXK.webp new file mode 100644 index 0000000000000000000000000000000000000000..98d160fbb6cae365d12341e0818f02a6c543bfea GIT binary patch literal 200 zcmWIYbaOkvz`zjh>J$(bU=hIuWD5W>KLZ0F1B0VafJYOM$59?N{yeu71 z<+XC#wq;YQ+E(Qp4t*X_!fHM7_0GuktyveuPu*I()pW9TPfOp*SIN$7H}sVFJ3HR+ z8qEL5vFl9c|DW7qi~@NKK({GK09|6h$S{{tO91FTMh7+3B@E034FCRoVPF6NL~=z5 literal 0 HcmV?d00001 diff --git a/ui/img/court.webp b/ui/img/court.webp new file mode 100644 index 0000000000000000000000000000000000000000..a10ec58ba95178beff4c38760c7b5d40a37b124b GIT binary patch literal 13892 zcmV-KHoM7ENk&FIHUI!uMM6+kP&il$0000G0002F006lF06|PpNFD|N00E#yZQJp< zdcRE4WLOMq+qP}nwr$(mwr$(Hwr#r&|KxiQM#=ww-*X%h6F`cMDp81u&yImTe~n6cWdi$<0c<_we|Jx3et*lMf;=w;SjT}H!g{HHvZn9;JkV~n^{j8>$6S^YsXmP{ z|CGx@B^MuLt%tf>r|%=y{lR3bRDQtPm)AEYTSC0S5FROD0g-SA1OC}%y7(nW7(`>Z z*@_)x9N!b>vVYG&K3SV!s#bm^m=9JmQPgV;=H0rc$nk}TRq#1n0yQF3<17QaFfwsh8QFItGl!vlGA0tS z=doda)fK+dkI~`zVY5vS!E+}jOi`N{U)eBB!-5F44NtC1jPQGDVQC(Oh<_^>j_HiC ze9;+(`5>{sO7=?qi4u>?R;3#Z^UACVqIVc(IX^r3LpbrHK3Ne&T_jNaq(&BqXb407 zlPgQzvGUZ+O0m6I$zEBAKF?SiEweC!!M;;73tyqd2XbZN+6x!Y$;7c6uPezJ(W`jL z+8I^64p_Ska-U(q>Sr*30e4r(;5o$jOMAMHAv0R1+Xfkb9Y;jH49L92iD=o3WRu1&EY{TqdqZVw`$UyBt{4z%U za-MHt9&`q`N8VY^@aC)jw4GTMPol<5$-jKs`ZNwj47%<{P5Dwr89kzkz@S&04(D>;d> zn&%u;Z{*Ap9Y$(<4521lQ#L;YDo`go1A;i+Ov;YqPn@<=woB|n>0;sRQNl5dPF1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l zB(&1C6b;x8k2R6(84pHr2j^i8`Xo$J-zAK|W@LUYGaW~Xy~{FZYvVe@RR;ciP%kOA ej?KrP6sabKtO|<$5>5aB1JCbO*Zb8#0002ME*rW4 literal 0 HcmV?d00001 diff --git a/ui/img/h7S5f9J.webp b/ui/img/h7S5f9J.webp new file mode 100644 index 0000000000000000000000000000000000000000..0e8f65b20437e1a2bcac83a1ad5c4ef592f9a931 GIT binary patch literal 180 zcmWIYbaPw7z`zjh>J$(bU=hIuWD5W>4+8@q1B0VafJZKn$5_D8(5u3_kZtY3zJo^} z97{+xNEc{PdLt=w=-}JK0)oN~-ww;il~Vc3+rp|9=UYs?R{$opgR;K ffVLViGR$Sv;$`4xV02JZUBbXz!0_+S7X}6ZyW2hW literal 0 HcmV?d00001 diff --git a/ui/img/sasp_badge.webp b/ui/img/sasp_badge.webp new file mode 100644 index 0000000000000000000000000000000000000000..59f74b2ad310c75fc2263d86872f77908b96fd30 GIT binary patch literal 12718 zcmV;fF;UJ^Nk&GdF#rHpMM6+kP&il$0000G0002L006rH06|PpNb?E+009|=ZQGzB zbqtBgB1{nx=0QX_fPh(vLy&E=`g=b|h=|O{i%D(mZQ|d>M>E(C`c4eg!VkLy z)Ik<3iI{*1@P_^WIXC|Q-R{rV#7Tp;X;Nj@wr#WT_uBimZQHhO+qSW`chh~po0>`H zdA~5h%xhk+=jDi)09E;Cp77Koe9LS9UKl6-^uC+EP%V{QTtubaEyk07Ypkro( zYfm`4wVwRk3z_5Ifl`#h@LZsJaa1UD*Vk_)eO;M7a2nhnht7387H~ui2j_ z4=Jb&w4hmV`N54j>D@GaNx;P?7-}BXYX|2y@a8>e{-6|!5A}5C0M0#W9y;{{b3^s4YTek!$nVln1{%%} zoNzKc`Kjc1RJib9EKgKV8zt9$5=AdqnycLJE>v_#!$sDuPy)0S*>X|%vX&Ovh*Wr> zMMc&rspzDT71@YH!OPl*LLWv22lN)(m?(G$78Tp5RB%E|imew^Y`}tI8wsM|#ZJYx zSW>|e78l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Iy$1C^26o8he};B zH9!AiRPFqwwame6W&jldDYWn#shozht2y0Pe1uN@K6_pH*K%8oV1hxan@!{Y@`nDv z<_ne3QxNT3c%&|!%M*WC(xmi_%Hn{X*}DTKit={GGmxMKKHIxBM+VGSZtLaGLu4@c$B-+!hN5>Mx@3 za3kWRIFtfbWg+?w`qV09X1jS z;e7HMI_9Tm3$r{6X*O~CY!n^3=DS%Wn`#8Bm?Z`QgKEm!?rf~Y)k!h4yW^^L$r=%@ zLeg#w?Gf97;rEe{Tim);jR_5p<>oY%r(v(89Va@+Gz)@TYaa!k`Sh@NL&a{La!q>L zr}n`Rwg1cS-n}Zud56wFu_DTVFwo?h{|*=97#gBWGhQW-Ue9+ahCTP#xtoh6W_|p* zIj_w~H|>sJ*beV1VAi#!7Ych(1tdqL_nNvAhQ=cE7AskauPR9&*E zDqL*d;DQtvS*Q(@QzxOpg7rzghKg^hAqg`;kN1i&P(kk1eE0>Wfx#2O0Q}5RAzfXj zMHLCGJKu|>2W{9U9bwyFyXU#chUs}_}SSrPuXC(lVV!;gL_NNWKc> zE{*rJWMZ6ktHX@7w+na*h2p%e&GEn;C8FZ3*m!3(ojJTPIo#cDDr{r>bEQnxWymzo zBF1UJN9|KrFg(^G!^^$G40Ah7TmXd%pSh54rhzcJ*<~9HeS9ht@3#=ILOxq^?gj0e zm8wnde?vU)@DqADH8<$uv-Qe0&0P*BojUV`g(i$M#S`IWh+)58oDB9V$lqt%vE1nz%^4``B}Nm<_7RHqT~VjpCru0ssI20B5KMz40p`;n*mUZOz;nJlMmOckUt3 zKi~Or`A#?X8(+r@+qo+&9xouKfF@h7=p?-AMHiWz6zSJd39&hWtPJ#AQ~~KgK(g9B o)HL*k+h41@A1NK&f0Jl!@57kt82l~u2|Fihoi;DOi825H05jtER{#J2 literal 0 HcmV?d00001 diff --git a/ui/style.css b/ui/style.css index a7963d4f..79fd1ed0 100644 --- a/ui/style.css +++ b/ui/style.css @@ -114,6 +114,17 @@ input::-webkit-inner-spin-button { display: none; } +.weapons-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + .stafflogs-page-container { background-color: var(--color-9); border-radius: 15px; @@ -2750,7 +2761,7 @@ span.civilians-incident-input[contenteditable]:empty::before { margin: auto; display: flex; flex-direction: column; - z-index: 9999; + z-index: 9998; display: none; } @@ -4702,6 +4713,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin-top: 5px; color: white; background-color: rgba(0, 0, 0, 0); + width: 80%; } .vehicle-info-owner { @@ -4719,6 +4731,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin-top: 5px; color: white; background-color: rgba(0, 0, 0, 0); + width: 80%; } .vehicle-info-class { @@ -4736,6 +4749,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin-top: 5px; color: white; background-color: rgba(0, 0, 0, 0); + width: 80%; } .vehicle-info-model { @@ -4753,6 +4767,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin-top: 5px; color: white; background-color: rgba(0, 0, 0, 0); + width: 80%; } .vehicle-info-imageurl { @@ -4770,6 +4785,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin-top: 5px; color: white; background-color: rgba(0, 0, 0, 0); + width: 80%; } .vehicle-info-icon { @@ -4873,7 +4889,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin-bottom: 0px; border: none; outline: none; - min-height: 30.9vh; + min-height: 26.9vh; resize: none; background-color: var(--color-5); color: white; @@ -5090,7 +5106,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin: auto; display: flex; flex-direction: column; - z-index: 9999; + z-index: 9998; user-select: none; } @@ -5328,7 +5344,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin: auto; display: flex; flex-direction: column; - z-index: 9999; + z-index: 9998; border: .45vh solid white; } @@ -5400,7 +5416,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin: auto; display: flex; flex-direction: column; - z-index: 9999; + z-index: 9998; border: .45vh solid white; } @@ -5501,15 +5517,15 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { color: black; } -.orange-penis-code { +.orange-penal-code { background-color: #D77A0D; } -.green-penis-code { +.green-penal-code { background-color: #0B9509; } -.red-penis-code { +.red-penal-code { background-color: #950909; } @@ -5678,7 +5694,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { margin: auto; display: flex; flex-direction: column; - z-index: 9999; + z-index: 9998; overflow: auto; } @@ -5920,3 +5936,488 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { .cams-items:hover { background-color: var(--color-3); } + +.weapons-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; +} + +.weapons-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.weapons-search-title:hover { + background-color: var(--color-3); +} + +.weapons-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#weapons-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#weapons-search-input::placeholder { + color: white; +} + +.weapons-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.weapon-information-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.weapon-information-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.weapon-information-new:hover { + background-color: #aa1c1c; +} + +.weapon-information-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.weapon-information-save:hover { + background-color: #1caa28; +} + +.weapon-information-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 81%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.weapon-info-stuff { + display: flex; + flex-direction: row; + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; +} + +.weapon-info-image { + width: 444px; + height: 269px; + object-fit: cover; +} + +.weapon-info-imageurl { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-imageurl-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-inner-container { + display: flex; + flex-direction: column; + width: 55%; +} + +.weapon-info-serial { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-serial-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-icon { + color: white; + font-size: 16px; + margin-left: 10px +} + +.weapon-info-line { + background-color: var(--color-3); + height: 2px; + margin-left: 10px; + margin-bottom: 10px; +} + +.weapon-info-model { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-model-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-owner { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-owner-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-class { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-class-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-imageurl { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-imageurl-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.weapon-info-content { + width: 93%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + border: none; + outline: none; + min-height: 30.9vh; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.weapons-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.weapons-bottom-info { + display: flex; + margin: auto; + width: 100%; +} + +.weapons-id { + color: white; + font-size: 13px; +} + +.weapons-item { + background-color: var(--color-5); + width: 100%; + height: 9vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + +} + +.weapons-item:hover { + background-color: var(--color-3); +} + +.weapons-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.vehicle-info-points { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; + margin-top: 5px; +} + +input[type="range"].vehicle-info-points-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 80%; +} + +input[type="range"].vehicle-info-points-input::-moz-range-thumb { + box-shadow: none; + border: 2px solid grey; + height: 16px; + width: 16px; + border-radius: 16px; + background: white; +} + +input[type="range"].vehicle-info-points-input::-moz-range-track { + width: 100%; + height: 2px; + box-shadow: none; + background: var(--color-8); + border-radius: 0px; + border: 0px; +} + +/* Charges Hover */ + +.ccontextmenu { + position: absolute; + width: fit-content; + padding: 2px; + margin: 0; + border: 1px solid var(--color-3); + background: var(--color-5); + z-index: 100; + border-radius: 3px; + box-shadow: 1px 1px 4px rgba(0,0,0,.2); + opacity: 0; + transform: translate(0, 15px) scale(.95); + transition: transform 0.1s ease-out, opacity 0.1s ease-out; + pointer-events: none; +} + +.ccontextmenu-item { + display: block; + position: relative; + margin: 0; + padding: 0; + /* white-space: nowrap; */ + max-width: 34ch; + word-wrap:break-word; +} + +.ccontextmenu-text { + display: block; + color: white; + font-size: 13px; + cursor: pointer; + border: 1px solid transparent; + /* white-space: nowrap; */ + padding: 6px 8px; + border-radius: 3px; + max-width: 34ch; + word-wrap:break-word; +} + +.ccontextmenu-text { + outline: 0 none; + text-decoration: none; +} + +.ccontextmenu-text .fa { + position: absolute; + left: 8px; + top: 50%; + transform: translateY(-50%); +} + +.ccontextmenu-item-disabled { + opacity: .5; + pointer-events: none; +} + +.ccontextmenu-item-disabled .ccontextmenu-text { + cursor: default; +} + +.ccontextmenu-item-submenu::after { + content: ""; + position: absolute; + right: 6px; + top: 50%; + transform: translateY(-50%); + border: 5px solid transparent; + border-left-color: #808080; +} + +.ccontextmenu-item-submenu:hover::after { + border-left-color: #fff; +} + +.ccontextmenu-show, +.ccontextmenu-item:hover > .ccontextmenu { + opacity: 1; + transform: translate(0, 0) scale(1); + pointer-events: auto; + z-index: 9999; +} \ No newline at end of file From da0e083148ad14541117e8f24646ad0e35320705 Mon Sep 17 00:00:00 2001 From: Joe Szymkowicz <70592880+JoeSzymkowiczFiveM@users.noreply.github.com> Date: Sun, 13 Nov 2022 16:10:36 -0600 Subject: [PATCH 005/381] Add unique key --- mdt.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mdt.sql b/mdt.sql index ba2b899c..a8b80cbb 100644 --- a/mdt.sql +++ b/mdt.sql @@ -110,7 +110,8 @@ CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( `weapClass` varchar(50) DEFAULT NULL, `weapModel` varchar(50) DEFAULT NULL, `image` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + UNIQUE KEY `serial` (`serial`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS `mdt_impound` ( @@ -120,4 +121,4 @@ CREATE TABLE IF NOT EXISTS `mdt_impound` ( `fee` int(11) DEFAULT NULL, `time` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; From 7524539ec7c272e8fe47ed1d12c0abecb5e9dfcd Mon Sep 17 00:00:00 2001 From: Luceeiy Date: Thu, 17 Nov 2022 00:15:24 -0600 Subject: [PATCH 006/381] Ability To See Apartment's in persons prolife This adds the ability to see the exact apartment number that the person owns in their profile. --- server/dbm.lua | 5 +++++ server/main.lua | 7 +++++++ ui/app.js | 1 + ui/dashboard.html | 3 +++ ui/style.css | 17 +++++++++++++++++ 5 files changed, 33 insertions(+) diff --git a/server/dbm.lua b/server/dbm.lua index 5cffe4d8..3a13b38c 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -116,6 +116,11 @@ function GetVehicleInformation(plate, cb) cb(result) end +function GetPlayerApartment(cid, cb) + local result = MySQL.query.await('SELECT name, type, label FROM apartments where citizenid = ?', {cid}) + return result +end + function GetPlayerLicenses(identifier) local response = false local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) diff --git a/server/main.lua b/server/main.lua index 9aac014b..d62b8e4a 100644 --- a/server/main.lua +++ b/server/main.lua @@ -231,12 +231,19 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local job, grade = UnpackJob(target.job) + local apartmentData = GetPlayerApartment(target.citizenid) + + if apartmentData then + apartmentData = apartmentData[1].label .. ' (' ..apartmentData[1].name..')' + end + local person = { cid = target.citizenid, firstname = target.charinfo.firstname, lastname = target.charinfo.lastname, job = job.label, grade = grade.name, + apartment = apartmentData, pp = ProfPic(target.charinfo.gender), licences = licencesdata, dob = target.charinfo.birthdate, diff --git a/ui/app.js b/ui/app.js index 6adc6ab0..c9830d73 100644 --- a/ui/app.js +++ b/ui/app.js @@ -186,6 +186,7 @@ $(document).ready(() => { $(".manage-profile-name-input-2").val(result["lastname"]); $(".manage-profile-dob-input").val(result["dob"]); $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); + $(".manage-profile-apartment-input").val(`${result.apartment}`); $(".manage-profile-url-input").val(result["profilepic"] ?? ""); $(".manage-profile-info").val(result["mdtinfo"]); $(".manage-profile-info").removeAttr("disabled"); diff --git a/ui/dashboard.html b/ui/dashboard.html index e8164ce8..01db6d97 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -270,6 +270,9 @@
        Profession
        +
        Apartment
        +
        +
        Profile Image URL
        diff --git a/ui/style.css b/ui/style.css index 79fd1ed0..be45d2e0 100644 --- a/ui/style.css +++ b/ui/style.css @@ -6338,6 +6338,23 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { border: 0px; } +.manage-profile-apartment { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-apartment-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + /* Charges Hover */ .ccontextmenu { From 450f7894c71cbe886f095effb93f71a72a058e87 Mon Sep 17 00:00:00 2001 From: Joe Szymkowicz Date: Sat, 26 Nov 2022 14:22:11 -0600 Subject: [PATCH 007/381] fix: weapons search --- server/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 9aac014b..22fac1ef 100644 --- a/server/main.lua +++ b/server/main.lua @@ -876,7 +876,9 @@ QBCore.Functions.CreateCallback('mdt:server:SearchWeapons', function(source, cb, if Player then local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' or JobType == 'doj' then - local matches = MySQL.query.await('SELECT * FROM mdt_weaponinfo') + local matches = MySQL.query.await('SELECT * FROM mdt_weaponinfo WHERE LOWER(`serial`) LIKE :query OR LOWER(`weapModel`) LIKE :query OR LOWER(`owner`) LIKE :query LIMIT 25', { + query = string.lower('%'..sentData..'%') + }) cb(matches) end end From 37f0fa10fbaaa5294e8a1116402ac13cc6d347ad Mon Sep 17 00:00:00 2001 From: Joe Szymkowicz Date: Sat, 26 Nov 2022 14:26:34 -0600 Subject: [PATCH 008/381] remove: random console.log --- ui/app.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 6adc6ab0..9977af63 100644 --- a/ui/app.js +++ b/ui/app.js @@ -3012,7 +3012,6 @@ $(document).ready(() => { name: name, }) ); - console.log(result) if (result.length === 0) { $(".weapons-items").html( ` From c2bd0208ec76440532c6b4643d4d75b3886175ea Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 10 Dec 2022 22:13:36 -0500 Subject: [PATCH 009/381] DMCA Removal Notice - read below for more details. We are removing our Digital Millennium Copyright Act (DMCA) notices from our repositories. We have decided to take this step in order to foster a more positive and supportive environment for the open source community. Please be assured that we will continue to monitor our resources and take action against any individuals or organizations that violate the license under which our work is released. Our DMCA notices are only used in cases where our work is being used in a manner that violates the terms of the license, and we would never send a DMCA notice to someone who is using our resources properly and in accordance with the terms of the license. In addition, our use of DMCA notices has always been to protect the use of our trademarked name, Project Sloth, and has never been used to send illegitimate takedowns. Rest assured that we will continue to protect our projects with DMCA notices on the backend to ensure that they are not used in violation of the license. We appreciate your support and interest in our work, and we are always happy to answer any questions you may have about how to use our resources properly. The Project Sloth Team --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 318644b6..89bba95c 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,3 @@ For all support questions, ask in our Discord support chat. Do not create issues EchoRP MDT Released by Flawws#9999 from Echo RP rewritten and restructured for QBCore. This is no longer a fork so we are able to open issues on this repo. - -# DMCA Protection Certificate -![image](https://user-images.githubusercontent.com/82112471/183939077-c714b08b-77cc-49c6-a94a-3064856d90b9.png) - -[https://www.dmca.com/r/p3j2p4q](https://www.dmca.com/Protection/Status.aspx?ID=0ff6f6e1-2b54-4dda-bcd3-42728908f404&refurl=https://github.com/Project-Sloth/ps-mdt) From c8010cb13b2d49d11db3cee229a8ca9611893a01 Mon Sep 17 00:00:00 2001 From: Lionh34rt <76415140+Lionh34rt@users.noreply.github.com> Date: Thu, 29 Dec 2022 16:59:01 +0100 Subject: [PATCH 010/381] Installation steps in readme Title --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 89bba95c..4df267f3 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,13 @@ For all support questions, ask in our Discord support chat. Do not create issues - [PS-Dispatch](https://github.com/Project-Sloth/ps-dispatch) [If you intend to use it, make sure this starts before the mdt!] - [Ox MySQL](https://github.com/overextended/oxmysql) +# Installation +* Download ZIP +* Drag and drop resource into your server files, make sure to remove -main in the folder name +* Run the attached SQL script (mdt.sql) +* Start resource through server.cfg +* Restart your server. + ## FAQ - **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". From 0398c870fc6056007ba00ef04cbe28eafb8dc10f Mon Sep 17 00:00:00 2001 From: envious Date: Sat, 31 Dec 2022 17:47:07 +1100 Subject: [PATCH 011/381] Fix for DoJ Fixes DoJ employees (Judge & Lawyer) not being able to see convictions and owned vehicles etc on players profiles. --- server/main.lua | 6 +++--- shared/config.lua | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/main.lua b/server/main.lua index 22fac1ef..cafec74f 100644 --- a/server/main.lua +++ b/server/main.lua @@ -106,7 +106,7 @@ RegisterNetEvent('mdt:server:openMDT', function() local JobType = GetJobType(PlayerData.job.name) local bulletin = GetBulletins(JobType) - local calls = exports['ps-dispatch']:GetDispatchCalls() + local calls = exports['ps-dispatch']:GetDispatchCalls() --TriggerClientEvent('mdt:client:dashboardbulletin', src, bulletin) TriggerClientEvent('mdt:client:open', src, bulletin, activeUnits, calls, PlayerData.citizenid) --TriggerClientEvent('mdt:client:GetActiveUnits', src, activeUnits) @@ -249,7 +249,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb isLimited = false } - if Config.PoliceJobs[JobName] then + if Config.PoliceJobs[JobName] or Config.DojJobs[JobName] then local convictions = GetConvictions({person.cid}) person.convictions2 = {} local convCount = 1 @@ -905,7 +905,7 @@ RegisterNetEvent('mdt:server:saveWeaponInfo', function(serial, imageurl, notes, ['weapModel'] = weapModel, ['imageurl'] = imageurl, }) - + if result then TriggerEvent('mdt:server:AddLog', "A weapon with the serial number ("..serial..") was added to the weapon information database by "..fullname) else diff --git a/shared/config.lua b/shared/config.lua index b90aff5c..b44aca89 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -255,6 +255,7 @@ Config.AmbulanceJobs = { Config.DojJobs = { ['lawyer'] = true, + ['judge'] = true } -- Leave my hacky code alone ya goblins @@ -642,7 +643,7 @@ end -- this is a hack, because the qb-menu in qb-policejob populates an impound location and passed it through to the event. -- if this impound locations are changed in qb-policejob, they must also be changed here. -Config.ImpoundLocations = { +Config.ImpoundLocations = { [1] = vector4(436.68, -1007.42, 27.32, 180.0), [2] = vector4(-436.14, 5982.63, 31.34, 136.0), } From fd257023f36551e17ba9e6ed441f520680fe1d7f Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:58:15 +0100 Subject: [PATCH 012/381] Initial commit --- ui/app.js | 46 +++- ui/dashboard.html | 498 +++++++++++++++------------------- ui/style.css | 667 ++++++++++++++++++++++++++++++++++------------ 3 files changed, 744 insertions(+), 467 deletions(-) diff --git a/ui/app.js b/ui/app.js index b1605cf1..927828cf 100644 --- a/ui/app.js +++ b/ui/app.js @@ -669,7 +669,7 @@ $(document).ready(() => { ".manage-incidents-create", function () { let tempalte = - "📝 Summary:\n\n[Insert Report Summary Here]\n\n🧍 Hostage: [Name Here]\n\n🔪 Weapons/Items Confiscated:\n\n· [Insert List Here]\n\n-----\n💸 Fine:\n⌚ Sentence:\n-----"; + "Summary:\n\n[Insert Report Summary Here]"; $("#manage-incidents-title-input").val( "Name - Charge - " + $(".date").html() ); @@ -2985,6 +2985,38 @@ $(document).ready(() => { } }); + + $(".calls-search-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".calls-search-input").css("display") == "none") { + $(".calls-search-input").slideDown(250); + $(".calls-search-input").css("display", "block"); + } else { + $(".calls-search-input").slideUp(250); + setTimeout(() => { + $(".calls-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#calls-search-input").keydown(function (e) { + if (e.keyCode === 13 && canSearchForProfiles == true) { + let searchVal = $("#calls-search-input").val(); + if (searchVal !== "") { + canSearchForProfiles = false; + $.post( + `https://${GetParentResourceName()}/searchCalls`, + JSON.stringify({ + searchVal: searchVal, + }) + ); + $(".calls-items").empty(); + $(".calls-items").prepend(`
        `); + } + } + }); + $(".weapons-search-title").click(function () { if (canSearchForWeapons == true) { if ($(".weapons-search-input").css("display") == "none") { @@ -3384,6 +3416,12 @@ $(document).ready(() => { currentValue.html(this.value); }); + $(`.search-tab-input`).each(function(key, value) { + console.log("Hei") + $(value).val("") + + }); + $(".active-calls-list").on( "contextmenu", ".active-calls-item", @@ -3788,6 +3826,7 @@ $(document).ready(() => { $(".dmv-nav-item").show(); $(".weapons-nav-item").show() $(".cams-nav-item").show(); + $(".map-nav-item").show(); $(".dispatch-title-ofsomesort").html("Dispatch"); $(".dispatch-comms-container").fadeIn(0); $(".manage-profile-name-input-1").attr("readonly", true); @@ -5060,6 +5099,9 @@ function fidgetSpinner(page) { if (page == ".incidents-page-container") { $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); } + if (page == ".map-page-container") { + $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); + } setTimeout(() => { $(".container-load").fadeOut(0); $(page).fadeIn(0); @@ -5331,3 +5373,5 @@ window.addEventListener("load", function () { } }); }); + +// Map diff --git a/ui/dashboard.html b/ui/dashboard.html index 01db6d97..58b473d9 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -7,11 +7,18 @@ Project Sloth MDT + + + + + + + @@ -87,68 +94,44 @@
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        + + +
        - +
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        -
        -
        + + +
        +
        @@ -198,7 +181,7 @@
        -
        Calls
        +
        Recent Calls
        @@ -210,35 +193,22 @@
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        + +
        - +
        Profiles
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        +
        - +
        Incidents
        @@ -426,35 +382,21 @@
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        +
        - +
        @@ -520,35 +462,21 @@
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        +
        - +
        @@ -613,70 +541,42 @@
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        +
        - +
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        +
        - +
        Vehicles
        @@ -728,35 +628,21 @@
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        +
        - +
        Weapons
        @@ -795,68 +681,40 @@
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        +
        - +
        -
        - -
        -
        SAN ANDREAS STATE POLICE
        -
        Mobile Database Terminal
        -
        -
        -
        Loading...
        -
        00:00
        -
        -
        -
        Welcome, Loading... -
        -
        -
        +
        - +
        @@ -898,6 +756,58 @@
        +
        + +
        + +
        +
        Dispatch Calls
        +
        + +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        Dispatch Map
        +
        + +
        +
        +
        +
        + + + +
        +
        +
        +
        +
        +
        +
        + + +
        +
        +
        + + + diff --git a/ui/style.css b/ui/style.css index be45d2e0..ed528c97 100644 --- a/ui/style.css +++ b/ui/style.css @@ -34,13 +34,16 @@ input::-webkit-inner-spin-button { } .dashboard-page-container { - background-color: var(--color-9); + /* background-color: rgb(40, 40, 40); */ + background-color: rgb(40, 40, 40); + border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } @@ -49,195 +52,183 @@ input::-webkit-inner-spin-button { } .profile-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } .incidents-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } .bolos-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } .reports-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } .penalcode-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } .dmv-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } .weapons-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } .stafflogs-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; overflow: auto } .container-load { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; } .header { height: 7vh; background-color: var(--color-1); - border: 5px solid #393B39; - border-top-right-radius: 50px; - border-bottom-right-radius: 50px; - width: 96.5%; + + width: 86.5%; position: absolute; - top: 5.5vh; + display: flex; align-items: center; user-select: none; } -.header-left { - display: flex; - flex-direction: column; - text-align: left; - margin-left: 10px; - margin-right: 0px; -} - -.header-middle { - background-color: var(--color-2); - border-radius: 15px; - width: fit-content; - height: fit-content; - padding: 10px; - padding-left: 20px; - padding-right: 20px; - display: flex; - flex-direction: column; - text-align: center; - color: white; - margin: auto; - font-size: 20px; -} -.header-right { - display: flex; - flex-direction: column; - text-align: right; - margin: auto; - margin-right: 35px; - margin-left: 0px; -} .main-container { - border-top: 5px solid var(--color-3); + width: 100%; - height: 79.5%; + height: 93.5%; position: absolute; display: flex; bottom: 0; } .nav-menu { - background-color: var(--color-1); - border-right: 5px solid var(--color-3); + + min-width: 22.5vh; height: 100%; display: flex; - flex-direction: column; + flex-direction: row; + user-select: none; + margin-left: 10px; + height: 5vh; + + width: 86.5%; + position: absolute; + + display: flex; + align-items: center; user-select: none; - border-bottom-left-radius: 15px; + + } .nav-item { - background-color: var(--color-4); margin-top: 10px; padding: 10px; - color: white; + color: rgb(138, 138, 138); font-size: 18px; font-weight: bolder; + margin-left: 10px; } .nav-item:hover { - background-color: var(--color-3); + color: rgb(255, 255, 255); + /* background-color: var(--color-3); */ } .active-nav { - background-color: var(--color-3); + color: rgb(255, 255, 255); + /* background-color: var(--color-3); */ } .warrants-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -329,7 +320,7 @@ input::-webkit-inner-spin-button { .quotes-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); width: 50vh; height: 75px; margin-top: 10px; @@ -373,10 +364,41 @@ input::-webkit-inner-spin-button { .bulletin-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 100%; + height: 45.5%; + width: 50vh; + margin-top: 10px; + margin-bottom: 8px; + margin-left: 10px; + user-select: none; + overflow: hidden; +} + +.map-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 83.5%; + align-items: center; + user-select: none; +} + +.map-container { + background-color: var(--color-1); + border: 2px solid rgb(32, 32, 32); + display: flex; + flex-direction: column; + height: 45.5%; width: 50vh; margin-top: 10px; margin-bottom: 8px; @@ -385,6 +407,91 @@ input::-webkit-inner-spin-button { overflow: hidden; } +.map-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.map-add-btn:hover { + background-color: var(--color-3); +} + +.map-page-container { + /* background-color: rgb(40, 40, 40); */ + background-color: rgb(40, 40, 40); + + border-radius: 15px; + position: absolute; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; + display: none; +} +.map-item { + position: absolute; + + width: 98%; + height: 80%; + + top: 56%; + left: 50%; + + transform: translateX(-50%) translateY(-50%); + + opacity: 1; + overflow: hidden; +} + +.smallmap-item { + position: absolute; + + width: 96%; + height: 75%; + + top: 56%; + left: 50%; + + transform: translateX(-50%) translateY(-50%); + + opacity: 1; + overflow: hidden; +} + + +.dash-map-img { + position: absolute; + + top: -200%; + left: 20%; + + width: 100%; + height: 100%; + + transform: rotatez(90deg) scale(8); +} +/* .dispatch-comms-container { + background-color: var(--color-1); + border: 2px solid rgb(32, 32, 32); + display: flex; + flex-direction: column; + height: 45.5%; + width: 50vh; + margin-top: 1vh; + margin-left: 10px; +} */ + .bulletin-title { background-color: var(--color-4); color: white; @@ -485,14 +592,15 @@ span.bulletin-item-info[contenteditable]:empty::before { .dispatch-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; margin-right: 15px; + } .dispatch-title { @@ -568,6 +676,54 @@ span.bulletin-item-info[contenteditable]:empty::before { user-select: none; } +.calls-search-title { + background-color: var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 2px; + margin-left: 10px; + margin-left: 13px; + width: 95%; + align-items: center; + user-select: none; +} + +.calls-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#calls-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#calls-search-input::placeholder { + color: white; +} + #police-count { background-color: #093095; } @@ -611,6 +767,7 @@ span.bulletin-item-info[contenteditable]:empty::before { margin-bottom: 5px; } + #draggedItem { position: absolute; z-index: 80; @@ -723,8 +880,7 @@ span.bulletin-item-info[contenteditable]:empty::before { display: flex; align-items: center; margin-bottom: 5px; - border-bottom-left-radius: 1vh; - border-top-left-radius: 1vh; + border: 1px solid rgb(32, 32, 32); } .active-call-inner-container { @@ -859,10 +1015,10 @@ a { .profile-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -997,10 +1153,10 @@ a { .manage-profile-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -1224,7 +1380,7 @@ a { .manage-profile-licenses-container { background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); height: 15%; } @@ -1274,7 +1430,7 @@ a { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); margin-top: 10px; min-height: 100px; max-height: 200px; @@ -1374,7 +1530,7 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); margin-top: 10px; max-height: 150px; overflow: scroll; @@ -1427,7 +1583,7 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); margin-top: 10px; max-height: 150px; overflow: scroll; @@ -1480,7 +1636,7 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); margin-top: 10px; height: 18vh; overflow: scroll; @@ -1542,7 +1698,7 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); margin-top: 10px; max-height: 200px; overflow: scroll; @@ -1575,16 +1731,16 @@ span.tag-input[contenteditable]:empty::before { .loader { position: absolute; - left: 50%; - top: 50%; + left: 45%; + top: 45%; z-index: 1; - width: 120px; - height: 120px; - border: 12px solid var(--color-1); + width: 100px; + height: 100px; + border: 10px solid var(--color-1); border-radius: 50%; - border-top: 12px solid var(--color-3); - -webkit-animation: spin 2s linear infinite; - animation: spin 2s linear infinite; + border-top: 10px solid var(--color-3); + -webkit-animation: spin 5s linear infinite; + animation: spin 5s linear infinite; } .profile-loader { @@ -1758,18 +1914,18 @@ span.tag-input[contenteditable]:empty::before { .penalcode-embed { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 96.5%; - width: 85%; + height: 86.5%; + width: 75%; margin: auto; overflow: hidden; } .penalcode-embed iframe { - height: 96.5%; - width: 98%; + height: 86.5%; + width: 88%; margin: auto; border: none; outline: none; @@ -1777,10 +1933,10 @@ span.tag-input[contenteditable]:empty::before { .incidents-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -1919,11 +2075,10 @@ span.tag-input[contenteditable]:empty::before { .manage-incidents-container { background-color: var(--color-1); - border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; + height: 72.7vh; + max-height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -2049,7 +2204,6 @@ span.tag-input[contenteditable]:empty::before { .manage-incidents-tags-container { display: flex; flex-direction: column; - border: 2px solid var(--color-3); color: white; font-size: 18px; font-weight: bolder; @@ -2132,7 +2286,6 @@ span.tag-input[contenteditable]:empty::before { .manage-incidents-officers-container { display: flex; flex-direction: column; - border: 2px solid var(--color-3); color: white; font-size: 18px; font-weight: bolder; @@ -2215,7 +2368,6 @@ span.tag-input[contenteditable]:empty::before { .manage-incidents-civilians-container { display: flex; flex-direction: column; - border: 2px solid var(--color-3); color: white; font-size: 18px; font-weight: bolder; @@ -2298,7 +2450,7 @@ span.tag-input[contenteditable]:empty::before { .manage-incidents-evidence-container { display: flex; flex-direction: column; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); color: white; font-size: 18px; font-weight: bolder; @@ -2441,10 +2593,10 @@ span.civilians-incident-input[contenteditable]:empty::before { .associated-incidents-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -2474,7 +2626,6 @@ span.civilians-incident-input[contenteditable]:empty::before { .associated-incidents-tags-container { display: flex; flex-direction: column; - border: 2px solid var(--color-3); color: white; font-size: 18px; font-weight: bolder; @@ -2611,7 +2762,7 @@ span.civilians-incident-input[contenteditable]:empty::before { .associated-incidents-user-container { display: flex; flex-direction: column; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); color: white; font-size: 18px; font-weight: bolder; @@ -2892,10 +3043,10 @@ span.civilians-incident-input[contenteditable]:empty::before { .bolos-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -2975,11 +3126,11 @@ span.civilians-incident-input[contenteditable]:empty::before { .manage-bolos-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; + height: 72.7vh; + max-height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -3224,7 +3375,7 @@ span.civilians-incident-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); max-height: 150px; overflow: scroll; } @@ -3234,7 +3385,7 @@ span.civilians-incident-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); margin-top: 10px; height: 18vh; overflow: scroll; @@ -3280,7 +3431,7 @@ span.civilians-incident-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); max-height: 150px; margin-top: 10px; overflow: scroll; @@ -3547,10 +3698,10 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { .reports-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -3566,7 +3717,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { .dispatch-comms-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; height: 45.5%; @@ -3852,11 +4003,11 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { .manage-reports-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; + height: 72.7vh; + max-height: 72.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -4138,7 +4289,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); max-height: 150px; overflow: scroll; } @@ -4148,7 +4299,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); margin-top: 10px; height: 18vh; overflow: scroll; @@ -4194,7 +4345,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); max-height: 150px; margin-top: 10px; overflow: scroll; @@ -4288,7 +4439,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); max-height: 150px; margin-top: 10px; overflow: scroll; @@ -4468,10 +4619,10 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { .dmv-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50%; margin-top: 10px; margin-left: 10px; @@ -4559,10 +4710,10 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { .vehicle-information-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50%; margin-top: 10px; margin-left: 10px; @@ -4804,7 +4955,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { .vehicle-info-tags-container { display: flex; flex-direction: column; - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); color: white; font-size: 18px; font-weight: bolder; @@ -4927,10 +5078,10 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { .stafflogs-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 100%; margin-top: 10px; margin-left: 10px; @@ -5696,6 +5847,7 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { flex-direction: column; z-index: 9998; overflow: auto; + } .respond-calls-title { @@ -5878,23 +6030,24 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { } .cams-page-container { - background-color: var(--color-9); + background-color: rgb(40, 40, 40); border-radius: 15px; position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; + width: 80.5%; + height: 80.5%; + border: 10px solid rgb(22, 22, 22); + left: 10.0%; + top: 10.0%; display: none; overflow: auto } .cams-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 100%; margin-top: 10px; margin-left: 10px; @@ -5939,10 +6092,10 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { .weapons-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50%; margin-top: 10px; margin-left: 10px; @@ -6010,10 +6163,10 @@ span.civilian-tag-reports-input[contenteditable]:empty::before { .weapon-information-container { background-color: var(--color-1); - border: 2px solid var(--color-3); + border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 74.7vh; + height: 72.7vh; width: 50%; margin-top: 10px; margin-left: 10px; @@ -6437,4 +6590,164 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { transform: translate(0, 0) scale(1); pointer-events: auto; z-index: 9999; +} + + + + +.calls-container { + background-color: var(--color-1); + border: 2px solid rgb(32, 32, 32); + display: flex; + flex-direction: column; + height: 72.7vh; + width: 30%; + margin-top: 10px; + margin-left: 10px; +} + +.calls-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.calls-search-title:hover { + background-color: var(--color-3); +} + +.map-container { + background-color: var(--color-1); + border: 2px solid rgb(32, 32, 32); + display: flex; + flex-direction: column; + height: 72.7vh; + width: 70%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.map-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.map-new:hover { + background-color: #aa1c1c; +} + +.map-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.map-save:hover { + background-color: #1caa28; +} + + +.map-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 98%; + align-items: center; + user-select: none; +} + +.map-item { + border: 2px solid rgb(32, 32, 32); + position: absolute; + + width: 98%; + height: 90%; + + top: 48%; + left: 50%; + + transform: translateX(-50%) translateY(-50%); + + opacity: 1; + overflow: hidden; +} + +.smallmap-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.smallmap-container { + background-color: var(--color-1); + border: 2px solid rgb(32, 32, 32); + display: flex; + flex-direction: column; + height: 37.6vh; + width: 50vh; + margin-top: 3px; + margin-left: 10px; +} + +.leaflet-marker-pane { + z-index: 600; +} + +.leaflet-tooltip-pane { + z-index: 650; +} + +.leaflet-tooltip-right { + margin-left: 6px; } \ No newline at end of file From 03a8688c430cf081d6ab50a2b77803c1e037eac5 Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Fri, 3 Feb 2023 20:03:44 +0100 Subject: [PATCH 013/381] Update app.js --- ui/app.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ui/app.js b/ui/app.js index 927828cf..56d8a28e 100644 --- a/ui/app.js +++ b/ui/app.js @@ -3416,11 +3416,6 @@ $(document).ready(() => { currentValue.html(this.value); }); - $(`.search-tab-input`).each(function(key, value) { - console.log("Hei") - $(value).val("") - - }); $(".active-calls-list").on( "contextmenu", @@ -5099,9 +5094,6 @@ function fidgetSpinner(page) { if (page == ".incidents-page-container") { $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); } - if (page == ".map-page-container") { - $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); - } setTimeout(() => { $(".container-load").fadeOut(0); $(page).fadeIn(0); @@ -5373,5 +5365,3 @@ window.addEventListener("load", function () { } }); }); - -// Map From 0fb404e75b377b5efb2d4f5b8cae5c70655b4087 Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Fri, 3 Feb 2023 23:46:24 +0100 Subject: [PATCH 014/381] Update dashboard.html --- ui/dashboard.html | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/ui/dashboard.html b/ui/dashboard.html index 58b473d9..7e1ecd5f 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -798,13 +798,10 @@
        -
        -
        -
        +
        -
        @@ -822,12 +819,23 @@
        From 644ae299981265b2f9cf0c00299847af6df7dfb6 Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Sun, 5 Feb 2023 15:55:00 +0100 Subject: [PATCH 015/381] Stuff Started working on searching dispatch, dispatch showing on map, and map changes --- client/main.lua | 16 ++++++++++ server/main.lua | 11 +++++++ ui/app.js | 11 +++---- ui/dashboard.html | 79 +++++++++++++++++++++++++++++++++++------------ ui/style.css | 24 +++++++------- 5 files changed, 103 insertions(+), 38 deletions(-) diff --git a/client/main.lua b/client/main.lua index ad6e708f..00c38232 100644 --- a/client/main.lua +++ b/client/main.lua @@ -404,6 +404,22 @@ RegisterNUICallback('SetHouseLocation', function(data, cb) QBCore.Functions.Notify('GPS has been set!', 'success') end) +--==================================================================================== +------------------------------------------ +-- Dispatch Calls Page -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("searchCalls", function(data, cb) + local searchCall = data.searchCall + TriggerServerEvent('mdt:server:searchCalls', searchCall) + cb(true) +end) + +RegisterNetEvent('mdt:client:getCalls', function(calls, callid) + SendNUIMessage({ type = "calls", data = calls }) +end) + --==================================================================================== ------------------------------------------ -- BOLO PAGE -- diff --git a/server/main.lua b/server/main.lua index 50930b24..a9b586dc 100644 --- a/server/main.lua +++ b/server/main.lua @@ -874,6 +874,17 @@ RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, n end end) +RegisterNetEvent('mdt:server:searchCalls', function(calls) + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' then + local calls = exports['ps-dispatch']:GetDispatchCalls() + TriggerClientEvent('mdt:client:getCalls', src, calls) + + end +end) + QBCore.Functions.CreateCallback('mdt:server:SearchWeapons', function(source, cb, sentData) if not sentData then return cb({}) end local PlayerData = GetPlayerData(source) diff --git a/ui/app.js b/ui/app.js index 56d8a28e..a586fb80 100644 --- a/ui/app.js +++ b/ui/app.js @@ -3001,14 +3001,13 @@ $(document).ready(() => { }); $("#calls-search-input").keydown(function (e) { - if (e.keyCode === 13 && canSearchForProfiles == true) { - let searchVal = $("#calls-search-input").val(); - if (searchVal !== "") { - canSearchForProfiles = false; + if (e.keyCode === 13) { + let searchCall = $("#calls-search-input").val(); + if (searchCall !== "") { $.post( `https://${GetParentResourceName()}/searchCalls`, JSON.stringify({ - searchVal: searchVal, + searchCall: searchCall, }) ); $(".calls-items").empty(); @@ -5364,4 +5363,4 @@ window.addEventListener("load", function () { }); } }); -}); +}); \ No newline at end of file diff --git a/ui/dashboard.html b/ui/dashboard.html index 7e1ecd5f..35f065ec 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -790,17 +790,7 @@
        Dispatch Map
        -
        -
        -
        -
        - + - -
        -
        - -
        -
        +
        @@ -819,21 +809,70 @@
        diff --git a/ui/style.css b/ui/style.css index ed528c97..d0358be5 100644 --- a/ui/style.css +++ b/ui/style.css @@ -232,6 +232,7 @@ input::-webkit-inner-spin-button { width: 50vh; margin-top: 10px; margin-left: 10px; + margin-bottom: 10px; } .warrants-title { @@ -367,10 +368,10 @@ input::-webkit-inner-spin-button { border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 45.5%; + height: 95.5%; width: 50vh; margin-top: 10px; - margin-bottom: 8px; + margin-bottom: 10px; margin-left: 10px; user-select: none; overflow: hidden; @@ -595,12 +596,12 @@ span.bulletin-item-info[contenteditable]:empty::before { border: 2px solid rgb(32, 32, 32); display: flex; flex-direction: column; - height: 72.7vh; + height: 73.0vh; width: 50vh; margin-top: 10px; margin-left: 10px; - margin-right: 15px; - + margin-right: 10px; + margin-bottom: 10px; } .dispatch-title { @@ -6701,16 +6702,15 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { border: 2px solid rgb(32, 32, 32); position: absolute; - width: 98%; - height: 90%; + width: 66%; + height: 88%; - top: 48%; - left: 50%; + left: 65%; + top: 52.5%; + + margin-bottom: 15px; - transform: translateX(-50%) translateY(-50%); - opacity: 1; - overflow: hidden; } .smallmap-title { From 5ad1d6166458406a85888c8b62e4fe1ea8397eae Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Sun, 5 Feb 2023 23:17:03 +0100 Subject: [PATCH 016/381] Map works Dispatch Map works --- ui/app.js | 2 ++ ui/dashboard.html | 89 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 72 insertions(+), 19 deletions(-) diff --git a/ui/app.js b/ui/app.js index a586fb80..7ed789f4 100644 --- a/ui/app.js +++ b/ui/app.js @@ -4286,7 +4286,9 @@ $(document).ready(() => { $(".dispatch-items")[0].scrollHeight ); } else if (eventData.type == "call") { + ClearMap(); const value = eventData.data; + DispatchMAP(value); if (value && value.job.includes(playerJob)) { const prio = value["priority"]; let DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; diff --git a/ui/dashboard.html b/ui/dashboard.html index 35f065ec..9a23eac5 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -831,14 +831,14 @@ var map = L.map("map-item", { crs: customcrs, - minZoom: 4, - maxZoom: 6, + minZoom: 3, + maxZoom: 5, zoom: 5, noWrap: true, continuousWorld: false, preferCanvas: true, - + center: [0, -1024], maxBoundsViscosity: 1.0 }); @@ -847,31 +847,82 @@ var sw = map.unproject([0, 1024], 3 - 1); var ne = map.unproject([1024, 0], 3 - 1); - var MAP_BOUNDS = new L.LatLngBounds(sw, ne); - map.setMaxBounds(MAP_BOUNDS); - map.fitBounds(MAP_BOUNDS); + var mapbounds = new L.LatLngBounds(sw, ne); + map.setView([-300, -1500], 4); + map.setMaxBounds(mapbounds); + map.attributionControl.setPrefix(false) - L.imageOverlay(customImageUrl, MAP_BOUNDS).addTo(map); + L.imageOverlay(customImageUrl, mapbounds).addTo(map); map.on('dragend', function() { - if (!MAP_BOUNDS.contains(map.getCenter())) { - map.panTo(MAP_BOUNDS.getCenter(), { animate: false }); + if (!mapbounds.contains(map.getCenter())) { + map.panTo(mapbounds.getCenter(), { animate: false }); } }); - var marker = L.marker([0, -1024], { - icon: L.divIcon({ - className: 'my-div-icon', + // var marker = L.marker([0, -1024], { + // icon: L.divIcon({ + // className: 'my-div-icon', + // html: '', + // }) + // }).addTo(map); + + // marker.bindTooltip("Discharge of a firearm", {permanent: false, direction: 'top', interactive: true, offset: [0, -10]}); + + var Dispatches = {}; + + function DispatchMAP(DISPATCH){ + var MIN = Math.round(Math.round((new Date() - new Date(DISPATCH.time)) / 1000) / 60); + // var MIN = 2; + if (MIN > 10) + return; + + $.each(map, function(key, value) { + + + var COORDS_X = DISPATCH.origin.x + var COORDS_Y = DISPATCH.origin.y + var CODE = DISPATCH.callId + + + Dispatches[CODE] = L.marker([COORDS_Y,COORDS_X], { icon: DispatchPing }) + + Dispatches[CODE].bindTooltip(`
        ${DISPATCH.dispatchMessage}
        #${DISPATCH.callId}
        `, + { + direction: 'top', + permanent: false, + offset: [0, -10], + opacity: 1, + interactive: true, + className: 'map-tooltip' + }); + + Dispatches[CODE].addTo(map); + + Dispatches[CODE].on('click', function() { + const callId = CODE + $.post( + `https://${GetParentResourceName()}/setWaypoint`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + }) + } + + function ClearMap() { + $(".leaflet-popup-pane").empty(); + $(".leaflet-marker-pane").empty(); + } + var DispatchPing = L.divIcon({ html: '', - }) - }).addTo(map); - - marker.bindTooltip("Discharge of a firearm", {permanent: false, direction: 'top', interactive: true, offset: [0, -10]}); - - marker.on('click', function() { - console.log("Set Waypoint") + iconSize: [20, 20], + className: 'map-icon map-icon-ping', + offset: [-10, 0] }); From a5a831b22ad2efac9d7cec8413cce4a833aeb70e Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Mon, 6 Feb 2023 16:39:08 +0100 Subject: [PATCH 017/381] Add files via upload --- LICENSE | 1348 ++-- README.md | 60 +- client/cl_impound.lua | 148 +- client/main.lua | 1944 +++--- fxmanifest.lua | 72 +- server/dbm.lua | 378 +- server/utils.lua | 102 +- shared/config.lua | 1298 ++-- ui/app.js | 10734 ++++++++++++++++---------------- ui/dashboard.html | 2041 +++--- ui/style.css | 13358 ++++++++++++++++++++-------------------- 11 files changed, 15756 insertions(+), 15727 deletions(-) diff --git a/LICENSE b/LICENSE index f288702d..3877ae0a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,674 +1,674 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index 4df267f3..ddac55c5 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,30 @@ -# Project Sloth MDT - -For all support questions, ask in our Discord support chat. Do not create issues if you need help. Issues are for bug reporting and new features only. - - https://www.discord.gg/projectsloth - -## Dependencies - -- [QBCore](https://github.com/qbcore-framework/qb-core) -- [PS-Dispatch](https://github.com/Project-Sloth/ps-dispatch) [If you intend to use it, make sure this starts before the mdt!] -- [Ox MySQL](https://github.com/overextended/oxmysql) - -# Installation -* Download ZIP -* Drag and drop resource into your server files, make sure to remove -main in the folder name -* Run the attached SQL script (mdt.sql) -* Start resource through server.cfg -* Restart your server. - -## FAQ -- **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". - -![](https://i.imgur.com/WVEDLnJ.png) - -- **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. - -## EchoRP MDT QBCore Edit (WIP) - -EchoRP MDT Released by Flawws#9999 from Echo RP rewritten and restructured for QBCore. -This is no longer a fork so we are able to open issues on this repo. +# Project Sloth MDT + +For all support questions, ask in our Discord support chat. Do not create issues if you need help. Issues are for bug reporting and new features only. + + https://www.discord.gg/projectsloth + +## Dependencies + +- [QBCore](https://github.com/qbcore-framework/qb-core) +- [PS-Dispatch](https://github.com/Project-Sloth/ps-dispatch) [If you intend to use it, make sure this starts before the mdt!] +- [Ox MySQL](https://github.com/overextended/oxmysql) + +# Installation +* Download ZIP +* Drag and drop resource into your server files, make sure to remove -main in the folder name +* Run the attached SQL script (mdt.sql) +* Start resource through server.cfg +* Restart your server. + +## FAQ +- **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". + +![](https://i.imgur.com/WVEDLnJ.png) + +- **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. + +## EchoRP MDT QBCore Edit (WIP) + +EchoRP MDT Released by Flawws#9999 from Echo RP rewritten and restructured for QBCore. +This is no longer a fork so we are able to open issues on this repo. diff --git a/client/cl_impound.lua b/client/cl_impound.lua index 09fae552..6a9af104 100644 --- a/client/cl_impound.lua +++ b/client/cl_impound.lua @@ -1,75 +1,75 @@ -local currentGarage = 1 - -local function doCarDamage(currentVehicle, veh) - local smash = false - local damageOutside = false - local damageOutside2 = false - local engine = veh.engine + 0.0 - local body = veh.body + 0.0 - - if engine < 200.0 then engine = 200.0 end - if engine > 1000.0 then engine = 950.0 end - if body < 150.0 then body = 150.0 end - if body < 950.0 then smash = true end - if body < 920.0 then damageOutside = true end - if body < 920.0 then damageOutside2 = true end - - Citizen.Wait(100) - SetVehicleEngineHealth(currentVehicle, engine) - - if smash then - SmashVehicleWindow(currentVehicle, 0) - SmashVehicleWindow(currentVehicle, 1) - SmashVehicleWindow(currentVehicle, 2) - SmashVehicleWindow(currentVehicle, 3) - SmashVehicleWindow(currentVehicle, 4) - end - - if damageOutside then - SetVehicleDoorBroken(currentVehicle, 1, true) - SetVehicleDoorBroken(currentVehicle, 6, true) - SetVehicleDoorBroken(currentVehicle, 4, true) - end - - if damageOutside2 then - SetVehicleTyreBurst(currentVehicle, 1, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 2, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 3, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 4, false, 990.0) - end - - if body < 1000 then - SetVehicleBodyHealth(currentVehicle, 985.1) - end -end - -local function TakeOutImpound(vehicle) - local coords = Config.ImpoundLocations[currentGarage] - if coords then - QBCore.Functions.SpawnVehicle(vehicle.vehicle, function(veh) - QBCore.Functions.TriggerCallback('qb-garage:server:GetVehicleProperties', function(properties) - QBCore.Functions.SetVehicleProperties(veh, properties) - SetVehicleNumberPlateText(veh, vehicle.plate) - SetEntityHeading(veh, coords.w) - exports[Config.Fuel]:SetFuel(veh, vehicle.fuel) - doCarDamage(veh, vehicle) - TriggerServerEvent('police:server:TakeOutImpound',vehicle.plate) - TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(veh)) - SetVehicleEngineOn(veh, true, true) - end, vehicle.plate) - end, coords, true) - end -end - -RegisterNetEvent('ps-mdt:client:TakeOutImpound', function(data) - local pos = GetEntityCoords(PlayerPedId()) - currentGarage = data.currentSelection - local takeDist = Config.ImpoundLocations[data.currentSelection] - takeDist = vector3(takeDist.x, takeDist.y, takeDist.z) - if #(pos - takeDist) <= 15.0 then - local vehicle = data.vehicle - TakeOutImpound(data) - else - QBCore.Functions.Notify("You are too far away from the impound location!") - end +local currentGarage = 1 + +local function doCarDamage(currentVehicle, veh) + local smash = false + local damageOutside = false + local damageOutside2 = false + local engine = veh.engine + 0.0 + local body = veh.body + 0.0 + + if engine < 200.0 then engine = 200.0 end + if engine > 1000.0 then engine = 950.0 end + if body < 150.0 then body = 150.0 end + if body < 950.0 then smash = true end + if body < 920.0 then damageOutside = true end + if body < 920.0 then damageOutside2 = true end + + Citizen.Wait(100) + SetVehicleEngineHealth(currentVehicle, engine) + + if smash then + SmashVehicleWindow(currentVehicle, 0) + SmashVehicleWindow(currentVehicle, 1) + SmashVehicleWindow(currentVehicle, 2) + SmashVehicleWindow(currentVehicle, 3) + SmashVehicleWindow(currentVehicle, 4) + end + + if damageOutside then + SetVehicleDoorBroken(currentVehicle, 1, true) + SetVehicleDoorBroken(currentVehicle, 6, true) + SetVehicleDoorBroken(currentVehicle, 4, true) + end + + if damageOutside2 then + SetVehicleTyreBurst(currentVehicle, 1, false, 990.0) + SetVehicleTyreBurst(currentVehicle, 2, false, 990.0) + SetVehicleTyreBurst(currentVehicle, 3, false, 990.0) + SetVehicleTyreBurst(currentVehicle, 4, false, 990.0) + end + + if body < 1000 then + SetVehicleBodyHealth(currentVehicle, 985.1) + end +end + +local function TakeOutImpound(vehicle) + local coords = Config.ImpoundLocations[currentGarage] + if coords then + QBCore.Functions.SpawnVehicle(vehicle.vehicle, function(veh) + QBCore.Functions.TriggerCallback('qb-garage:server:GetVehicleProperties', function(properties) + QBCore.Functions.SetVehicleProperties(veh, properties) + SetVehicleNumberPlateText(veh, vehicle.plate) + SetEntityHeading(veh, coords.w) + exports[Config.Fuel]:SetFuel(veh, vehicle.fuel) + doCarDamage(veh, vehicle) + TriggerServerEvent('police:server:TakeOutImpound',vehicle.plate) + TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(veh)) + SetVehicleEngineOn(veh, true, true) + end, vehicle.plate) + end, coords, true) + end +end + +RegisterNetEvent('ps-mdt:client:TakeOutImpound', function(data) + local pos = GetEntityCoords(PlayerPedId()) + currentGarage = data.currentSelection + local takeDist = Config.ImpoundLocations[data.currentSelection] + takeDist = vector3(takeDist.x, takeDist.y, takeDist.z) + if #(pos - takeDist) <= 15.0 then + local vehicle = data.vehicle + TakeOutImpound(data) + else + QBCore.Functions.Notify("You are too far away from the impound location!") + end end) \ No newline at end of file diff --git a/client/main.lua b/client/main.lua index 00c38232..a9714e18 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,972 +1,972 @@ -QBCore = exports['qb-core']:GetCoreObject() -local PlayerData = {} -local CurrentCops = 0 -local isOpen = false -local callSign = "" -local tabletObj = nil -local tabletDict = "amb@code_human_in_bus_passenger_idles@female@tablet@base" -local tabletAnim = "base" -local tabletProp = `prop_cs_tablet` -local tabletBone = 60309 -local tabletOffset = vector3(0.03, 0.002, -0.0) -local tabletRot = vector3(10.0, 160.0, 0.0) - -CreateThread(function() - if GetResourceState('ps-dispatch') == 'started' then - TriggerServerEvent("ps-mdt:dispatchStatus", true) - end -end) - - --- Events from qbcore -RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - PlayerData = QBCore.Functions.GetPlayerData() - callSign = PlayerData.metadata.callsign -end) - -RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() - TriggerServerEvent("ps-mdt:server:OnPlayerUnload") - PlayerData = {} -end) - -RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo) - PlayerData.job = JobInfo -end) - -RegisterNetEvent('QBCore:Client:OnGangUpdate', function(GangInfo) - PlayerData.gang = GangInfo -end) - -RegisterNetEvent("QBCore:Client:SetDuty", function(job, state) - if AllowedJob(job) then - TriggerServerEvent("ps-mdt:server:ToggleDuty") - end -end) - -RegisterNetEvent('police:SetCopCount', function(amount) - CurrentCops = amount -end) - -RegisterNetEvent('QBCore:Player:SetPlayerData', function(val) - PlayerData = val -end) - -AddEventHandler('onResourceStart', function(resourceName) - if GetCurrentResourceName() ~= resourceName then return end - Wait(150) - PlayerData = QBCore.Functions.GetPlayerData() - callSign = PlayerData.metadata.callsign -end) - -AddEventHandler('onResourceStop', function(resourceName) - if (GetCurrentResourceName() ~= resourceName) then return end - ClearPedSecondaryTask(PlayerPedId()) - SetEntityAsMissionEntity(tabletObj) - DetachEntity(tabletObj, true, false) - DeleteObject(tabletObj) -end) - ---==================================================================================== ------------------------------------------- --- Functions -- ------------------------------------------- ---====================================================================================\ - -RegisterKeyMapping('mdt', 'Open Police MDT', 'keyboard', 'k') - -RegisterCommand('mdt', function() - local plyPed = PlayerPedId() - PlayerData = QBCore.Functions.GetPlayerData() - if not PlayerData.metadata["isdead"] and not PlayerData.metadata["inlaststand"] and not PlayerData.metadata["ishandcuffed"] and not IsPauseMenuActive() then - if GetJobType(PlayerData.job.name) ~= nil then - TriggerServerEvent('mdt:server:openMDT') - end - else - QBCore.Functions.Notify("Can't do that!", "error") - end -end, false) - -Citizen.CreateThread(function() - TriggerEvent('chat:addSuggestion', '/mdt', 'Open the emergency services MDT', {}) -end) - -local function doAnimation() - if not isOpen then return end - -- Animation - RequestAnimDict(tabletDict) - while not HasAnimDictLoaded(tabletDict) do Citizen.Wait(100) end - -- Model - RequestModel(tabletProp) - while not HasModelLoaded(tabletProp) do Citizen.Wait(100) end - - local plyPed = PlayerPedId() - tabletObj = CreateObject(tabletProp, 0.0, 0.0, 0.0, true, true, false) - local tabletBoneIndex = GetPedBoneIndex(plyPed, tabletBone) - - AttachEntityToEntity(tabletObj, plyPed, tabletBoneIndex, tabletOffset.x, tabletOffset.y, tabletOffset.z, tabletRot.x, tabletRot.y, tabletRot.z, true, false, false, false, 2, true) - SetModelAsNoLongerNeeded(tabletProp) - - CreateThread(function() - while isOpen do - Wait(0) - if not IsEntityPlayingAnim(plyPed, tabletDict, tabletAnim, 3) then - TaskPlayAnim(plyPed, tabletDict, tabletAnim, 3.0, 3.0, -1, 49, 0, 0, 0, 0) - end - end - - - ClearPedSecondaryTask(plyPed) - Citizen.Wait(250) - DetachEntity(tabletObj, true, false) - DeleteEntity(tabletObj) - end) -end - - -local function CurrentDuty(duty) - if duty == 1 then - return "10-41" - end - return "10-42" -end - -local function EnableGUI(enable) - SetNuiFocus(enable, enable) - SendNUIMessage({ type = "show", enable = enable, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name] }) - isOpen = enable - doAnimation() -end - -local function RefreshGUI() - SetNuiFocus(false, false) - SendNUIMessage({ type = "show", enable = false, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name] }) - isOpen = false -end - ---// Non local function so above EHs can utilise -function AllowedJob(job) - for key, _ in pairs(Config.AllowedJobs) do - if key == job then - return true - end - end - --// Return false if current job is not in allowed list - return false -end - - ---==================================================================================== ------------------------------------------- --- MAIN PAGE -- ------------------------------------------- ---==================================================================================== - - -RegisterCommand("restartmdt", function(source, args, rawCommand) - RefreshGUI() -end, false) - -RegisterNUICallback("deleteBulletin", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:deleteBulletin', id, data.title) - cb(true) -end) - -RegisterNUICallback("newBulletin", function(data, cb) - local title = data.title - local info = data.info - local time = data.time - TriggerServerEvent('mdt:server:NewBulletin', title, info, time) - cb(true) -end) - -RegisterNUICallback('escape', function(data, cb) - EnableGUI(false) - cb(true) -end) - -RegisterNetEvent('mdt:client:dashboardbulletin', function(sentData) - SendNUIMessage({ type = "bulletin", data = sentData }) -end) - -RegisterNetEvent('mdt:client:dashboardWarrants', function() - QBCore.Functions.TriggerCallback("mdt:server:getWarrants", function(data) - if data then - SendNUIMessage({ type = "warrants", data = data }) - end - end) - -- SendNUIMessage({ type = "warrants",}) -end) - -RegisterNUICallback("getAllDashboardData", function(data, cb) - TriggerEvent("mdt:client:dashboardWarrants") - cb(true) -end) - - -RegisterNetEvent('mdt:client:dashboardReports', function(sentData) - SendNUIMessage({ type = "reports", data = sentData }) -end) - -RegisterNetEvent('mdt:client:dashboardCalls', function(sentData) - SendNUIMessage({ type = "calls", data = sentData }) -end) - -RegisterNetEvent('mdt:client:newBulletin', function(ignoreId, sentData, job) - if ignoreId == GetPlayerServerId(PlayerId()) then return end; - if AllowedJob(PlayerData.job.name) then - SendNUIMessage({ type = "newBulletin", data = sentData }) - end -end) - -RegisterNetEvent('mdt:client:deleteBulletin', function(ignoreId, sentData, job) - if ignoreId == GetPlayerServerId(PlayerId()) then return end; - if AllowedJob(PlayerData.job.name) then - SendNUIMessage({ type = "deleteBulletin", data = sentData }) - end -end) - -RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, calls, cid) - EnableGUI(true) - local x, y, z = table.unpack(GetEntityCoords(PlayerPedId())) - - local currentStreetHash, intersectStreetHash = GetStreetNameAtCoord(x, y, z) - local currentStreetName = GetStreetNameFromHashKey(currentStreetHash) - local intersectStreetName = GetStreetNameFromHashKey(intersectStreetHash) - local zone = tostring(GetNameOfZone(x, y, z)) - local area = GetLabelText(zone) - local playerStreetsLocation = area - - if not zone then zone = "UNKNOWN" end; - - if intersectStreetName ~= nil and intersectStreetName ~= "" then playerStreetsLocation = currentStreetName .. ", " .. intersectStreetName .. ", " .. area - elseif currentStreetName ~= nil and currentStreetName ~= "" then playerStreetsLocation = currentStreetName .. ", " .. area - else playerStreetsLocation = area end - - -- local grade = PlayerData.job.grade.name - - SendNUIMessage({ type = "data", activeUnits = activeUnits, citizenid = cid, ondutyonly = Config.OnlyShowOnDuty, name = "Welcome, " ..PlayerData.job.grade.name..' '..PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2), location = playerStreetsLocation, fullname = PlayerData.charinfo.firstname..' '..PlayerData.charinfo.lastname, bulletin = bulletin }) - SendNUIMessage({ type = "calls", data = calls }) - TriggerEvent("mdt:client:dashboardWarrants") -end) - -RegisterNetEvent('mdt:client:exitMDT', function() - EnableGUI(false) -end) - ---==================================================================================== ------------------------------------------- --- PROFILE PAGE -- ------------------------------------------- ---==================================================================================== - -RegisterNUICallback("searchProfiles", function(data, cb) - local p = promise.new() - - QBCore.Functions.TriggerCallback('mdt:server:SearchProfile', function(result) - p:resolve(result) - end, data.name) - - local data = Citizen.Await(p) - - cb(data) -end) - - -RegisterNetEvent('mdt:client:searchProfile', function(sentData, isLimited) - SendNUIMessage({ type = "profiles", data = sentData, isLimited = isLimited }) -end) - -RegisterNUICallback("saveProfile", function(data, cb) - local profilepic = data.pfp - local information = data.description - local cid = data.id - local fName = data.fName - local sName = data.sName - local tags = data.tags - local gallery = data.gallery - local fingerprint = data.fingerprint - local licenses = data.licenses - - TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, fingerprint, licenses) - cb(true) -end) - -RegisterNUICallback("getProfileData", function(data, cb) - local id = data.id - local p = nil - local getProfileDataPromise = function(data) - if p then return end - p = promise.new() - QBCore.Functions.TriggerCallback('mdt:server:GetProfileData', function(result) - p:resolve(result) - end, data) - return Citizen.Await(p) - end - local pP = nil - local result = getProfileDataPromise(id) - - --[[ local getProfileProperties = function(data) - if pP then return end - pP = promise.new() - QBCore.Functions.TriggerCallback('qb-phone:server:MeosGetPlayerHouses', function(result) - pP:resolve(result) - end, data) - return Citizen.Await(pP) - end - local propertiesResult = getProfileProperties(id) - result.properties = propertiesResult - ]] - local vehicles=result.vehicles - for i=1,#vehicles do - local vehicle=result.vehicles[i] - local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] - result.vehicles[i]['model'] = vehData["name"] - end - p = nil - return cb(result) -end) - -RegisterNUICallback("newTag", function(data, cb) - if data.id ~= "" and data.tag ~= "" then - TriggerServerEvent('mdt:server:newTag', data.id, data.tag) - end - cb(true) -end) - -RegisterNUICallback("removeProfileTag", function(data, cb) - local cid = data.cid - local tagtext = data.text - TriggerServerEvent('mdt:server:removeProfileTag', cid, tagtext) - cb(true) -end) - -RegisterNUICallback("updateLicence", function(data, cb) - local type = data.type - local status = data.status - local cid = data.cid - TriggerServerEvent('mdt:server:updateLicense', cid, type, status) - cb(true) -end) - -RegisterNUICallback("searchIncidents", function(data, cb) - local incident = data.incident - TriggerServerEvent('mdt:server:searchIncidents', incident) - cb(true) -end) - -RegisterNUICallback("getIncidentData", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:getIncidentData', id) - cb(true) -end) - -RegisterNUICallback("incidentSearchPerson", function(data, cb) - local name = data.name - TriggerServerEvent('mdt:server:incidentSearchPerson', name ) - cb(true) -end) - -RegisterNetEvent('mdt:client:getProfileData', function(sentData, isLimited) - if not isLimited then - local vehicles = sentData['vehicles'] - for i=1, #vehicles do - sentData['vehicles'][i]['plate'] = string.upper(sentData['vehicles'][i]['plate']) - local tempModel = vehicles[i]['model'] - if tempModel and tempModel ~= "Unknown" then - local vehData = QBCore.Shared.Vehicles[tempModel] - sentData['vehicles'][i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] - end - end - end - SendNUIMessage({ type = "profileData", data = sentData, isLimited = isLimited }) -end) - -RegisterNetEvent('mdt:client:getIncidents', function(sentData) - SendNUIMessage({ type = "incidents", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getIncidentData', function(sentData, sentConvictions) - SendNUIMessage({ type = "incidentData", data = sentData, convictions = sentConvictions }) -end) - -RegisterNetEvent('mdt:client:incidentSearchPerson', function(sentData) - SendNUIMessage({ type = "incidentSearchPerson", data = sentData }) -end) - - -RegisterNUICallback('SetHouseLocation', function(data, cb) - local coords = {} - for word in data.coord[1]:gmatch('[^,%s]+') do - coords[#coords+1] = tonumber(word) - end - SetNewWaypoint(coords[1], coords[2]) - QBCore.Functions.Notify('GPS has been set!', 'success') -end) - ---==================================================================================== ------------------------------------------- --- Dispatch Calls Page -- ------------------------------------------- ---==================================================================================== - -RegisterNUICallback("searchCalls", function(data, cb) - local searchCall = data.searchCall - TriggerServerEvent('mdt:server:searchCalls', searchCall) - cb(true) -end) - -RegisterNetEvent('mdt:client:getCalls', function(calls, callid) - SendNUIMessage({ type = "calls", data = calls }) -end) - ---==================================================================================== ------------------------------------------- --- BOLO PAGE -- ------------------------------------------- ---==================================================================================== - -RegisterNUICallback("searchBolos", function(data, cb) - local searchVal = data.searchVal - TriggerServerEvent('mdt:server:searchBolos', searchVal) - cb(true) -end) - -RegisterNUICallback("getAllBolos", function(data, cb) - TriggerServerEvent('mdt:server:getAllBolos') - cb(true) -end) - -RegisterNUICallback("getAllIncidents", function(data, cb) - TriggerServerEvent('mdt:server:getAllIncidents') - cb(true) -end) - -RegisterNUICallback("getBoloData", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:getBoloData', id) - cb(true) -end) - -RegisterNUICallback("newBolo", function(data, cb) - local existing = data.existing - local id = data.id - local title = data.title - local plate = data.plate - local owner = data.owner - local individual = data.individual - local detail = data.detail - local tags = data.tags - local gallery = data.gallery - local officers = data.officers - local time = data.time - TriggerServerEvent('mdt:server:newBolo', existing, id, title, plate, owner, individual, detail, tags, gallery, officers, time) - cb(true) -end) - -RegisterNUICallback("deleteBolo", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:deleteBolo', id) - cb(true) -end) - -RegisterNUICallback("deleteICU", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:deleteICU', id) - cb(true) -end) - -RegisterNetEvent('mdt:client:getBolos', function(sentData) - SendNUIMessage({ type = "bolos", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getAllIncidents', function(sentData) - SendNUIMessage({ type = "incidents", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getAllBolos', function(sentData) - SendNUIMessage({ type = "bolos", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getBoloData', function(sentData) - SendNUIMessage({ type = "boloData", data = sentData }) -end) - -RegisterNetEvent('mdt:client:boloComplete', function(sentData) - SendNUIMessage({ type = "boloComplete", data = sentData }) -end) - ---==================================================================================== ------------------------------------------- --- REPORTS PAGE -- ------------------------------------------- ---==================================================================================== - -RegisterNUICallback("getAllReports", function(data, cb) - TriggerServerEvent('mdt:server:getAllReports') - cb(true) -end) - -RegisterNUICallback("getReportData", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:getReportData', id) - cb(true) -end) - -RegisterNUICallback("searchReports", function(data, cb) - local name = data.name - TriggerServerEvent('mdt:server:searchReports', name) - cb(true) -end) - -RegisterNUICallback("newReport", function(data, cb) - local existing = data.existing - local id = data.id - local title = data.title - local reporttype = data.type - local details = data.details - local tags = data.tags - local gallery = data.gallery - local officers = data.officers - local civilians = data.civilians - local time = data.time - - TriggerServerEvent('mdt:server:newReport', existing, id, title, reporttype, details, tags, gallery, officers, civilians, time) - cb(true) -end) - -RegisterNetEvent('mdt:client:getAllReports', function(sentData) - SendNUIMessage({ type = "reports", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getReportData', function(sentData) - SendNUIMessage({ type = "reportData", data = sentData }) -end) - -RegisterNetEvent('mdt:client:reportComplete', function(sentData) - SendNUIMessage({ type = "reportComplete", data = sentData }) -end) - ---==================================================================================== ------------------------------------------- --- DMV PAGE -- ------------------------------------------- ---==================================================================================== -RegisterNUICallback("searchVehicles", function(data, cb) - - local p = promise.new() - - QBCore.Functions.TriggerCallback('mdt:server:SearchVehicles', function(result) - p:resolve(result) - end, data.name) - - local result = Citizen.Await(p) - for i=1, #result do - local vehicle = result[i] - local mods = json.decode(result[i].mods) - result[i]['plate'] = string.upper(result[i]['plate']) - result[i]['color'] = Config.ColorInformation[mods['color1']] - result[i]['colorName'] = Config.ColorNames[mods['color1']] - local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] - result[i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] - end - cb(result) - -end) - -RegisterNUICallback("getVehicleData", function(data, cb) - local plate = data.plate - TriggerServerEvent('mdt:server:getVehicleData', plate) - cb(true) -end) - -RegisterNUICallback("saveVehicleInfo", function(data, cb) - local dbid = data.dbid - local plate = data.plate - local imageurl = data.imageurl - local notes = data.notes - local stolen = data.stolen - local code5 = data.code5 - local impound = data.impound - local points = data.points - local JobType = GetJobType(PlayerData.job.name) - if JobType == 'police' and impound.impoundChanged == true then - if impound.impoundActive then - local found = 0 - local plate = string.upper(string.gsub(data['plate'], "^%s*(.-)%s*$", "%1")) - local vehicles = GetGamePool('CVehicle') - - for k,v in pairs(vehicles) do - local plt = string.upper(string.gsub(GetVehicleNumberPlateText(v), "^%s*(.-)%s*$", "%1")) - if plt == plate then - local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(v)) - if dist < 5.0 then - found = VehToNet(v) - SendNUIMessage({ type = "greenImpound" }) - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) - end - break - end - end - - if found == 0 then - QBCore.Functions.Notify('Vehicle not found!', 'error') - SendNUIMessage({ type = "redImpound" }) - end - else - local ped = PlayerPedId() - local playerPos = GetEntityCoords(ped) - for k, v in pairs(Config.ImpoundLocations) do - if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then - impound.CurrentSelection = k - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) - break - end - end - end - else - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) - end - cb(true) -end) - ---==================================================================================== ------------------------------------------- --- Weapons PAGE -- ------------------------------------------- ---==================================================================================== -RegisterNUICallback("searchWeapons", function(data, cb) - local p = promise.new() - - QBCore.Functions.TriggerCallback('mdt:server:SearchWeapons', function(result) - p:resolve(result) - end, data.name) - - local result = Citizen.Await(p) - cb(result) -end) - -RegisterNUICallback("saveWeaponInfo", function(data, cb) - local serial = data.serial - local notes = data.notes - local imageurl = data.imageurl - local owner = data.owner - local weapClass = data.weapClass - local weapModel = data.weapModel - local JobType = GetJobType(PlayerData.job.name) - if JobType == 'police' then - TriggerServerEvent('mdt:server:saveWeaponInfo', serial, imageurl, notes, owner, weapClass, weapModel) - end - cb(true) -end) - -RegisterNUICallback("getWeaponData", function(data, cb) - local serial = data.serial - TriggerServerEvent('mdt:server:getWeaponData', serial) - cb(true) -end) - -RegisterNetEvent('mdt:client:getWeaponData', function(sentData) - if sentData and sentData[1] then - local results = sentData[1] - SendNUIMessage({ type = "getWeaponData", data = results }) - end -end) - -RegisterNUICallback("getAllLogs", function(data, cb) - TriggerServerEvent('mdt:server:getAllLogs') - cb(true) -end) - -RegisterNUICallback("getPenalCode", function(data, cb) - TriggerServerEvent('mdt:server:getPenalCode') - cb(true) -end) - -RegisterNUICallback("toggleDuty", function(data, cb) - TriggerServerEvent('QBCore:ToggleDuty') - cb(true) -end) - -RegisterNUICallback("setCallsign", function(data, cb) - TriggerServerEvent('mdt:server:setCallsign', data.cid, data.newcallsign) - cb(true) -end) - -RegisterNUICallback("setRadio", function(data, cb) - TriggerServerEvent('mdt:server:setRadio', data.cid, data.newradio) - cb(true) -end) - -RegisterNUICallback("saveIncident", function(data, cb) - TriggerServerEvent('mdt:server:saveIncident', data.ID, data.title, data.information, data.tags, data.officers, data.civilians, data.evidence, data.associated, data.time) - cb(true) -end) - -RegisterNUICallback("removeIncidentCriminal", function(data, cb) - TriggerServerEvent('mdt:server:removeIncidentCriminal', data.cid, data.incidentId) - cb(true) -end) - -RegisterNetEvent('mdt:client:getVehicleData', function(sentData) - if sentData and sentData[1] then - local vehicle = sentData[1] - local vehData = json.decode(vehicle['vehicle']) - vehicle['color'] = Config.ColorInformation[vehicle['color1']] - vehicle['colorName'] = Config.ColorNames[vehicle['color1']] - local vehData = QBCore.Shared.Vehicles[vehicle.vehicle] - vehicle.model = vehData["brand"] .. ' ' .. vehData["name"] - vehicle['class'] = Config.ClassList[GetVehicleClassFromName(vehicle['vehicle'])] - vehicle['vehicle'] = nil - SendNUIMessage({ type = "getVehicleData", data = vehicle }) - end -end) - -RegisterNetEvent('mdt:client:updateVehicleDbId', function(sentData) - SendNUIMessage({ type = "updateVehicleDbId", data = tonumber(sentData) }) -end) - -RegisterNetEvent('mdt:client:updateWeaponDbId', function(sentData) - SendNUIMessage({ type = "updateWeaponDbId", data = tonumber(sentData) }) -end) - -RegisterNetEvent('mdt:client:getAllLogs', function(sentData) - SendNUIMessage({ type = "getAllLogs", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getPenalCode', function(titles, penalcode) - SendNUIMessage({ type = "getPenalCode", titles = titles, penalcode = penalcode }) -end) - -RegisterNetEvent('mdt:client:setRadio', function(radio) - if type(tonumber(radio)) == "number" then - exports["pma-voice"]:setVoiceProperty("radioEnabled", true) - exports["pma-voice"]:setRadioChannel(tonumber(radio)) - QBCore.Functions.Notify("You have set your radio frequency to "..radio..".", "success") - else - QBCore.Functions.Notify("Invalid Station(Please enter a number)", "error") - end -end) - -RegisterNetEvent('mdt:client:sig100', function(radio, type) - local job = PlayerData.job.name - local duty = PlayerData.job.onduty - if AllowedJob(job) and duty == 1 then - if type == true then - exports['erp_notifications']:PersistentAlert("START", "signall100-"..radio, "inform", "Radio "..radio.." is currently signal 100!") - end - end - if not type then - exports['erp_notifications']:PersistentAlert("END", "signall100-"..radio) - end -end) - -RegisterNetEvent('mdt:client:updateCallsign', function(callsign) - callSign = tostring(callsign) -end) - -RegisterNetEvent('mdt:client:updateIncidentDbId', function(sentData) - SendNUIMessage({ type = "updateIncidentDbId", data = tonumber(sentData) }) -end) - - ---==================================================================================== ------------------------------------------- --- DISPATCH PAGE -- ------------------------------------------- ---==================================================================================== - -RegisterNetEvent('dispatch:clNotify', function(sNotificationData, sNotificationId) - if LocalPlayer.state.isLoggedIn then - sNotificationData.playerJob = PlayerData.job.name - SendNUIMessage({ type = "call", data = sNotificationData }) - end -end) - -RegisterNUICallback("setWaypoint", function(data, cb) - TriggerServerEvent('mdt:server:setWaypoint', data.callid) - cb(true) -end) - -RegisterNUICallback("callDetach", function(data, cb) - TriggerServerEvent('mdt:server:callDetach', data.callid) - cb(true) -end) - -RegisterNUICallback("removeCallBlip", function(data, cb) - TriggerEvent('ps-dispatch:client:removeCallBlip', data.callid) - cb(true) -end) - -RegisterNUICallback("callAttach", function(data, cb) - TriggerServerEvent('mdt:server:callAttach', data.callid) - cb(true) -end) - -RegisterNUICallback("attachedUnits", function(data, cb) - TriggerServerEvent('mdt:server:attachedUnits', data.callid) - cb(true) -end) - -RegisterNUICallback("callDispatchDetach", function(data, cb) - TriggerServerEvent('mdt:server:callDispatchDetach', data.callid, data.cid) - cb(true) -end) - -RegisterNUICallback("setDispatchWaypoint", function(data, cb) - TriggerServerEvent('mdt:server:setDispatchWaypoint', data.callid, data.cid) - cb(true) -end) - -RegisterNUICallback("callDragAttach", function(data, cb) - TriggerServerEvent('mdt:server:callDragAttach', data.callid, data.cid) - cb(true) -end) - -RegisterNUICallback("setWaypointU", function(data, cb) - TriggerServerEvent('mdt:server:setWaypoint:unit', data.cid) - cb(true) -end) - -RegisterNUICallback("dispatchMessage", function(data, cb) - TriggerServerEvent('mdt:server:sendMessage', data.message, data.time) - cb(true) -end) - -RegisterNUICallback("refreshDispatchMsgs", function(data, cb) - TriggerServerEvent('mdt:server:refreshDispatchMsgs') - cb(true) -end) - -RegisterNUICallback("dispatchNotif", function(data, cb) - local info = data['data'] - local mentioned = false - if callSign ~= "" then if string.find(string.lower(info['message']),string.lower(string.gsub(callSign,'-','%%-'))) then mentioned = true end end - if mentioned then - - -- Send notification to phone?? - TriggerEvent('erp_phone:sendNotification', {img = info['profilepic'], title = "Dispatch (Mention)", content = info['message'], time = 7500, customPic = true }) - - PlaySoundFrontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", false) - PlaySoundFrontend(-1, "Event_Start_Text", "GTAO_FM_Events_Soundset", 0) - else - TriggerEvent('erp_phone:sendNotification', {img = info['profilepic'], title = "Dispatch ("..info['name']..")", content = info['message'], time = 5000, customPic = true }) - end - cb(true) -end) - -RegisterNUICallback("getCallResponses", function(data, cb) - TriggerServerEvent('mdt:server:getCallResponses', data.callid) - cb(true) -end) - -RegisterNUICallback("sendCallResponse", function(data, cb) - TriggerServerEvent('mdt:server:sendCallResponse', data.message, data.time, data.callid) - cb(true) -end) - ---[[ RegisterNUICallback("impoundVehicle", function(data, cb) - local JobType = GetJobType(PlayerData.job.name) - if JobType == 'police' then - local found = 0 - local plate = string.upper(string.gsub(data['plate'], "^%s*(.-)%s*$", "%1")) - local vehicles = GetGamePool('CVehicle') - - for k,v in pairs(vehicles) do - local plt = string.upper(string.gsub(GetVehicleNumberPlateText(v), "^%s*(.-)%s*$", "%1")) - if plt == plate then - local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(v)) - if dist < 5.0 then - found = VehToNet(v) - end - break - end - end - - if found == 0 then - QBCore.Functions.Notify('Vehicle not found!', 'error') - return - end - - SendNUIMessage({ type = "greenShit" }) - TriggerServerEvent('mdt:server:impoundVehicle', data, found) - cb('ok') - end -end) ]] - -RegisterNUICallback("removeImpound", function(data, cb) - local ped = PlayerPedId() - local playerPos = GetEntityCoords(ped) - for k, v in pairs(Config.ImpoundLocations) do - if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then - TriggerServerEvent('mdt:server:removeImpound', data['plate'], k) - break - end - end - cb('ok') -end) - -RegisterNUICallback("statusImpound", function(data, cb) - TriggerServerEvent('mdt:server:statusImpound', data['plate']) - cb('ok') -end) - -RegisterNUICallback('openCamera', function(data) - local camId = tonumber(data.cam) - TriggerEvent('police:client:ActiveCamera', camId) -end) - -RegisterNetEvent('mdt:client:attachedUnits', function(sentData, callid) - SendNUIMessage({ type = "attachedUnits", data = sentData, callid = callid }) -end) - -RegisterNetEvent('mdt:client:setWaypoint', function(callInformation) - SetNewWaypoint(callInformation['origin']['x'], callInformation['origin']['y']) -end) - -RegisterNetEvent('mdt:client:callDetach', function(callid, sentData) - local job = PlayerData.job.name - if AllowedJob(job) then - SendNUIMessage({ type = "callDetach", callid = callid, data = tonumber(sentData) }) - end -end) -RegisterNetEvent('mdt:client:callAttach', function(callid, sentData) - local job = PlayerData.job.name - if AllowedJob(job) then - SendNUIMessage({ type = "callAttach", callid = callid, data = tonumber(sentData) }) - end -end) - -RegisterNetEvent('mdt:client:setWaypoint:unit', function(sentData) - SetNewWaypoint(sentData.x, sentData.y) -end) - -RegisterNetEvent('mdt:client:dashboardMessage', function(sentData) - local job = PlayerData.job.name - if AllowedJob(job) then - SendNUIMessage({ type = "dispatchmessage", data = sentData }) - end -end) - -RegisterNetEvent('mdt:client:dashboardMessages', function(sentData) - SendNUIMessage({ type = "dispatchmessages", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getCallResponses', function(sentData, sentCallId) - SendNUIMessage({ type = "getCallResponses", data = sentData, callid = sentCallId }) -end) - -RegisterNetEvent('mdt:client:sendCallResponse', function(message, time, callid, name) - SendNUIMessage({ type = "sendCallResponse", message = message, time = time, callid = callid, name = name }) -end) - -RegisterNetEvent('mdt:client:notifyMechanics', function(sentData) - --[[if exports["erp-jobsystem"]:CanTow() then - TriggerServerEvent('erp-sounds:PlayWithinDistance', 1.5, 'beep', 0.4) - TriggerEvent('erp_phone:sendNotification', {img = 'vehiclenotif.png', title = "Impound", content = "New vehicle is ready to be impounded!", time = 5000 }) - end]] -end) - -RegisterNetEvent('mdt:client:statusImpound', function(data, plate) - SendNUIMessage({ type = "statusImpound", data = data, plate = plate }) -end) +QBCore = exports['qb-core']:GetCoreObject() +local PlayerData = {} +local CurrentCops = 0 +local isOpen = false +local callSign = "" +local tabletObj = nil +local tabletDict = "amb@code_human_in_bus_passenger_idles@female@tablet@base" +local tabletAnim = "base" +local tabletProp = `prop_cs_tablet` +local tabletBone = 60309 +local tabletOffset = vector3(0.03, 0.002, -0.0) +local tabletRot = vector3(10.0, 160.0, 0.0) + +CreateThread(function() + if GetResourceState('ps-dispatch') == 'started' then + TriggerServerEvent("ps-mdt:dispatchStatus", true) + end +end) + + +-- Events from qbcore +RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + PlayerData = QBCore.Functions.GetPlayerData() + callSign = PlayerData.metadata.callsign +end) + +RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() + TriggerServerEvent("ps-mdt:server:OnPlayerUnload") + PlayerData = {} +end) + +RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo) + PlayerData.job = JobInfo +end) + +RegisterNetEvent('QBCore:Client:OnGangUpdate', function(GangInfo) + PlayerData.gang = GangInfo +end) + +RegisterNetEvent("QBCore:Client:SetDuty", function(job, state) + if AllowedJob(job) then + TriggerServerEvent("ps-mdt:server:ToggleDuty") + end +end) + +RegisterNetEvent('police:SetCopCount', function(amount) + CurrentCops = amount +end) + +RegisterNetEvent('QBCore:Player:SetPlayerData', function(val) + PlayerData = val +end) + +AddEventHandler('onResourceStart', function(resourceName) + if GetCurrentResourceName() ~= resourceName then return end + Wait(150) + PlayerData = QBCore.Functions.GetPlayerData() + callSign = PlayerData.metadata.callsign +end) + +AddEventHandler('onResourceStop', function(resourceName) + if (GetCurrentResourceName() ~= resourceName) then return end + ClearPedSecondaryTask(PlayerPedId()) + SetEntityAsMissionEntity(tabletObj) + DetachEntity(tabletObj, true, false) + DeleteObject(tabletObj) +end) + +--==================================================================================== +------------------------------------------ +-- Functions -- +------------------------------------------ +--====================================================================================\ + +RegisterKeyMapping('mdt', 'Open Police MDT', 'keyboard', 'k') + +RegisterCommand('mdt', function() + local plyPed = PlayerPedId() + PlayerData = QBCore.Functions.GetPlayerData() + if not PlayerData.metadata["isdead"] and not PlayerData.metadata["inlaststand"] and not PlayerData.metadata["ishandcuffed"] and not IsPauseMenuActive() then + if GetJobType(PlayerData.job.name) ~= nil then + TriggerServerEvent('mdt:server:openMDT') + end + else + QBCore.Functions.Notify("Can't do that!", "error") + end +end, false) + +Citizen.CreateThread(function() + TriggerEvent('chat:addSuggestion', '/mdt', 'Open the emergency services MDT', {}) +end) + +local function doAnimation() + if not isOpen then return end + -- Animation + RequestAnimDict(tabletDict) + while not HasAnimDictLoaded(tabletDict) do Citizen.Wait(100) end + -- Model + RequestModel(tabletProp) + while not HasModelLoaded(tabletProp) do Citizen.Wait(100) end + + local plyPed = PlayerPedId() + tabletObj = CreateObject(tabletProp, 0.0, 0.0, 0.0, true, true, false) + local tabletBoneIndex = GetPedBoneIndex(plyPed, tabletBone) + + AttachEntityToEntity(tabletObj, plyPed, tabletBoneIndex, tabletOffset.x, tabletOffset.y, tabletOffset.z, tabletRot.x, tabletRot.y, tabletRot.z, true, false, false, false, 2, true) + SetModelAsNoLongerNeeded(tabletProp) + + CreateThread(function() + while isOpen do + Wait(0) + if not IsEntityPlayingAnim(plyPed, tabletDict, tabletAnim, 3) then + TaskPlayAnim(plyPed, tabletDict, tabletAnim, 3.0, 3.0, -1, 49, 0, 0, 0, 0) + end + end + + + ClearPedSecondaryTask(plyPed) + Citizen.Wait(250) + DetachEntity(tabletObj, true, false) + DeleteEntity(tabletObj) + end) +end + + +local function CurrentDuty(duty) + if duty == 1 then + return "10-41" + end + return "10-42" +end + +local function EnableGUI(enable) + SetNuiFocus(enable, enable) + SendNUIMessage({ type = "show", enable = enable, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name] }) + isOpen = enable + doAnimation() +end + +local function RefreshGUI() + SetNuiFocus(false, false) + SendNUIMessage({ type = "show", enable = false, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name] }) + isOpen = false +end + +--// Non local function so above EHs can utilise +function AllowedJob(job) + for key, _ in pairs(Config.AllowedJobs) do + if key == job then + return true + end + end + --// Return false if current job is not in allowed list + return false +end + + +--==================================================================================== +------------------------------------------ +-- MAIN PAGE -- +------------------------------------------ +--==================================================================================== + + +RegisterCommand("restartmdt", function(source, args, rawCommand) + RefreshGUI() +end, false) + +RegisterNUICallback("deleteBulletin", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteBulletin', id, data.title) + cb(true) +end) + +RegisterNUICallback("newBulletin", function(data, cb) + local title = data.title + local info = data.info + local time = data.time + TriggerServerEvent('mdt:server:NewBulletin', title, info, time) + cb(true) +end) + +RegisterNUICallback('escape', function(data, cb) + EnableGUI(false) + cb(true) +end) + +RegisterNetEvent('mdt:client:dashboardbulletin', function(sentData) + SendNUIMessage({ type = "bulletin", data = sentData }) +end) + +RegisterNetEvent('mdt:client:dashboardWarrants', function() + QBCore.Functions.TriggerCallback("mdt:server:getWarrants", function(data) + if data then + SendNUIMessage({ type = "warrants", data = data }) + end + end) + -- SendNUIMessage({ type = "warrants",}) +end) + +RegisterNUICallback("getAllDashboardData", function(data, cb) + TriggerEvent("mdt:client:dashboardWarrants") + cb(true) +end) + + +RegisterNetEvent('mdt:client:dashboardReports', function(sentData) + SendNUIMessage({ type = "reports", data = sentData }) +end) + +RegisterNetEvent('mdt:client:dashboardCalls', function(sentData) + SendNUIMessage({ type = "calls", data = sentData }) +end) + +RegisterNetEvent('mdt:client:newBulletin', function(ignoreId, sentData, job) + if ignoreId == GetPlayerServerId(PlayerId()) then return end; + if AllowedJob(PlayerData.job.name) then + SendNUIMessage({ type = "newBulletin", data = sentData }) + end +end) + +RegisterNetEvent('mdt:client:deleteBulletin', function(ignoreId, sentData, job) + if ignoreId == GetPlayerServerId(PlayerId()) then return end; + if AllowedJob(PlayerData.job.name) then + SendNUIMessage({ type = "deleteBulletin", data = sentData }) + end +end) + +RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, calls, cid) + EnableGUI(true) + local x, y, z = table.unpack(GetEntityCoords(PlayerPedId())) + + local currentStreetHash, intersectStreetHash = GetStreetNameAtCoord(x, y, z) + local currentStreetName = GetStreetNameFromHashKey(currentStreetHash) + local intersectStreetName = GetStreetNameFromHashKey(intersectStreetHash) + local zone = tostring(GetNameOfZone(x, y, z)) + local area = GetLabelText(zone) + local playerStreetsLocation = area + + if not zone then zone = "UNKNOWN" end; + + if intersectStreetName ~= nil and intersectStreetName ~= "" then playerStreetsLocation = currentStreetName .. ", " .. intersectStreetName .. ", " .. area + elseif currentStreetName ~= nil and currentStreetName ~= "" then playerStreetsLocation = currentStreetName .. ", " .. area + else playerStreetsLocation = area end + + -- local grade = PlayerData.job.grade.name + + SendNUIMessage({ type = "data", activeUnits = activeUnits, citizenid = cid, ondutyonly = Config.OnlyShowOnDuty, name = "Welcome, " ..PlayerData.job.grade.name..' '..PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2), location = playerStreetsLocation, fullname = PlayerData.charinfo.firstname..' '..PlayerData.charinfo.lastname, bulletin = bulletin }) + SendNUIMessage({ type = "calls", data = calls }) + TriggerEvent("mdt:client:dashboardWarrants") +end) + +RegisterNetEvent('mdt:client:exitMDT', function() + EnableGUI(false) +end) + +--==================================================================================== +------------------------------------------ +-- PROFILE PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("searchProfiles", function(data, cb) + local p = promise.new() + + QBCore.Functions.TriggerCallback('mdt:server:SearchProfile', function(result) + p:resolve(result) + end, data.name) + + local data = Citizen.Await(p) + + cb(data) +end) + + +RegisterNetEvent('mdt:client:searchProfile', function(sentData, isLimited) + SendNUIMessage({ type = "profiles", data = sentData, isLimited = isLimited }) +end) + +RegisterNUICallback("saveProfile", function(data, cb) + local profilepic = data.pfp + local information = data.description + local cid = data.id + local fName = data.fName + local sName = data.sName + local tags = data.tags + local gallery = data.gallery + local fingerprint = data.fingerprint + local licenses = data.licenses + + TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, fingerprint, licenses) + cb(true) +end) + +RegisterNUICallback("getProfileData", function(data, cb) + local id = data.id + local p = nil + local getProfileDataPromise = function(data) + if p then return end + p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetProfileData', function(result) + p:resolve(result) + end, data) + return Citizen.Await(p) + end + local pP = nil + local result = getProfileDataPromise(id) + + --[[ local getProfileProperties = function(data) + if pP then return end + pP = promise.new() + QBCore.Functions.TriggerCallback('qb-phone:server:MeosGetPlayerHouses', function(result) + pP:resolve(result) + end, data) + return Citizen.Await(pP) + end + local propertiesResult = getProfileProperties(id) + result.properties = propertiesResult + ]] + local vehicles=result.vehicles + for i=1,#vehicles do + local vehicle=result.vehicles[i] + local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] + result.vehicles[i]['model'] = vehData["name"] + end + p = nil + return cb(result) +end) + +RegisterNUICallback("newTag", function(data, cb) + if data.id ~= "" and data.tag ~= "" then + TriggerServerEvent('mdt:server:newTag', data.id, data.tag) + end + cb(true) +end) + +RegisterNUICallback("removeProfileTag", function(data, cb) + local cid = data.cid + local tagtext = data.text + TriggerServerEvent('mdt:server:removeProfileTag', cid, tagtext) + cb(true) +end) + +RegisterNUICallback("updateLicence", function(data, cb) + local type = data.type + local status = data.status + local cid = data.cid + TriggerServerEvent('mdt:server:updateLicense', cid, type, status) + cb(true) +end) + +RegisterNUICallback("searchIncidents", function(data, cb) + local incident = data.incident + TriggerServerEvent('mdt:server:searchIncidents', incident) + cb(true) +end) + +RegisterNUICallback("getIncidentData", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:getIncidentData', id) + cb(true) +end) + +RegisterNUICallback("incidentSearchPerson", function(data, cb) + local name = data.name + TriggerServerEvent('mdt:server:incidentSearchPerson', name ) + cb(true) +end) + +RegisterNetEvent('mdt:client:getProfileData', function(sentData, isLimited) + if not isLimited then + local vehicles = sentData['vehicles'] + for i=1, #vehicles do + sentData['vehicles'][i]['plate'] = string.upper(sentData['vehicles'][i]['plate']) + local tempModel = vehicles[i]['model'] + if tempModel and tempModel ~= "Unknown" then + local vehData = QBCore.Shared.Vehicles[tempModel] + sentData['vehicles'][i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] + end + end + end + SendNUIMessage({ type = "profileData", data = sentData, isLimited = isLimited }) +end) + +RegisterNetEvent('mdt:client:getIncidents', function(sentData) + SendNUIMessage({ type = "incidents", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getIncidentData', function(sentData, sentConvictions) + SendNUIMessage({ type = "incidentData", data = sentData, convictions = sentConvictions }) +end) + +RegisterNetEvent('mdt:client:incidentSearchPerson', function(sentData) + SendNUIMessage({ type = "incidentSearchPerson", data = sentData }) +end) + + +RegisterNUICallback('SetHouseLocation', function(data, cb) + local coords = {} + for word in data.coord[1]:gmatch('[^,%s]+') do + coords[#coords+1] = tonumber(word) + end + SetNewWaypoint(coords[1], coords[2]) + QBCore.Functions.Notify('GPS has been set!', 'success') +end) + +--==================================================================================== +------------------------------------------ +-- Dispatch Calls Page -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("searchCalls", function(data, cb) + local searchCall = data.searchCall + TriggerServerEvent('mdt:server:searchCalls', searchCall) + cb(true) +end) + +RegisterNetEvent('mdt:client:getCalls', function(calls, callid) + SendNUIMessage({ type = "calls", data = calls }) +end) + +--==================================================================================== +------------------------------------------ +-- BOLO PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("searchBolos", function(data, cb) + local searchVal = data.searchVal + TriggerServerEvent('mdt:server:searchBolos', searchVal) + cb(true) +end) + +RegisterNUICallback("getAllBolos", function(data, cb) + TriggerServerEvent('mdt:server:getAllBolos') + cb(true) +end) + +RegisterNUICallback("getAllIncidents", function(data, cb) + TriggerServerEvent('mdt:server:getAllIncidents') + cb(true) +end) + +RegisterNUICallback("getBoloData", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:getBoloData', id) + cb(true) +end) + +RegisterNUICallback("newBolo", function(data, cb) + local existing = data.existing + local id = data.id + local title = data.title + local plate = data.plate + local owner = data.owner + local individual = data.individual + local detail = data.detail + local tags = data.tags + local gallery = data.gallery + local officers = data.officers + local time = data.time + TriggerServerEvent('mdt:server:newBolo', existing, id, title, plate, owner, individual, detail, tags, gallery, officers, time) + cb(true) +end) + +RegisterNUICallback("deleteBolo", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteBolo', id) + cb(true) +end) + +RegisterNUICallback("deleteICU", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteICU', id) + cb(true) +end) + +RegisterNetEvent('mdt:client:getBolos', function(sentData) + SendNUIMessage({ type = "bolos", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getAllIncidents', function(sentData) + SendNUIMessage({ type = "incidents", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getAllBolos', function(sentData) + SendNUIMessage({ type = "bolos", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getBoloData', function(sentData) + SendNUIMessage({ type = "boloData", data = sentData }) +end) + +RegisterNetEvent('mdt:client:boloComplete', function(sentData) + SendNUIMessage({ type = "boloComplete", data = sentData }) +end) + +--==================================================================================== +------------------------------------------ +-- REPORTS PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("getAllReports", function(data, cb) + TriggerServerEvent('mdt:server:getAllReports') + cb(true) +end) + +RegisterNUICallback("getReportData", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:getReportData', id) + cb(true) +end) + +RegisterNUICallback("searchReports", function(data, cb) + local name = data.name + TriggerServerEvent('mdt:server:searchReports', name) + cb(true) +end) + +RegisterNUICallback("newReport", function(data, cb) + local existing = data.existing + local id = data.id + local title = data.title + local reporttype = data.type + local details = data.details + local tags = data.tags + local gallery = data.gallery + local officers = data.officers + local civilians = data.civilians + local time = data.time + + TriggerServerEvent('mdt:server:newReport', existing, id, title, reporttype, details, tags, gallery, officers, civilians, time) + cb(true) +end) + +RegisterNetEvent('mdt:client:getAllReports', function(sentData) + SendNUIMessage({ type = "reports", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getReportData', function(sentData) + SendNUIMessage({ type = "reportData", data = sentData }) +end) + +RegisterNetEvent('mdt:client:reportComplete', function(sentData) + SendNUIMessage({ type = "reportComplete", data = sentData }) +end) + +--==================================================================================== +------------------------------------------ +-- DMV PAGE -- +------------------------------------------ +--==================================================================================== +RegisterNUICallback("searchVehicles", function(data, cb) + + local p = promise.new() + + QBCore.Functions.TriggerCallback('mdt:server:SearchVehicles', function(result) + p:resolve(result) + end, data.name) + + local result = Citizen.Await(p) + for i=1, #result do + local vehicle = result[i] + local mods = json.decode(result[i].mods) + result[i]['plate'] = string.upper(result[i]['plate']) + result[i]['color'] = Config.ColorInformation[mods['color1']] + result[i]['colorName'] = Config.ColorNames[mods['color1']] + local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] + result[i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] + end + cb(result) + +end) + +RegisterNUICallback("getVehicleData", function(data, cb) + local plate = data.plate + TriggerServerEvent('mdt:server:getVehicleData', plate) + cb(true) +end) + +RegisterNUICallback("saveVehicleInfo", function(data, cb) + local dbid = data.dbid + local plate = data.plate + local imageurl = data.imageurl + local notes = data.notes + local stolen = data.stolen + local code5 = data.code5 + local impound = data.impound + local points = data.points + local JobType = GetJobType(PlayerData.job.name) + if JobType == 'police' and impound.impoundChanged == true then + if impound.impoundActive then + local found = 0 + local plate = string.upper(string.gsub(data['plate'], "^%s*(.-)%s*$", "%1")) + local vehicles = GetGamePool('CVehicle') + + for k,v in pairs(vehicles) do + local plt = string.upper(string.gsub(GetVehicleNumberPlateText(v), "^%s*(.-)%s*$", "%1")) + if plt == plate then + local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(v)) + if dist < 5.0 then + found = VehToNet(v) + SendNUIMessage({ type = "greenImpound" }) + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) + end + break + end + end + + if found == 0 then + QBCore.Functions.Notify('Vehicle not found!', 'error') + SendNUIMessage({ type = "redImpound" }) + end + else + local ped = PlayerPedId() + local playerPos = GetEntityCoords(ped) + for k, v in pairs(Config.ImpoundLocations) do + if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then + impound.CurrentSelection = k + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) + break + end + end + end + else + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) + end + cb(true) +end) + +--==================================================================================== +------------------------------------------ +-- Weapons PAGE -- +------------------------------------------ +--==================================================================================== +RegisterNUICallback("searchWeapons", function(data, cb) + local p = promise.new() + + QBCore.Functions.TriggerCallback('mdt:server:SearchWeapons', function(result) + p:resolve(result) + end, data.name) + + local result = Citizen.Await(p) + cb(result) +end) + +RegisterNUICallback("saveWeaponInfo", function(data, cb) + local serial = data.serial + local notes = data.notes + local imageurl = data.imageurl + local owner = data.owner + local weapClass = data.weapClass + local weapModel = data.weapModel + local JobType = GetJobType(PlayerData.job.name) + if JobType == 'police' then + TriggerServerEvent('mdt:server:saveWeaponInfo', serial, imageurl, notes, owner, weapClass, weapModel) + end + cb(true) +end) + +RegisterNUICallback("getWeaponData", function(data, cb) + local serial = data.serial + TriggerServerEvent('mdt:server:getWeaponData', serial) + cb(true) +end) + +RegisterNetEvent('mdt:client:getWeaponData', function(sentData) + if sentData and sentData[1] then + local results = sentData[1] + SendNUIMessage({ type = "getWeaponData", data = results }) + end +end) + +RegisterNUICallback("getAllLogs", function(data, cb) + TriggerServerEvent('mdt:server:getAllLogs') + cb(true) +end) + +RegisterNUICallback("getPenalCode", function(data, cb) + TriggerServerEvent('mdt:server:getPenalCode') + cb(true) +end) + +RegisterNUICallback("toggleDuty", function(data, cb) + TriggerServerEvent('QBCore:ToggleDuty') + cb(true) +end) + +RegisterNUICallback("setCallsign", function(data, cb) + TriggerServerEvent('mdt:server:setCallsign', data.cid, data.newcallsign) + cb(true) +end) + +RegisterNUICallback("setRadio", function(data, cb) + TriggerServerEvent('mdt:server:setRadio', data.cid, data.newradio) + cb(true) +end) + +RegisterNUICallback("saveIncident", function(data, cb) + TriggerServerEvent('mdt:server:saveIncident', data.ID, data.title, data.information, data.tags, data.officers, data.civilians, data.evidence, data.associated, data.time) + cb(true) +end) + +RegisterNUICallback("removeIncidentCriminal", function(data, cb) + TriggerServerEvent('mdt:server:removeIncidentCriminal', data.cid, data.incidentId) + cb(true) +end) + +RegisterNetEvent('mdt:client:getVehicleData', function(sentData) + if sentData and sentData[1] then + local vehicle = sentData[1] + local vehData = json.decode(vehicle['vehicle']) + vehicle['color'] = Config.ColorInformation[vehicle['color1']] + vehicle['colorName'] = Config.ColorNames[vehicle['color1']] + local vehData = QBCore.Shared.Vehicles[vehicle.vehicle] + vehicle.model = vehData["brand"] .. ' ' .. vehData["name"] + vehicle['class'] = Config.ClassList[GetVehicleClassFromName(vehicle['vehicle'])] + vehicle['vehicle'] = nil + SendNUIMessage({ type = "getVehicleData", data = vehicle }) + end +end) + +RegisterNetEvent('mdt:client:updateVehicleDbId', function(sentData) + SendNUIMessage({ type = "updateVehicleDbId", data = tonumber(sentData) }) +end) + +RegisterNetEvent('mdt:client:updateWeaponDbId', function(sentData) + SendNUIMessage({ type = "updateWeaponDbId", data = tonumber(sentData) }) +end) + +RegisterNetEvent('mdt:client:getAllLogs', function(sentData) + SendNUIMessage({ type = "getAllLogs", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getPenalCode', function(titles, penalcode) + SendNUIMessage({ type = "getPenalCode", titles = titles, penalcode = penalcode }) +end) + +RegisterNetEvent('mdt:client:setRadio', function(radio) + if type(tonumber(radio)) == "number" then + exports["pma-voice"]:setVoiceProperty("radioEnabled", true) + exports["pma-voice"]:setRadioChannel(tonumber(radio)) + QBCore.Functions.Notify("You have set your radio frequency to "..radio..".", "success") + else + QBCore.Functions.Notify("Invalid Station(Please enter a number)", "error") + end +end) + +RegisterNetEvent('mdt:client:sig100', function(radio, type) + local job = PlayerData.job.name + local duty = PlayerData.job.onduty + if AllowedJob(job) and duty == 1 then + if type == true then + exports['erp_notifications']:PersistentAlert("START", "signall100-"..radio, "inform", "Radio "..radio.." is currently signal 100!") + end + end + if not type then + exports['erp_notifications']:PersistentAlert("END", "signall100-"..radio) + end +end) + +RegisterNetEvent('mdt:client:updateCallsign', function(callsign) + callSign = tostring(callsign) +end) + +RegisterNetEvent('mdt:client:updateIncidentDbId', function(sentData) + SendNUIMessage({ type = "updateIncidentDbId", data = tonumber(sentData) }) +end) + + +--==================================================================================== +------------------------------------------ +-- DISPATCH PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNetEvent('dispatch:clNotify', function(sNotificationData, sNotificationId) + if LocalPlayer.state.isLoggedIn then + sNotificationData.playerJob = PlayerData.job.name + SendNUIMessage({ type = "call", data = sNotificationData }) + end +end) + +RegisterNUICallback("setWaypoint", function(data, cb) + TriggerServerEvent('mdt:server:setWaypoint', data.callid) + cb(true) +end) + +RegisterNUICallback("callDetach", function(data, cb) + TriggerServerEvent('mdt:server:callDetach', data.callid) + cb(true) +end) + +RegisterNUICallback("removeCallBlip", function(data, cb) + TriggerEvent('ps-dispatch:client:removeCallBlip', data.callid) + cb(true) +end) + +RegisterNUICallback("callAttach", function(data, cb) + TriggerServerEvent('mdt:server:callAttach', data.callid) + cb(true) +end) + +RegisterNUICallback("attachedUnits", function(data, cb) + TriggerServerEvent('mdt:server:attachedUnits', data.callid) + cb(true) +end) + +RegisterNUICallback("callDispatchDetach", function(data, cb) + TriggerServerEvent('mdt:server:callDispatchDetach', data.callid, data.cid) + cb(true) +end) + +RegisterNUICallback("setDispatchWaypoint", function(data, cb) + TriggerServerEvent('mdt:server:setDispatchWaypoint', data.callid, data.cid) + cb(true) +end) + +RegisterNUICallback("callDragAttach", function(data, cb) + TriggerServerEvent('mdt:server:callDragAttach', data.callid, data.cid) + cb(true) +end) + +RegisterNUICallback("setWaypointU", function(data, cb) + TriggerServerEvent('mdt:server:setWaypoint:unit', data.cid) + cb(true) +end) + +RegisterNUICallback("dispatchMessage", function(data, cb) + TriggerServerEvent('mdt:server:sendMessage', data.message, data.time) + cb(true) +end) + +RegisterNUICallback("refreshDispatchMsgs", function(data, cb) + TriggerServerEvent('mdt:server:refreshDispatchMsgs') + cb(true) +end) + +RegisterNUICallback("dispatchNotif", function(data, cb) + local info = data['data'] + local mentioned = false + if callSign ~= "" then if string.find(string.lower(info['message']),string.lower(string.gsub(callSign,'-','%%-'))) then mentioned = true end end + if mentioned then + + -- Send notification to phone?? + TriggerEvent('erp_phone:sendNotification', {img = info['profilepic'], title = "Dispatch (Mention)", content = info['message'], time = 7500, customPic = true }) + + PlaySoundFrontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", false) + PlaySoundFrontend(-1, "Event_Start_Text", "GTAO_FM_Events_Soundset", 0) + else + TriggerEvent('erp_phone:sendNotification', {img = info['profilepic'], title = "Dispatch ("..info['name']..")", content = info['message'], time = 5000, customPic = true }) + end + cb(true) +end) + +RegisterNUICallback("getCallResponses", function(data, cb) + TriggerServerEvent('mdt:server:getCallResponses', data.callid) + cb(true) +end) + +RegisterNUICallback("sendCallResponse", function(data, cb) + TriggerServerEvent('mdt:server:sendCallResponse', data.message, data.time, data.callid) + cb(true) +end) + +--[[ RegisterNUICallback("impoundVehicle", function(data, cb) + local JobType = GetJobType(PlayerData.job.name) + if JobType == 'police' then + local found = 0 + local plate = string.upper(string.gsub(data['plate'], "^%s*(.-)%s*$", "%1")) + local vehicles = GetGamePool('CVehicle') + + for k,v in pairs(vehicles) do + local plt = string.upper(string.gsub(GetVehicleNumberPlateText(v), "^%s*(.-)%s*$", "%1")) + if plt == plate then + local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(v)) + if dist < 5.0 then + found = VehToNet(v) + end + break + end + end + + if found == 0 then + QBCore.Functions.Notify('Vehicle not found!', 'error') + return + end + + SendNUIMessage({ type = "greenShit" }) + TriggerServerEvent('mdt:server:impoundVehicle', data, found) + cb('ok') + end +end) ]] + +RegisterNUICallback("removeImpound", function(data, cb) + local ped = PlayerPedId() + local playerPos = GetEntityCoords(ped) + for k, v in pairs(Config.ImpoundLocations) do + if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then + TriggerServerEvent('mdt:server:removeImpound', data['plate'], k) + break + end + end + cb('ok') +end) + +RegisterNUICallback("statusImpound", function(data, cb) + TriggerServerEvent('mdt:server:statusImpound', data['plate']) + cb('ok') +end) + +RegisterNUICallback('openCamera', function(data) + local camId = tonumber(data.cam) + TriggerEvent('police:client:ActiveCamera', camId) +end) + +RegisterNetEvent('mdt:client:attachedUnits', function(sentData, callid) + SendNUIMessage({ type = "attachedUnits", data = sentData, callid = callid }) +end) + +RegisterNetEvent('mdt:client:setWaypoint', function(callInformation) + SetNewWaypoint(callInformation['origin']['x'], callInformation['origin']['y']) +end) + +RegisterNetEvent('mdt:client:callDetach', function(callid, sentData) + local job = PlayerData.job.name + if AllowedJob(job) then + SendNUIMessage({ type = "callDetach", callid = callid, data = tonumber(sentData) }) + end +end) +RegisterNetEvent('mdt:client:callAttach', function(callid, sentData) + local job = PlayerData.job.name + if AllowedJob(job) then + SendNUIMessage({ type = "callAttach", callid = callid, data = tonumber(sentData) }) + end +end) + +RegisterNetEvent('mdt:client:setWaypoint:unit', function(sentData) + SetNewWaypoint(sentData.x, sentData.y) +end) + +RegisterNetEvent('mdt:client:dashboardMessage', function(sentData) + local job = PlayerData.job.name + if AllowedJob(job) then + SendNUIMessage({ type = "dispatchmessage", data = sentData }) + end +end) + +RegisterNetEvent('mdt:client:dashboardMessages', function(sentData) + SendNUIMessage({ type = "dispatchmessages", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getCallResponses', function(sentData, sentCallId) + SendNUIMessage({ type = "getCallResponses", data = sentData, callid = sentCallId }) +end) + +RegisterNetEvent('mdt:client:sendCallResponse', function(message, time, callid, name) + SendNUIMessage({ type = "sendCallResponse", message = message, time = time, callid = callid, name = name }) +end) + +RegisterNetEvent('mdt:client:notifyMechanics', function(sentData) + --[[if exports["erp-jobsystem"]:CanTow() then + TriggerServerEvent('erp-sounds:PlayWithinDistance', 1.5, 'beep', 0.4) + TriggerEvent('erp_phone:sendNotification', {img = 'vehiclenotif.png', title = "Impound", content = "New vehicle is ready to be impounded!", time = 5000 }) + end]] +end) + +RegisterNetEvent('mdt:client:statusImpound', function(data, plate) + SendNUIMessage({ type = "statusImpound", data = data, plate = plate }) +end) diff --git a/fxmanifest.lua b/fxmanifest.lua index b6b0e6b1..8d78d4b5 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -1,37 +1,37 @@ -fx_version 'cerulean' -game 'gta5' - -author 'Flawws, Flakey, Idris and the Project Sloth team' -description 'EchoRP MDT Rewrite for QBCore' -version '0.9.9' - -lua54 'yes' - -shared_script 'shared/config.lua' - -server_scripts { - '@oxmysql/lib/MySQL.lua', - 'server/utils.lua', - 'server/dbm.lua', - 'server/main.lua' -} -client_scripts{ - 'client/main.lua', - 'client/cl_impound.lua' -} - -ui_page 'ui/dashboard.html' - -files { - 'ui/img/*.png', - 'ui/img/*.webp', - 'ui/dashboard.html', - 'ui/dmv.html', - 'ui/bolos.html', - 'ui/incidents.html', - 'ui/penalcode.html', - 'ui/reports.html', - 'ui/warrants.html', - 'ui/app.js', - 'ui/style.css', +fx_version 'cerulean' +game 'gta5' + +author 'Flawws, Flakey, Idris and the Project Sloth team' +description 'EchoRP MDT Rewrite for QBCore' +version '0.9.9' + +lua54 'yes' + +shared_script 'shared/config.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + 'server/utils.lua', + 'server/dbm.lua', + 'server/main.lua' +} +client_scripts{ + 'client/main.lua', + 'client/cl_impound.lua' +} + +ui_page 'ui/dashboard.html' + +files { + 'ui/img/*.png', + 'ui/img/*.webp', + 'ui/dashboard.html', + 'ui/dmv.html', + 'ui/bolos.html', + 'ui/incidents.html', + 'ui/penalcode.html', + 'ui/reports.html', + 'ui/warrants.html', + 'ui/app.js', + 'ui/style.css', } \ No newline at end of file diff --git a/server/dbm.lua b/server/dbm.lua index 3a13b38c..d69444b0 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -1,189 +1,189 @@ -local QBCore = exports['qb-core']:GetCoreObject() - --- Get CitizenIDs from Player License -function GetCitizenID(license) - local result = MySQL.query.await("SELECT citizenid FROM players WHERE license = ?", {license,}) - if result ~= nil then - return result - else - print("Cannot find a CitizenID for License: "..license) - return nil - end -end - --- (Start) Opening the MDT and sending data -function AddLog(text) - --print(text) - return MySQL.insert.await('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (?,?)', {text, os.time() * 1000}) - -- return exports.oxmysql:execute('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (:text, :time)', { text = text, time = os.time() * 1000 }) -end - -function GetNameFromId(cid) - -- Should be a scalar? - local result = MySQL.scalar.await('SELECT charinfo FROM players WHERE citizenid = @citizenid', { ['@citizenid'] = cid }) - if result ~= nil then - local charinfo = json.decode(result) - local fullname = charinfo['firstname']..' '..charinfo['lastname'] - return fullname - else - --print('Player does not exist') - return nil - end - -- return exports.oxmysql:executeSync('SELECT firstname, lastname FROM `users` WHERE id = :id LIMIT 1', { id = cid }) -end - --- idk what this is used for either -function GetPersonInformation(cid, jobtype) - local result = MySQL.query.await('SELECT information, tags, gallery, pfp, fingerprint FROM mdt_data WHERE cid = ? and jobtype = ?', { cid, jobtype}) - return result[1] - -- return exports.oxmysql:executeSync('SELECT information, tags, gallery FROM mdt WHERE cid= ? and type = ?', { cid, jobtype }) -end - -function GetPfpFingerPrintInformation(cid) - local result = MySQL.query.await('SELECT pfp, fingerprint FROM mdt_data WHERE cid = ?', { cid }) - return result[1] -end - --- idk but I guess sure? -function GetIncidentName(id) - -- Should also be a scalar - return MySQL.query.await('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) - -- return exports.oxmysql:executeSync('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) -end - -function GetConvictions(cids) - return MySQL.query.await('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) - -- return exports.oxmysql:executeSync('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) -end - -function GetLicenseInfo(cid) - local result = MySQL.query.await('SELECT * FROM `licenses` WHERE `cid` = ?', { cid }) - return result - -- return exports.oxmysql:executeSync('SELECT * FROM `licenses` WHERE `cid`=:cid', { cid = cid }) -end - -function CreateUser(cid, tableName) - AddLog("A user was created with the CID: "..cid) - -- return exports.oxmysql:insert("INSERT INTO `"..dbname.."` (cid) VALUES (:cid)", { cid = cid }) - return MySQL.insert.await("INSERT INTO `"..tableName.."` (cid) VALUES (:cid)", { cid = cid }) -end - -function GetPlayerVehicles(cid, cb) - return MySQL.query.await('SELECT id, plate, vehicle FROM player_vehicles WHERE citizenid=:cid', { cid = cid }) -end - -function GetBulletins(JobType) - return MySQL.query.await('SELECT * FROM `mdt_bulletin` WHERE `jobtype` = ? LIMIT 10', { JobType }) - -- return exports.oxmysql:executeSync('SELECT * FROM `mdt_bulletin` WHERE `type`= ? LIMIT 10', { JobType }) -end - -function GetPlayerProperties(cid, cb) - local result = MySQL.query.await('SELECT houselocations.label, houselocations.coords FROM player_houses INNER JOIN houselocations ON player_houses.house = houselocations.name where player_houses.citizenid = ?', {cid}) - return result -end - -function GetPlayerDataById(id) - local Player = QBCore.Functions.GetPlayerByCitizenId(id) - if Player ~= nil then - local response = {citizenid = Player.PlayerData.citizenid, charinfo = Player.PlayerData.charinfo, metadata = Player.PlayerData.metadata, job = Player.PlayerData.job} - return response - else - return MySQL.single.await('SELECT citizenid, charinfo, job, metadata FROM players WHERE citizenid = ? LIMIT 1', { id }) - end - - -- return exports.oxmysql:executeSync('SELECT citizenid, charinfo, job FROM players WHERE citizenid = ? LIMIT 1', { id }) -end - --- Probs also best not to use ---[[ function GetImpoundStatus(vehicleid, cb) - cb( #(exports.oxmysql:executeSync('SELECT id FROM `impound` WHERE `vehicleid`=:vehicleid', {['vehicleid'] = vehicleid })) > 0 ) -end ]] - -function GetBoloStatus(plate) - local result = MySQL.scalar.await('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) - return result - -- return exports.oxmysql:scalarSync('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) -end - -function GetOwnerName(cid) - local result = MySQL.scalar.await('SELECT charinfo FROM `players` WHERE LOWER(`citizenid`) = ? LIMIT 1', {cid}) - return result - -- return exports.oxmysql:scalarSync('SELECT charinfo FROM `players` WHERE id=:cid LIMIT 1', { cid = cid}) -end - -function GetVehicleInformation(plate, cb) - local result = MySQL.query.await('SELECT id, information FROM `mdt_vehicleinfo` WHERE plate=:plate', { plate = plate}) - cb(result) -end - -function GetPlayerApartment(cid, cb) - local result = MySQL.query.await('SELECT name, type, label FROM apartments where citizenid = ?', {cid}) - return result -end - -function GetPlayerLicenses(identifier) - local response = false - local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) - if Player ~= nil then - return Player.PlayerData.metadata.licences - else - local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) - if result ~= nil then - local metadata = json.decode(result) - if metadata["licences"] ~= nil and metadata["licences"] then - return metadata["licences"] - else - return { - ['driver'] = false, - ['business'] = false, - ['weapon'] = false, - ['pilot'] = false - } - end - end - end -end - -function ManageLicense(identifier, type, status) - local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) - local licenseStatus = nil - if status == "give" then licenseStatus = true elseif status == "revoke" then licenseStatus = false end - if Player ~= nil then - local licences = Player.PlayerData.metadata["licences"] - local newLicenses = {} - for k, v in pairs(licences) do - local status = v - if k == type then - status = licenseStatus - end - newLicenses[k] = status - end - Player.Functions.SetMetaData("licences", newLicenses) - else - local licenseType = '$.licences.'..type - local result = MySQL.query.await('UPDATE `players` SET `metadata` = JSON_REPLACE(`metadata`, ?, ?) WHERE `citizenid` = ?', {licenseType, licenseStatus, identifier}) --seems to not work on older MYSQL versions, think about alternative - end -end - -function ManageLicenses(identifier, incomingLicenses) - local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) - if Player ~= nil then - Player.Functions.SetMetaData("licences", incomingLicenses) - - else - local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) - result = json.decode(result) - - result.licences = result.licences or { - ['driver'] = true, - ['business'] = false, - ['weapon'] = false, - ['pilot'] = false - } - - for k, _ in pairs(incomingLicenses) do - result.licences[k] = incomingLicenses[k] - end - MySQL.query.await('UPDATE `players` SET `metadata` = @metadata WHERE citizenid = @citizenid', {['@metadata'] = json.encode(result), ['@citizenid'] = identifier}) - end -end +local QBCore = exports['qb-core']:GetCoreObject() + +-- Get CitizenIDs from Player License +function GetCitizenID(license) + local result = MySQL.query.await("SELECT citizenid FROM players WHERE license = ?", {license,}) + if result ~= nil then + return result + else + print("Cannot find a CitizenID for License: "..license) + return nil + end +end + +-- (Start) Opening the MDT and sending data +function AddLog(text) + --print(text) + return MySQL.insert.await('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (?,?)', {text, os.time() * 1000}) + -- return exports.oxmysql:execute('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (:text, :time)', { text = text, time = os.time() * 1000 }) +end + +function GetNameFromId(cid) + -- Should be a scalar? + local result = MySQL.scalar.await('SELECT charinfo FROM players WHERE citizenid = @citizenid', { ['@citizenid'] = cid }) + if result ~= nil then + local charinfo = json.decode(result) + local fullname = charinfo['firstname']..' '..charinfo['lastname'] + return fullname + else + --print('Player does not exist') + return nil + end + -- return exports.oxmysql:executeSync('SELECT firstname, lastname FROM `users` WHERE id = :id LIMIT 1', { id = cid }) +end + +-- idk what this is used for either +function GetPersonInformation(cid, jobtype) + local result = MySQL.query.await('SELECT information, tags, gallery, pfp, fingerprint FROM mdt_data WHERE cid = ? and jobtype = ?', { cid, jobtype}) + return result[1] + -- return exports.oxmysql:executeSync('SELECT information, tags, gallery FROM mdt WHERE cid= ? and type = ?', { cid, jobtype }) +end + +function GetPfpFingerPrintInformation(cid) + local result = MySQL.query.await('SELECT pfp, fingerprint FROM mdt_data WHERE cid = ?', { cid }) + return result[1] +end + +-- idk but I guess sure? +function GetIncidentName(id) + -- Should also be a scalar + return MySQL.query.await('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) + -- return exports.oxmysql:executeSync('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) +end + +function GetConvictions(cids) + return MySQL.query.await('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) + -- return exports.oxmysql:executeSync('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) +end + +function GetLicenseInfo(cid) + local result = MySQL.query.await('SELECT * FROM `licenses` WHERE `cid` = ?', { cid }) + return result + -- return exports.oxmysql:executeSync('SELECT * FROM `licenses` WHERE `cid`=:cid', { cid = cid }) +end + +function CreateUser(cid, tableName) + AddLog("A user was created with the CID: "..cid) + -- return exports.oxmysql:insert("INSERT INTO `"..dbname.."` (cid) VALUES (:cid)", { cid = cid }) + return MySQL.insert.await("INSERT INTO `"..tableName.."` (cid) VALUES (:cid)", { cid = cid }) +end + +function GetPlayerVehicles(cid, cb) + return MySQL.query.await('SELECT id, plate, vehicle FROM player_vehicles WHERE citizenid=:cid', { cid = cid }) +end + +function GetBulletins(JobType) + return MySQL.query.await('SELECT * FROM `mdt_bulletin` WHERE `jobtype` = ? LIMIT 10', { JobType }) + -- return exports.oxmysql:executeSync('SELECT * FROM `mdt_bulletin` WHERE `type`= ? LIMIT 10', { JobType }) +end + +function GetPlayerProperties(cid, cb) + local result = MySQL.query.await('SELECT houselocations.label, houselocations.coords FROM player_houses INNER JOIN houselocations ON player_houses.house = houselocations.name where player_houses.citizenid = ?', {cid}) + return result +end + +function GetPlayerDataById(id) + local Player = QBCore.Functions.GetPlayerByCitizenId(id) + if Player ~= nil then + local response = {citizenid = Player.PlayerData.citizenid, charinfo = Player.PlayerData.charinfo, metadata = Player.PlayerData.metadata, job = Player.PlayerData.job} + return response + else + return MySQL.single.await('SELECT citizenid, charinfo, job, metadata FROM players WHERE citizenid = ? LIMIT 1', { id }) + end + + -- return exports.oxmysql:executeSync('SELECT citizenid, charinfo, job FROM players WHERE citizenid = ? LIMIT 1', { id }) +end + +-- Probs also best not to use +--[[ function GetImpoundStatus(vehicleid, cb) + cb( #(exports.oxmysql:executeSync('SELECT id FROM `impound` WHERE `vehicleid`=:vehicleid', {['vehicleid'] = vehicleid })) > 0 ) +end ]] + +function GetBoloStatus(plate) + local result = MySQL.scalar.await('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) + return result + -- return exports.oxmysql:scalarSync('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) +end + +function GetOwnerName(cid) + local result = MySQL.scalar.await('SELECT charinfo FROM `players` WHERE LOWER(`citizenid`) = ? LIMIT 1', {cid}) + return result + -- return exports.oxmysql:scalarSync('SELECT charinfo FROM `players` WHERE id=:cid LIMIT 1', { cid = cid}) +end + +function GetVehicleInformation(plate, cb) + local result = MySQL.query.await('SELECT id, information FROM `mdt_vehicleinfo` WHERE plate=:plate', { plate = plate}) + cb(result) +end + +function GetPlayerApartment(cid, cb) + local result = MySQL.query.await('SELECT name, type, label FROM apartments where citizenid = ?', {cid}) + return result +end + +function GetPlayerLicenses(identifier) + local response = false + local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) + if Player ~= nil then + return Player.PlayerData.metadata.licences + else + local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) + if result ~= nil then + local metadata = json.decode(result) + if metadata["licences"] ~= nil and metadata["licences"] then + return metadata["licences"] + else + return { + ['driver'] = false, + ['business'] = false, + ['weapon'] = false, + ['pilot'] = false + } + end + end + end +end + +function ManageLicense(identifier, type, status) + local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) + local licenseStatus = nil + if status == "give" then licenseStatus = true elseif status == "revoke" then licenseStatus = false end + if Player ~= nil then + local licences = Player.PlayerData.metadata["licences"] + local newLicenses = {} + for k, v in pairs(licences) do + local status = v + if k == type then + status = licenseStatus + end + newLicenses[k] = status + end + Player.Functions.SetMetaData("licences", newLicenses) + else + local licenseType = '$.licences.'..type + local result = MySQL.query.await('UPDATE `players` SET `metadata` = JSON_REPLACE(`metadata`, ?, ?) WHERE `citizenid` = ?', {licenseType, licenseStatus, identifier}) --seems to not work on older MYSQL versions, think about alternative + end +end + +function ManageLicenses(identifier, incomingLicenses) + local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) + if Player ~= nil then + Player.Functions.SetMetaData("licences", incomingLicenses) + + else + local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) + result = json.decode(result) + + result.licences = result.licences or { + ['driver'] = true, + ['business'] = false, + ['weapon'] = false, + ['pilot'] = false + } + + for k, _ in pairs(incomingLicenses) do + result.licences[k] = incomingLicenses[k] + end + MySQL.query.await('UPDATE `players` SET `metadata` = @metadata WHERE citizenid = @citizenid', {['@metadata'] = json.encode(result), ['@citizenid'] = identifier}) + end +end diff --git a/server/utils.lua b/server/utils.lua index ed898fbd..ada7ae8f 100644 --- a/server/utils.lua +++ b/server/utils.lua @@ -1,51 +1,51 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -function GetPlayerData(source) - local Player = QBCore.Functions.GetPlayer(source) - return Player.PlayerData -end - -function UnpackJob(data) - local job = { - name = data.name, - label = data.label - } - local grade = { - name = data.grade.name, - } - - return job, grade -end - -function PermCheck(src, PlayerData) - local result = true - - if not Config.AllowedJobs[PlayerData.job.name] then - print(("UserId: %s(%d) tried to access the mdt even though they are not authorised (server direct)"):format(GetPlayerName(src), src)) - result = false - end - - return result -end - -function ProfPic(gender, profilepic) - if profilepic then return profilepic end; - if gender == "f" then return "img/female.png" end; - return "img/male.png" -end - -function IsJobAllowedToMDT(job) - if Config.PoliceJobs[job] then - return true - elseif Config.AmbulanceJobs[job] then - return true - elseif Config.DojJobs[job] then - return true - else - return false - end -end - -function GetNameFromPlayerData(PlayerData) - return ('%s %s'):format(PlayerData.charinfo.firstname, PlayerData.charinfo.lastname) -end +local QBCore = exports['qb-core']:GetCoreObject() + +function GetPlayerData(source) + local Player = QBCore.Functions.GetPlayer(source) + return Player.PlayerData +end + +function UnpackJob(data) + local job = { + name = data.name, + label = data.label + } + local grade = { + name = data.grade.name, + } + + return job, grade +end + +function PermCheck(src, PlayerData) + local result = true + + if not Config.AllowedJobs[PlayerData.job.name] then + print(("UserId: %s(%d) tried to access the mdt even though they are not authorised (server direct)"):format(GetPlayerName(src), src)) + result = false + end + + return result +end + +function ProfPic(gender, profilepic) + if profilepic then return profilepic end; + if gender == "f" then return "img/female.png" end; + return "img/male.png" +end + +function IsJobAllowedToMDT(job) + if Config.PoliceJobs[job] then + return true + elseif Config.AmbulanceJobs[job] then + return true + elseif Config.DojJobs[job] then + return true + else + return false + end +end + +function GetNameFromPlayerData(PlayerData) + return ('%s %s'):format(PlayerData.charinfo.firstname, PlayerData.charinfo.lastname) +end diff --git a/shared/config.lua b/shared/config.lua index b44aca89..1fbfa353 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -1,649 +1,649 @@ -Config = Config or {} - -Config.RosterLink = { - ['police'] = '', - ['ambulance'] = '', - ['bcso'] = '', - ['doj'] = '', -} - - -Config.UseWolfknightRadar = false ---[[ -Adds support for Wraith ARS 2X by WolfKnight98 (wk_wars2x) -https://github.com/WolfKnight98/wk_wars2x -To save on unnecessary database queries, in wk_wars2x/config.lua set 'CONFIG.use_sonorancad = true' -This will only check plates of vehicles that have been occupied by a player ---]] - -Config.OnlyShowOnDuty = true - -Config.Fuel = "lj-fuel" -- "LegacyFuel", "lj-fuel" - -Config.PenalCodeTitles = { - [1] = 'OFFENSES AGAINST PERSONS', - [2] = 'OFFENSES INVOLVING THEFT', - [3] = 'OFFENSES INVOLVING FRAUD', - [4] = 'OFFENSES INVOLVING DAMAGE TO PROPERTY', - [5] = 'OFFENSES AGAINST PUBLIC ADMINISTRATION', - [6] = 'OFFENSES AGAINST PUBLIC ORDER', - [7] = 'OFFENSES AGAINST HEALTH AND MORALS', - [8] = 'OFFENSES AGAINST PUBLIC SAFETY', - [9] = 'OFFENSES INVOLVING THE OPERATION OF A VEHICLE', - [10] = 'OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE', -} - -Config.PenalCode = { - [1] = { - [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange', description = 'Insert Charge Description Here'}, - [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange', description = 'Insert Charge Description Here'}, - [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red', description = 'Insert Charge Description Here'}, - [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, - [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, - [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, - [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red', description = 'Insert Charge Description Here'}, - [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red', description = 'Insert Charge Description Here'}, - [10] = {title = 'First Degree Murder', class = 'Felony', id = 'P.C. 1010', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [11] = {title = 'Accessory to First Degree Murder', class = 'Felony', id = 'P.C. 1011', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [12] = {title = 'Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1012', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [13] = {title = 'Attempted Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1013', months = 65, fine = 10000, color = 'red', description = 'Insert Charge Description Here'}, - [14] = {title = 'Accessory to the Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1014', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [15] = {title = 'Unlawful Imprisonment', class = 'Misdemeanor', id = 'P.C. 1015', months = 10, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Kidnapping', class = 'Felony', id = 'P.C. 1016', months = 15, fine = 900, color = 'orange', description = 'Insert Charge Description Here'}, - [17] = {title = 'Accessory to Kidnapping', class = 'Felony', id = 'P.C. 1017', months = 7, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, - [18] = {title = 'Attempted Kidnapping', class = 'Felony', id = 'P.C. 1018', months = 10, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, - [19] = {title = 'Hostage Taking', class = 'Felony', id = 'P.C. 1019', months = 20, fine = 1200, color = 'orange', description = 'Insert Charge Description Here'}, - [20] = {title = 'Accessory to Hostage Taking', class = 'Felony', id = 'P.C. 1020', months = 10, fine = 600, color = 'orange', description = 'Insert Charge Description Here'}, - [21] = {title = 'Unlawful Imprisonment of a Public Servant or Peace Officer.', class = 'Felony', id = 'P.C. 1021', months = 25, fine = 4000, color = 'orange', description = 'Insert Charge Description Here'}, - [22] = {title = 'Criminal Threats', class = 'Misdemeanor', id = 'P.C. 1022', months = 5, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, - [23] = {title = 'Reckless Endangerment', class = 'Misdemeanor', id = 'P.C. 1023', months = 10, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, - [24] = {title = 'Gang Related Shooting', class = 'Felony', id = 'P.C. 1024', months = 30, fine = 2500, color = 'red', description = 'Insert Charge Description Here'}, - [25] = {title = 'Cannibalism', class = 'Felony', id = 'P.C. 1025', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [26] = {title = 'Torture', class = 'Felony', id = 'P.C. 1026', months = 40, fine = 4500, color = 'red', description = 'Insert Charge Description Here'}, - }, - [2] = { - [1] = {title = 'Petty Theft', class = 'Infraction', id = 'P.C. 2001', months = 0, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Grand Theft', class = 'Misdemeanor', id = 'P.C. 2002', months = 10, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Grand Theft Auto A', class = 'Felony', id = 'P.C. 2003', months = 15, fine = 900, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Grand Theft Auto B', class = 'Felony', id = 'P.C. 2004', months = 35, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Carjacking', class = 'Felony', id = 'P.C. 2005', months = 30, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, - [6] = {title = 'Burglary', class = 'Misdemeanor', id = 'P.C. 2006', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Robbery', class = 'Felony', id = 'P.C. 2007', months = 25, fine = 2000, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Accessory to Robbery', class = 'Felony', id = 'P.C. 2008', months = 12, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [9] = {title = 'Attempted Robbery', class = 'Felony', id = 'P.C. 2009', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Armed Robbery', class = 'Felony', id = 'P.C. 2010', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, - [11] = {title = 'Accessory to Armed Robbery', class = 'Felony', id = 'P.C. 2011', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [12] = {title = 'Attempted Armed Robbery', class = 'Felony', id = 'P.C. 2012', months = 25, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [13] = {title = 'Grand Larceny', class = 'Felony', id = 'P.C. 2013', months = 45, fine = 7500, color = 'orange', description = 'Insert Charge Description Here'}, - [14] = {title = 'Leaving Without Paying', class = 'Infraction', id = 'P.C. 2014', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Possession of Nonlegal Currency', class = 'Misdemeanor', id = 'P.C. 2015', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Possession of Government-Issued Items', class = 'Misdemeanor', id = 'P.C. 2016', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [17] = {title = 'Possession of Items Used in the Commission of a Crime', class = 'Misdemeanor', id = 'P.C. 2017', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [18] = {title = 'Sale of Items Used in the Commission of a Crime', class = 'Felony', id = 'P.C. 2018', months = 15, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, - [19] = {title = 'Theft of an Aircraft', class = 'Felony', id = 'P.C. 2019', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - }, - [3] = { - [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange', description = 'Insert Charge Description Here'}, - [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [9] = {title = 'Money Laundering', class = 'Felony', id = 'P.C. 3009', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - }, - [4] = { - [1] = {title = 'Trespassing', class = 'Misdemeanor', id = 'P.C. 4001', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Felony Trespassing', class = 'Felony', id = 'P.C. 4002', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Arson', class = 'Felony', id = 'P.C. 4003', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [4] = {title = 'Vandalism', class = 'Infraction', id = 'P.C. 4004', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Vandalism of Government Property', class = 'Felony', id = 'P.C. 4005', months = 20, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Littering', class = 'Infraction', id = 'P.C. 4006', months = 0, fine = 200, color = 'green', description = 'Insert Charge Description Here'}, - }, - [5] = { - [1] = {title = 'Bribery of a Government Official', class = 'Felony', id = 'P.C. 5001', months = 20, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Anti-Mask Law', class = 'Infraction', id = 'P.C. 5002', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Possession of Contraband in a Government Facility', class = 'Felony', id = 'P.C. 5003', months = 25, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Criminal Possession of Stolen Property', class = 'Misdemeanor', id = 'P.C. 5004', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Escaping', class = 'Felony', id = 'P.C. 5005', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Jailbreak', class = 'Felony', id = 'P.C. 5006', months = 30, fine = 2500, color = 'orange', description = 'Insert Charge Description Here'}, - [7] = {title = 'Accessory to Jailbreak', class = 'Felony', id = 'P.C. 5007', months = 25, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, - [8] = {title = 'Attempted Jailbreak', class = 'Felony', id = 'P.C. 5008', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Perjury', class = 'Felony', id = 'P.C. 5009', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Violation of a Restraining Order', class = 'Felony', id = 'P.C. 5010', months = 20, fine = 2250, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'Embezzlement', class = 'Felony', id = 'P.C. 5011', months = 45, fine = 10000, color = 'green', description = 'Insert Charge Description Here'}, - [12] = {title = 'Unlawful Practice', class = 'Felony', id = 'P.C. 5012', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [13] = {title = 'Misuse of Emergency Systems', class = 'Infraction', id = 'P.C. 5013', months = 0, fine = 600, color = 'orange', description = 'Insert Charge Description Here'}, - [14] = {title = 'Conspiracy', class = 'Misdemeanor', id = 'P.C. 5014', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Violating a Court Order', class = 'Misdemeanor', id = 'P.C. 5015', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, - [16] = {title = 'Failure to Appear', class = 'Misdemeanor', id = 'P.C. 5016', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, - [17] = {title = 'Contempt of Court', class = 'Felony', id = 'P.C. 5017', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, - [18] = {title = 'Resisting Arrest', class = 'Misdemeanor', id = 'P.C. 5018', months = 5, fine = 300, color = 'orange', description = 'Insert Charge Description Here'}, - }, - [6] = { - [1] = {title = 'Disobeying a Peace Officer', class = 'infraction', id = 'P.C. 6001', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Disorderly Conduct', class = 'Infraction', id = 'P.C. 6002', months = 0, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Disturbing the Peace', class = 'infraction', id = 'P.C. 6003', months = 0, fine = 350, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'False Reporting', class = 'Misdemeanor', id = 'P.C. 6004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Harassment', class = 'Misdemeanor', id = 'P.C. 6005', months = 10, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, - [6] = {title = 'Misdemeanor Obstruction of Justice', class = 'Misdemeanor', id = 'P.C. 6006', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Felony Obstruction of Justice', class = 'Felony', id = 'P.C. 6007', months = 15, fine = 900, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Inciting a Riot', class = 'Felony', id = 'P.C. 6008', months = 25, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Loitering on Government Properties', class = 'Infraction', id = 'P.C. 6009', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Tampering', class = 'Misdemeanor', id = 'P.C. 6010', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'Vehicle Tampering', class = 'Misdemeanor', id = 'P.C. 6011', months = 15, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [12] = {title = 'Evidence Tampering', class = 'Felony', id = 'P.C. 6012', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [13] = {title = 'Witness Tampering', class = 'Felony', id = 'P.C. 6013', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, - [14] = {title = 'Failure to Provide Identification', class = 'Misdemeanor', id = 'P.C. 6014', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Vigilantism', class = 'Felony', id = 'P.C. 6015', months = 30, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [16] = {title = 'Unlawful Assembly', class = 'Misdemeanor', id = 'P.C. 6016', months = 10, fine = 750, color = 'orange', description = 'Insert Charge Description Here'}, - [17] = {title = 'Government Corruption', class = 'Felony', id = 'P.C. 6017', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [18] = {title = 'Stalking', class = 'Felony', id = 'P.C. 6018', months = 40, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [19] = {title = 'Aiding and Abetting', class = 'Misdemeanor', id = 'P.C. 6019', months = 15, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, - [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - }, - [7] = { - [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Mask', id = 'P.C. 7001', months = 5, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Felony Possession of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [5] = {title = 'Possession of Marijuana with Intent to Distribute', class = 'Felony', id = 'P.C. 7005', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, - [6] = {title = 'Misdemeanor Possession of Cocaine', class = 'Misdemeanor', id = 'P.C. 7006', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Felony Possession of Cocaine', class = 'Felony', id = 'P.C. 7007', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Possession of Cocaine with Intent to Distribute', class = 'Felony', id = 'P.C. 7008', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Felony Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7012', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [13] = {title = 'Felony Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Felony Possession of Ecstasy', class = 'Felony', id = 'P.C. 7016', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [17] = {title = 'Possession of Ecstasy with Intent to Distribute', class = 'Felony', id = 'P.C. 7017', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [18] = {title = 'Misdemeanor Possession of Opium', class = 'Misdemeanor', id = 'P.C. 7018', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [19] = {title = 'Felony Possession of Opium', class = 'Felony', id = 'P.C. 7019', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [20] = {title = 'Possession of Opium with Intent to Distribute', class = 'Felony', id = 'P.C. 7020', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [21] = {title = 'Misdemeanor Possession of Adderall', class = 'Misdemeanor', id = 'P.C. 7021', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [22] = {title = 'Felony Possession of Adderall', class = 'Felony', id = 'P.C. 7022', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [23] = {title = 'Possession of Adderall with Intent to Distribute', class = 'Felony', id = 'P.C. 7023', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [24] = {title = 'Misdemeanor Possession of Xanax', class = 'Misdemeanor', id = 'P.C. 7024', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [25] = {title = 'Felony Possession of Xanax', class = 'Felony', id = 'P.C. 7025', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [26] = {title = 'Possession of Xanax with Intent to Distribute', class = 'Felony', id = 'P.C. 7026', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [27] = {title = 'Misdemeanor Possession of Shrooms', class = 'Misdemeanor', id = 'P.C. 7027', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [28] = {title = 'Felony Possession of Shrooms', class = 'Felony', id = 'P.C. 7028', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [29] = {title = 'Possession of Shrooms with Intent to Distribute', class = 'Felony', id = 'P.C. 7029', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [30] = {title = 'Misdemeanor Possession of Lean', class = 'Misdemeanor', id = 'P.C. 7030', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [31] = {title = 'Felony Possession of Lean', class = 'Felony', id = 'P.C. 7031', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [32] = {title = 'Possession of Lean with Intent to Distribute', class = 'Felony', id = 'P.C. 7032', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [33] = {title = 'Sale of a controlled substance', class = 'Misdemeanor', id = 'P.C. 7033', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [34] = {title = 'Drug Trafficking', class = 'Felony', id = 'P.C. 7034', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [35] = {title = 'Desecration of a Human Corpse', class = 'Felony', id = 'P.C. 7035', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [36] = {title = 'Public Intoxication', class = 'Infraction', id = 'P.C. 7036', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [37] = {title = 'Public Indecency', class = 'Misdemeanor', id = 'P.C. 7037', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - }, - [8] = { - [1] = {title = 'Criminal Possession of Weapon Class A', class = 'Felony', id = 'P.C. 8001', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Criminal Possession of Weapon Class B', class = 'Felony', id = 'P.C. 8002', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Criminal Possession of Weapon Class C', class = 'Felony', id = 'P.C. 8003', months = 30, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Criminal Possession of Weapon Class D', class = 'Felony', id = 'P.C. 8004', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Criminal Sale of Weapon Class A', class = 'Felony', id = 'P.C. 8005', months = 15, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, - [6] = {title = 'Criminal Sale of Weapon Class B', class = 'Felony', id = 'P.C. 8006', months = 20, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, - [7] = {title = 'Criminal Sale of Weapon Class C', class = 'Felony', id = 'P.C. 8007', months = 35, fine = 7000, color = 'orange', description = 'Insert Charge Description Here'}, - [8] = {title = 'Criminal Sale of Weapon Class D', class = 'Felony', id = 'P.C. 8008', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Criminal Use of Weapon', class = 'Misdemeanor', id = 'P.C. 8009', months = 10, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, - [10] = {title = 'Possession of Illegal Firearm Modifications', class = 'Misdemeanor', id = 'P.C. 8010', months = 10, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'Weapon Trafficking', class = 'Felony', id = 'P.C. 8011', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [12] = {title = 'Brandishing a Weapon', class = 'Misdemeanor', id = 'P.C. 8012', months = 15, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, - [13] = {title = 'Insurrection', class = 'Felony', id = 'P.C. 8013', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [14] = {title = 'Flying into Restricted Airspace', class = 'Felony', id = 'P.C. 8014', months = 20, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Jaywalking', class = 'Infraction', id = 'P.C. 8015', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Criminal Use of Explosives', class = 'Felony', id = 'P.C. 8016', months = 30, fine = 2500, color = 'orange', description = 'Insert Charge Description Here'}, - }, - [9] = { - [1] = {title = 'Driving While Intoxicated', class = 'Misdemeanor', id = 'P.C. 9001', months = 5, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Evading', class = 'Misdemeanor', id = 'P.C. 9002', months = 5, fine = 400, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Reckless Evading', class = 'Felony', id = 'P.C. 9003', months = 10, fine = 800, color = 'orange', description = 'Insert Charge Description Here'}, - [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green', description = 'Insert Charge Description Here'}, - [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, - [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, - [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [20] = {title = 'Driving without Headlights or Signals', class = 'Infraction', id = 'P.C. 9020', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [21] = {title = 'Street Racing', class = 'Felony', id = 'P.C. 9021', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [22] = {title = 'Piloting without Proper Licensing', class = 'Felony', id = 'P.C. 9022', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [23] = {title = 'Unlawful Use of a Motorvehicle', class = 'Misdemeanor', id = 'P.C. 9023', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - }, - [10] = { - [1] = {title = 'Hunting in Restricted Areas', class = 'Infraction', id = 'P.C. 10001', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Unlicensed Hunting', class = 'Infraction', id = 'P.C. 10002', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Animal Cruelty', class = 'Misdemeanor', id = 'P.C. 10003', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Hunting with a Non-Hunting Weapon', class = 'Misdemeanor', id = 'P.C. 10004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Hunting outside of hunting hours', class = 'Infraction', id = 'P.C. 10005', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Overhunting', class = 'Misdemeanor', id = 'P.C. 10006', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Poaching', class = 'Felony', id = 'P.C. 10007', months = 20, fine = 1250, color = 'red', description = 'Insert Charge Description Here'}, - } -} - -Config.PoliceJobs = { - ['police'] = true, - ['lspd'] = true, - ['bcso'] = true, - ['sast'] = true, - ['sasp'] = true, - ['doc'] = true, - ['sapr'] = true, - ['pa'] = true -- yucky -} - -Config.AmbulanceJobs = { - ['ambulance'] = true, - ['doctor'] = true -} - -Config.DojJobs = { - ['lawyer'] = true, - ['judge'] = true -} - --- Leave my hacky code alone ya goblins -Config.AllowedJobs = {} -for index, value in pairs(Config.PoliceJobs) do - Config.AllowedJobs[index] = value -end -for index, value in pairs(Config.AmbulanceJobs) do - Config.AllowedJobs[index] = value -end -for index, value in pairs(Config.DojJobs) do - Config.AllowedJobs[index] = value -end --- Leave my hacky code alone ya goblins - -Config.LogPerms = { - ['ambulance'] = { - [4] = true, - }, - ['police'] = { - [4] = true, - }, -} - -Config.ColorNames = { - [0] = "Metallic Black", - [1] = "Metallic Graphite Black", - [2] = "Metallic Black Steel", - [3] = "Metallic Dark Silver", - [4] = "Metallic Silver", - [5] = "Metallic Blue Silver", - [6] = "Metallic Steel Gray", - [7] = "Metallic Shadow Silver", - [8] = "Metallic Stone Silver", - [9] = "Metallic Midnight Silver", - [10] = "Metallic Gun Metal", - [11] = "Metallic Anthracite Grey", - [12] = "Matte Black", - [13] = "Matte Gray", - [14] = "Matte Light Grey", - [15] = "Util Black", - [16] = "Util Black Poly", - [17] = "Util Dark silver", - [18] = "Util Silver", - [19] = "Util Gun Metal", - [20] = "Util Shadow Silver", - [21] = "Worn Black", - [22] = "Worn Graphite", - [23] = "Worn Silver Grey", - [24] = "Worn Silver", - [25] = "Worn Blue Silver", - [26] = "Worn Shadow Silver", - [27] = "Metallic Red", - [28] = "Metallic Torino Red", - [29] = "Metallic Formula Red", - [30] = "Metallic Blaze Red", - [31] = "Metallic Graceful Red", - [32] = "Metallic Garnet Red", - [33] = "Metallic Desert Red", - [34] = "Metallic Cabernet Red", - [35] = "Metallic Candy Red", - [36] = "Metallic Sunrise Orange", - [37] = "Metallic Classic Gold", - [38] = "Metallic Orange", - [39] = "Matte Red", - [40] = "Matte Dark Red", - [41] = "Matte Orange", - [42] = "Matte Yellow", - [43] = "Util Red", - [44] = "Util Bright Red", - [45] = "Util Garnet Red", - [46] = "Worn Red", - [47] = "Worn Golden Red", - [48] = "Worn Dark Red", - [49] = "Metallic Dark Green", - [50] = "Metallic Racing Green", - [51] = "Metallic Sea Green", - [52] = "Metallic Olive Green", - [53] = "Metallic Green", - [54] = "Metallic Gasoline Blue Green", - [55] = "Matte Lime Green", - [56] = "Util Dark Green", - [57] = "Util Green", - [58] = "Worn Dark Green", - [59] = "Worn Green", - [60] = "Worn Sea Wash", - [61] = "Metallic Midnight Blue", - [62] = "Metallic Dark Blue", - [63] = "Metallic Saxony Blue", - [64] = "Metallic Blue", - [65] = "Metallic Mariner Blue", - [66] = "Metallic Harbor Blue", - [67] = "Metallic Diamond Blue", - [68] = "Metallic Surf Blue", - [69] = "Metallic Nautical Blue", - [70] = "Metallic Bright Blue", - [71] = "Metallic Purple Blue", - [72] = "Metallic Spinnaker Blue", - [73] = "Metallic Ultra Blue", - [74] = "Metallic Bright Blue", - [75] = "Util Dark Blue", - [76] = "Util Midnight Blue", - [77] = "Util Blue", - [78] = "Util Sea Foam Blue", - [79] = "Uil Lightning blue", - [80] = "Util Maui Blue Poly", - [81] = "Util Bright Blue", - [82] = "Matte Dark Blue", - [83] = "Matte Blue", - [84] = "Matte Midnight Blue", - [85] = "Worn Dark blue", - [86] = "Worn Blue", - [87] = "Worn Light blue", - [88] = "Metallic Taxi Yellow", - [89] = "Metallic Race Yellow", - [90] = "Metallic Bronze", - [91] = "Metallic Yellow Bird", - [92] = "Metallic Lime", - [93] = "Metallic Champagne", - [94] = "Metallic Pueblo Beige", - [95] = "Metallic Dark Ivory", - [96] = "Metallic Choco Brown", - [97] = "Metallic Golden Brown", - [98] = "Metallic Light Brown", - [99] = "Metallic Straw Beige", - [100] = "Metallic Moss Brown", - [101] = "Metallic Biston Brown", - [102] = "Metallic Beechwood", - [103] = "Metallic Dark Beechwood", - [104] = "Metallic Choco Orange", - [105] = "Metallic Beach Sand", - [106] = "Metallic Sun Bleeched Sand", - [107] = "Metallic Cream", - [108] = "Util Brown", - [109] = "Util Medium Brown", - [110] = "Util Light Brown", - [111] = "Metallic White", - [112] = "Metallic Frost White", - [113] = "Worn Honey Beige", - [114] = "Worn Brown", - [115] = "Worn Dark Brown", - [116] = "Worn straw beige", - [117] = "Brushed Steel", - [118] = "Brushed Black steel", - [119] = "Brushed Aluminium", - [120] = "Chrome", - [121] = "Worn Off White", - [122] = "Util Off White", - [123] = "Worn Orange", - [124] = "Worn Light Orange", - [125] = "Metallic Securicor Green", - [126] = "Worn Taxi Yellow", - [127] = "police car blue", - [128] = "Matte Green", - [129] = "Matte Brown", - [130] = "Worn Orange", - [131] = "Matte White", - [132] = "Worn White", - [133] = "Worn Olive Army Green", - [134] = "Pure White", - [135] = "Hot Pink", - [136] = "Salmon pink", - [137] = "Metallic Vermillion Pink", - [138] = "Orange", - [139] = "Green", - [140] = "Blue", - [141] = "Mettalic Black Blue", - [142] = "Metallic Black Purple", - [143] = "Metallic Black Red", - [144] = "Hunter Green", - [145] = "Metallic Purple", - [146] = "Metaillic V Dark Blue", - [147] = "MODSHOP BLACK1", - [148] = "Matte Purple", - [149] = "Matte Dark Purple", - [150] = "Metallic Lava Red", - [151] = "Matte Forest Green", - [152] = "Matte Olive Drab", - [153] = "Matte Desert Brown", - [154] = "Matte Desert Tan", - [155] = "Matte Foilage Green", - [156] = "DEFAULT ALLOY COLOR", - [157] = "Epsilon Blue", - [158] = "Unknown", -} - -Config.ColorInformation = { - [0] = "black", - [1] = "black", - [2] = "black", - [3] = "darksilver", - [4] = "silver", - [5] = "bluesilver", - [6] = "silver", - [7] = "darksilver", - [8] = "silver", - [9] = "bluesilver", - [10] = "darksilver", - [11] = "darksilver", - [12] = "matteblack", - [13] = "gray", - [14] = "lightgray", - [15] = "black", - [16] = "black", - [17] = "darksilver", - [18] = "silver", - [19] = "utilgunmetal", - [20] = "silver", - [21] = "black", - [22] = "black", - [23] = "darksilver", - [24] = "silver", - [25] = "bluesilver", - [26] = "darksilver", - [27] = "red", - [28] = "torinored", - [29] = "formulared", - [30] = "blazered", - [31] = "gracefulred", - [32] = "garnetred", - [33] = "desertred", - [34] = "cabernetred", - [35] = "candyred", - [36] = "orange", - [37] = "gold", - [38] = "orange", - [39] = "red", - [40] = "mattedarkred", - [41] = "orange", - [42] = "matteyellow", - [43] = "red", - [44] = "brightred", - [45] = "garnetred", - [46] = "red", - [47] = "red", - [48] = "darkred", - [49] = "darkgreen", - [50] = "racingreen", - [51] = "seagreen", - [52] = "olivegreen", - [53] = "green", - [54] = "gasolinebluegreen", - [55] = "mattelimegreen", - [56] = "darkgreen", - [57] = "green", - [58] = "darkgreen", - [59] = "green", - [60] = "seawash", - [61] = "midnightblue", - [62] = "darkblue", - [63] = "saxonyblue", - [64] = "blue", - [65] = "blue", - [66] = "blue", - [67] = "diamondblue", - [68] = "blue", - [69] = "blue", - [70] = "brightblue", - [71] = "purpleblue", - [72] = "blue", - [73] = "ultrablue", - [74] = "brightblue", - [75] = "darkblue", - [76] = "midnightblue", - [77] = "blue", - [78] = "blue", - [79] = "lightningblue", - [80] = "blue", - [81] = "brightblue", - [82] = "mattedarkblue", - [83] = "matteblue", - [84] = "matteblue", - [85] = "darkblue", - [86] = "blue", - [87] = "lightningblue", - [88] = "yellow", - [89] = "yellow", - [90] = "bronze", - [91] = "yellow", - [92] = "lime", - [93] = "champagne", - [94] = "beige", - [95] = "darkivory", - [96] = "brown", - [97] = "brown", - [98] = "lightbrown", - [99] = "beige", - [100] = "brown", - [101] = "brown", - [102] = "beechwood", - [103] = "beechwood", - [104] = "chocoorange", - [105] = "yellow", - [106] = "yellow", - [107] = "cream", - [108] = "brown", - [109] = "brown", - [110] = "brown", - [111] = "white", - [112] = "white", - [113] = "beige", - [114] = "brown", - [115] = "brown", - [116] = "beige", - [117] = "steel", - [118] = "blacksteel", - [119] = "aluminium", - [120] = "chrome", - [121] = "wornwhite", - [122] = "offwhite", - [123] = "orange", - [124] = "lightorange", - [125] = "green", - [126] = "yellow", - [127] = "blue", - [128] = "green", - [129] = "brown", - [130] = "orange", - [131] = "white", - [132] = "white", - [133] = "darkgreen", - [134] = "white", - [135] = "pink", - [136] = "pink", - [137] = "pink", - [138] = "orange", - [139] = "green", - [140] = "blue", - [141] = "blackblue", - [142] = "blackpurple", - [143] = "blackred", - [144] = "darkgreen", - [145] = "purple", - [146] = "darkblue", - [147] = "black", - [148] = "purple", - [149] = "darkpurple", - [150] = "red", - [151] = "darkgreen", - [152] = "olivedrab", - [153] = "brown", - [154] = "tan", - [155] = "green", - [156] = "silver", - [157] = "blue", - [158] = "black", -} - -Config.ClassList = { - [0] = "Compact", - [1] = "Sedan", - [2] = "SUV", - [3] = "Coupe", - [4] = "Muscle", - [5] = "Sport Classic", - [6] = "Sport", - [7] = "Super", - [8] = "Motorbike", - [9] = "Off-Road", - [10] = "Industrial", - [11] = "Utility", - [12] = "Van", - [13] = "Bike", - [14] = "Boat", - [15] = "Helicopter", - [16] = "Plane", - [17] = "Service", - [18] = "Emergency", - [19] = "Military", - [20] = "Commercial", - [21] = "Train" -} - -function GetJobType(job) - if Config.PoliceJobs[job] then - return 'police' - elseif Config.AmbulanceJobs[job] then - return 'ambulance' - elseif Config.DojJobs[job] then - return 'doj' - else - return nil - end -end - --- this is a hack, because the qb-menu in qb-policejob populates an impound location and passed it through to the event. --- if this impound locations are changed in qb-policejob, they must also be changed here. -Config.ImpoundLocations = { - [1] = vector4(436.68, -1007.42, 27.32, 180.0), - [2] = vector4(-436.14, 5982.63, 31.34, 136.0), -} +Config = Config or {} + +Config.RosterLink = { + ['police'] = '', + ['ambulance'] = '', + ['bcso'] = '', + ['doj'] = '', +} + + +Config.UseWolfknightRadar = false +--[[ +Adds support for Wraith ARS 2X by WolfKnight98 (wk_wars2x) +https://github.com/WolfKnight98/wk_wars2x +To save on unnecessary database queries, in wk_wars2x/config.lua set 'CONFIG.use_sonorancad = true' +This will only check plates of vehicles that have been occupied by a player +--]] + +Config.OnlyShowOnDuty = true + +Config.Fuel = "lj-fuel" -- "LegacyFuel", "lj-fuel" + +Config.PenalCodeTitles = { + [1] = 'OFFENSES AGAINST PERSONS', + [2] = 'OFFENSES INVOLVING THEFT', + [3] = 'OFFENSES INVOLVING FRAUD', + [4] = 'OFFENSES INVOLVING DAMAGE TO PROPERTY', + [5] = 'OFFENSES AGAINST PUBLIC ADMINISTRATION', + [6] = 'OFFENSES AGAINST PUBLIC ORDER', + [7] = 'OFFENSES AGAINST HEALTH AND MORALS', + [8] = 'OFFENSES AGAINST PUBLIC SAFETY', + [9] = 'OFFENSES INVOLVING THE OPERATION OF A VEHICLE', + [10] = 'OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE', +} + +Config.PenalCode = { + [1] = { + [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange', description = 'Insert Charge Description Here'}, + [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange', description = 'Insert Charge Description Here'}, + [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red', description = 'Insert Charge Description Here'}, + [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, + [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, + [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, + [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red', description = 'Insert Charge Description Here'}, + [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red', description = 'Insert Charge Description Here'}, + [10] = {title = 'First Degree Murder', class = 'Felony', id = 'P.C. 1010', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [11] = {title = 'Accessory to First Degree Murder', class = 'Felony', id = 'P.C. 1011', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [12] = {title = 'Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1012', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [13] = {title = 'Attempted Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1013', months = 65, fine = 10000, color = 'red', description = 'Insert Charge Description Here'}, + [14] = {title = 'Accessory to the Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1014', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [15] = {title = 'Unlawful Imprisonment', class = 'Misdemeanor', id = 'P.C. 1015', months = 10, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Kidnapping', class = 'Felony', id = 'P.C. 1016', months = 15, fine = 900, color = 'orange', description = 'Insert Charge Description Here'}, + [17] = {title = 'Accessory to Kidnapping', class = 'Felony', id = 'P.C. 1017', months = 7, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, + [18] = {title = 'Attempted Kidnapping', class = 'Felony', id = 'P.C. 1018', months = 10, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, + [19] = {title = 'Hostage Taking', class = 'Felony', id = 'P.C. 1019', months = 20, fine = 1200, color = 'orange', description = 'Insert Charge Description Here'}, + [20] = {title = 'Accessory to Hostage Taking', class = 'Felony', id = 'P.C. 1020', months = 10, fine = 600, color = 'orange', description = 'Insert Charge Description Here'}, + [21] = {title = 'Unlawful Imprisonment of a Public Servant or Peace Officer.', class = 'Felony', id = 'P.C. 1021', months = 25, fine = 4000, color = 'orange', description = 'Insert Charge Description Here'}, + [22] = {title = 'Criminal Threats', class = 'Misdemeanor', id = 'P.C. 1022', months = 5, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, + [23] = {title = 'Reckless Endangerment', class = 'Misdemeanor', id = 'P.C. 1023', months = 10, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, + [24] = {title = 'Gang Related Shooting', class = 'Felony', id = 'P.C. 1024', months = 30, fine = 2500, color = 'red', description = 'Insert Charge Description Here'}, + [25] = {title = 'Cannibalism', class = 'Felony', id = 'P.C. 1025', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [26] = {title = 'Torture', class = 'Felony', id = 'P.C. 1026', months = 40, fine = 4500, color = 'red', description = 'Insert Charge Description Here'}, + }, + [2] = { + [1] = {title = 'Petty Theft', class = 'Infraction', id = 'P.C. 2001', months = 0, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Grand Theft', class = 'Misdemeanor', id = 'P.C. 2002', months = 10, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Grand Theft Auto A', class = 'Felony', id = 'P.C. 2003', months = 15, fine = 900, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Grand Theft Auto B', class = 'Felony', id = 'P.C. 2004', months = 35, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Carjacking', class = 'Felony', id = 'P.C. 2005', months = 30, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, + [6] = {title = 'Burglary', class = 'Misdemeanor', id = 'P.C. 2006', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Robbery', class = 'Felony', id = 'P.C. 2007', months = 25, fine = 2000, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Accessory to Robbery', class = 'Felony', id = 'P.C. 2008', months = 12, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [9] = {title = 'Attempted Robbery', class = 'Felony', id = 'P.C. 2009', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Armed Robbery', class = 'Felony', id = 'P.C. 2010', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, + [11] = {title = 'Accessory to Armed Robbery', class = 'Felony', id = 'P.C. 2011', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [12] = {title = 'Attempted Armed Robbery', class = 'Felony', id = 'P.C. 2012', months = 25, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [13] = {title = 'Grand Larceny', class = 'Felony', id = 'P.C. 2013', months = 45, fine = 7500, color = 'orange', description = 'Insert Charge Description Here'}, + [14] = {title = 'Leaving Without Paying', class = 'Infraction', id = 'P.C. 2014', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Possession of Nonlegal Currency', class = 'Misdemeanor', id = 'P.C. 2015', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Possession of Government-Issued Items', class = 'Misdemeanor', id = 'P.C. 2016', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [17] = {title = 'Possession of Items Used in the Commission of a Crime', class = 'Misdemeanor', id = 'P.C. 2017', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [18] = {title = 'Sale of Items Used in the Commission of a Crime', class = 'Felony', id = 'P.C. 2018', months = 15, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, + [19] = {title = 'Theft of an Aircraft', class = 'Felony', id = 'P.C. 2019', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + }, + [3] = { + [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange', description = 'Insert Charge Description Here'}, + [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [9] = {title = 'Money Laundering', class = 'Felony', id = 'P.C. 3009', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + }, + [4] = { + [1] = {title = 'Trespassing', class = 'Misdemeanor', id = 'P.C. 4001', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Felony Trespassing', class = 'Felony', id = 'P.C. 4002', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Arson', class = 'Felony', id = 'P.C. 4003', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [4] = {title = 'Vandalism', class = 'Infraction', id = 'P.C. 4004', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Vandalism of Government Property', class = 'Felony', id = 'P.C. 4005', months = 20, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Littering', class = 'Infraction', id = 'P.C. 4006', months = 0, fine = 200, color = 'green', description = 'Insert Charge Description Here'}, + }, + [5] = { + [1] = {title = 'Bribery of a Government Official', class = 'Felony', id = 'P.C. 5001', months = 20, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Anti-Mask Law', class = 'Infraction', id = 'P.C. 5002', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Possession of Contraband in a Government Facility', class = 'Felony', id = 'P.C. 5003', months = 25, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Criminal Possession of Stolen Property', class = 'Misdemeanor', id = 'P.C. 5004', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Escaping', class = 'Felony', id = 'P.C. 5005', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Jailbreak', class = 'Felony', id = 'P.C. 5006', months = 30, fine = 2500, color = 'orange', description = 'Insert Charge Description Here'}, + [7] = {title = 'Accessory to Jailbreak', class = 'Felony', id = 'P.C. 5007', months = 25, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, + [8] = {title = 'Attempted Jailbreak', class = 'Felony', id = 'P.C. 5008', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Perjury', class = 'Felony', id = 'P.C. 5009', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Violation of a Restraining Order', class = 'Felony', id = 'P.C. 5010', months = 20, fine = 2250, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'Embezzlement', class = 'Felony', id = 'P.C. 5011', months = 45, fine = 10000, color = 'green', description = 'Insert Charge Description Here'}, + [12] = {title = 'Unlawful Practice', class = 'Felony', id = 'P.C. 5012', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [13] = {title = 'Misuse of Emergency Systems', class = 'Infraction', id = 'P.C. 5013', months = 0, fine = 600, color = 'orange', description = 'Insert Charge Description Here'}, + [14] = {title = 'Conspiracy', class = 'Misdemeanor', id = 'P.C. 5014', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Violating a Court Order', class = 'Misdemeanor', id = 'P.C. 5015', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, + [16] = {title = 'Failure to Appear', class = 'Misdemeanor', id = 'P.C. 5016', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, + [17] = {title = 'Contempt of Court', class = 'Felony', id = 'P.C. 5017', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, + [18] = {title = 'Resisting Arrest', class = 'Misdemeanor', id = 'P.C. 5018', months = 5, fine = 300, color = 'orange', description = 'Insert Charge Description Here'}, + }, + [6] = { + [1] = {title = 'Disobeying a Peace Officer', class = 'infraction', id = 'P.C. 6001', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Disorderly Conduct', class = 'Infraction', id = 'P.C. 6002', months = 0, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Disturbing the Peace', class = 'infraction', id = 'P.C. 6003', months = 0, fine = 350, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'False Reporting', class = 'Misdemeanor', id = 'P.C. 6004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Harassment', class = 'Misdemeanor', id = 'P.C. 6005', months = 10, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, + [6] = {title = 'Misdemeanor Obstruction of Justice', class = 'Misdemeanor', id = 'P.C. 6006', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Felony Obstruction of Justice', class = 'Felony', id = 'P.C. 6007', months = 15, fine = 900, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Inciting a Riot', class = 'Felony', id = 'P.C. 6008', months = 25, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Loitering on Government Properties', class = 'Infraction', id = 'P.C. 6009', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Tampering', class = 'Misdemeanor', id = 'P.C. 6010', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'Vehicle Tampering', class = 'Misdemeanor', id = 'P.C. 6011', months = 15, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [12] = {title = 'Evidence Tampering', class = 'Felony', id = 'P.C. 6012', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [13] = {title = 'Witness Tampering', class = 'Felony', id = 'P.C. 6013', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, + [14] = {title = 'Failure to Provide Identification', class = 'Misdemeanor', id = 'P.C. 6014', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Vigilantism', class = 'Felony', id = 'P.C. 6015', months = 30, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [16] = {title = 'Unlawful Assembly', class = 'Misdemeanor', id = 'P.C. 6016', months = 10, fine = 750, color = 'orange', description = 'Insert Charge Description Here'}, + [17] = {title = 'Government Corruption', class = 'Felony', id = 'P.C. 6017', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [18] = {title = 'Stalking', class = 'Felony', id = 'P.C. 6018', months = 40, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [19] = {title = 'Aiding and Abetting', class = 'Misdemeanor', id = 'P.C. 6019', months = 15, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, + [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + }, + [7] = { + [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Mask', id = 'P.C. 7001', months = 5, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Felony Possession of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [5] = {title = 'Possession of Marijuana with Intent to Distribute', class = 'Felony', id = 'P.C. 7005', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, + [6] = {title = 'Misdemeanor Possession of Cocaine', class = 'Misdemeanor', id = 'P.C. 7006', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Felony Possession of Cocaine', class = 'Felony', id = 'P.C. 7007', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Possession of Cocaine with Intent to Distribute', class = 'Felony', id = 'P.C. 7008', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Felony Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7012', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [13] = {title = 'Felony Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Felony Possession of Ecstasy', class = 'Felony', id = 'P.C. 7016', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [17] = {title = 'Possession of Ecstasy with Intent to Distribute', class = 'Felony', id = 'P.C. 7017', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [18] = {title = 'Misdemeanor Possession of Opium', class = 'Misdemeanor', id = 'P.C. 7018', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [19] = {title = 'Felony Possession of Opium', class = 'Felony', id = 'P.C. 7019', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [20] = {title = 'Possession of Opium with Intent to Distribute', class = 'Felony', id = 'P.C. 7020', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [21] = {title = 'Misdemeanor Possession of Adderall', class = 'Misdemeanor', id = 'P.C. 7021', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [22] = {title = 'Felony Possession of Adderall', class = 'Felony', id = 'P.C. 7022', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [23] = {title = 'Possession of Adderall with Intent to Distribute', class = 'Felony', id = 'P.C. 7023', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [24] = {title = 'Misdemeanor Possession of Xanax', class = 'Misdemeanor', id = 'P.C. 7024', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [25] = {title = 'Felony Possession of Xanax', class = 'Felony', id = 'P.C. 7025', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [26] = {title = 'Possession of Xanax with Intent to Distribute', class = 'Felony', id = 'P.C. 7026', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [27] = {title = 'Misdemeanor Possession of Shrooms', class = 'Misdemeanor', id = 'P.C. 7027', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [28] = {title = 'Felony Possession of Shrooms', class = 'Felony', id = 'P.C. 7028', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [29] = {title = 'Possession of Shrooms with Intent to Distribute', class = 'Felony', id = 'P.C. 7029', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [30] = {title = 'Misdemeanor Possession of Lean', class = 'Misdemeanor', id = 'P.C. 7030', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [31] = {title = 'Felony Possession of Lean', class = 'Felony', id = 'P.C. 7031', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [32] = {title = 'Possession of Lean with Intent to Distribute', class = 'Felony', id = 'P.C. 7032', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, + [33] = {title = 'Sale of a controlled substance', class = 'Misdemeanor', id = 'P.C. 7033', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [34] = {title = 'Drug Trafficking', class = 'Felony', id = 'P.C. 7034', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [35] = {title = 'Desecration of a Human Corpse', class = 'Felony', id = 'P.C. 7035', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [36] = {title = 'Public Intoxication', class = 'Infraction', id = 'P.C. 7036', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [37] = {title = 'Public Indecency', class = 'Misdemeanor', id = 'P.C. 7037', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + }, + [8] = { + [1] = {title = 'Criminal Possession of Weapon Class A', class = 'Felony', id = 'P.C. 8001', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Criminal Possession of Weapon Class B', class = 'Felony', id = 'P.C. 8002', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Criminal Possession of Weapon Class C', class = 'Felony', id = 'P.C. 8003', months = 30, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Criminal Possession of Weapon Class D', class = 'Felony', id = 'P.C. 8004', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Criminal Sale of Weapon Class A', class = 'Felony', id = 'P.C. 8005', months = 15, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, + [6] = {title = 'Criminal Sale of Weapon Class B', class = 'Felony', id = 'P.C. 8006', months = 20, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, + [7] = {title = 'Criminal Sale of Weapon Class C', class = 'Felony', id = 'P.C. 8007', months = 35, fine = 7000, color = 'orange', description = 'Insert Charge Description Here'}, + [8] = {title = 'Criminal Sale of Weapon Class D', class = 'Felony', id = 'P.C. 8008', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Criminal Use of Weapon', class = 'Misdemeanor', id = 'P.C. 8009', months = 10, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, + [10] = {title = 'Possession of Illegal Firearm Modifications', class = 'Misdemeanor', id = 'P.C. 8010', months = 10, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'Weapon Trafficking', class = 'Felony', id = 'P.C. 8011', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [12] = {title = 'Brandishing a Weapon', class = 'Misdemeanor', id = 'P.C. 8012', months = 15, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, + [13] = {title = 'Insurrection', class = 'Felony', id = 'P.C. 8013', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [14] = {title = 'Flying into Restricted Airspace', class = 'Felony', id = 'P.C. 8014', months = 20, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Jaywalking', class = 'Infraction', id = 'P.C. 8015', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Criminal Use of Explosives', class = 'Felony', id = 'P.C. 8016', months = 30, fine = 2500, color = 'orange', description = 'Insert Charge Description Here'}, + }, + [9] = { + [1] = {title = 'Driving While Intoxicated', class = 'Misdemeanor', id = 'P.C. 9001', months = 5, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Evading', class = 'Misdemeanor', id = 'P.C. 9002', months = 5, fine = 400, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Reckless Evading', class = 'Felony', id = 'P.C. 9003', months = 10, fine = 800, color = 'orange', description = 'Insert Charge Description Here'}, + [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange', description = 'Insert Charge Description Here'}, + [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green', description = 'Insert Charge Description Here'}, + [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green', description = 'Insert Charge Description Here'}, + [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, + [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, + [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, + [20] = {title = 'Driving without Headlights or Signals', class = 'Infraction', id = 'P.C. 9020', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, + [21] = {title = 'Street Racing', class = 'Felony', id = 'P.C. 9021', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, + [22] = {title = 'Piloting without Proper Licensing', class = 'Felony', id = 'P.C. 9022', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, + [23] = {title = 'Unlawful Use of a Motorvehicle', class = 'Misdemeanor', id = 'P.C. 9023', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + }, + [10] = { + [1] = {title = 'Hunting in Restricted Areas', class = 'Infraction', id = 'P.C. 10001', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [2] = {title = 'Unlicensed Hunting', class = 'Infraction', id = 'P.C. 10002', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [3] = {title = 'Animal Cruelty', class = 'Misdemeanor', id = 'P.C. 10003', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, + [4] = {title = 'Hunting with a Non-Hunting Weapon', class = 'Misdemeanor', id = 'P.C. 10004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [5] = {title = 'Hunting outside of hunting hours', class = 'Infraction', id = 'P.C. 10005', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [6] = {title = 'Overhunting', class = 'Misdemeanor', id = 'P.C. 10006', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [7] = {title = 'Poaching', class = 'Felony', id = 'P.C. 10007', months = 20, fine = 1250, color = 'red', description = 'Insert Charge Description Here'}, + } +} + +Config.PoliceJobs = { + ['police'] = true, + ['lspd'] = true, + ['bcso'] = true, + ['sast'] = true, + ['sasp'] = true, + ['doc'] = true, + ['sapr'] = true, + ['pa'] = true -- yucky +} + +Config.AmbulanceJobs = { + ['ambulance'] = true, + ['doctor'] = true +} + +Config.DojJobs = { + ['lawyer'] = true, + ['judge'] = true +} + +-- Leave my hacky code alone ya goblins +Config.AllowedJobs = {} +for index, value in pairs(Config.PoliceJobs) do + Config.AllowedJobs[index] = value +end +for index, value in pairs(Config.AmbulanceJobs) do + Config.AllowedJobs[index] = value +end +for index, value in pairs(Config.DojJobs) do + Config.AllowedJobs[index] = value +end +-- Leave my hacky code alone ya goblins + +Config.LogPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, +} + +Config.ColorNames = { + [0] = "Metallic Black", + [1] = "Metallic Graphite Black", + [2] = "Metallic Black Steel", + [3] = "Metallic Dark Silver", + [4] = "Metallic Silver", + [5] = "Metallic Blue Silver", + [6] = "Metallic Steel Gray", + [7] = "Metallic Shadow Silver", + [8] = "Metallic Stone Silver", + [9] = "Metallic Midnight Silver", + [10] = "Metallic Gun Metal", + [11] = "Metallic Anthracite Grey", + [12] = "Matte Black", + [13] = "Matte Gray", + [14] = "Matte Light Grey", + [15] = "Util Black", + [16] = "Util Black Poly", + [17] = "Util Dark silver", + [18] = "Util Silver", + [19] = "Util Gun Metal", + [20] = "Util Shadow Silver", + [21] = "Worn Black", + [22] = "Worn Graphite", + [23] = "Worn Silver Grey", + [24] = "Worn Silver", + [25] = "Worn Blue Silver", + [26] = "Worn Shadow Silver", + [27] = "Metallic Red", + [28] = "Metallic Torino Red", + [29] = "Metallic Formula Red", + [30] = "Metallic Blaze Red", + [31] = "Metallic Graceful Red", + [32] = "Metallic Garnet Red", + [33] = "Metallic Desert Red", + [34] = "Metallic Cabernet Red", + [35] = "Metallic Candy Red", + [36] = "Metallic Sunrise Orange", + [37] = "Metallic Classic Gold", + [38] = "Metallic Orange", + [39] = "Matte Red", + [40] = "Matte Dark Red", + [41] = "Matte Orange", + [42] = "Matte Yellow", + [43] = "Util Red", + [44] = "Util Bright Red", + [45] = "Util Garnet Red", + [46] = "Worn Red", + [47] = "Worn Golden Red", + [48] = "Worn Dark Red", + [49] = "Metallic Dark Green", + [50] = "Metallic Racing Green", + [51] = "Metallic Sea Green", + [52] = "Metallic Olive Green", + [53] = "Metallic Green", + [54] = "Metallic Gasoline Blue Green", + [55] = "Matte Lime Green", + [56] = "Util Dark Green", + [57] = "Util Green", + [58] = "Worn Dark Green", + [59] = "Worn Green", + [60] = "Worn Sea Wash", + [61] = "Metallic Midnight Blue", + [62] = "Metallic Dark Blue", + [63] = "Metallic Saxony Blue", + [64] = "Metallic Blue", + [65] = "Metallic Mariner Blue", + [66] = "Metallic Harbor Blue", + [67] = "Metallic Diamond Blue", + [68] = "Metallic Surf Blue", + [69] = "Metallic Nautical Blue", + [70] = "Metallic Bright Blue", + [71] = "Metallic Purple Blue", + [72] = "Metallic Spinnaker Blue", + [73] = "Metallic Ultra Blue", + [74] = "Metallic Bright Blue", + [75] = "Util Dark Blue", + [76] = "Util Midnight Blue", + [77] = "Util Blue", + [78] = "Util Sea Foam Blue", + [79] = "Uil Lightning blue", + [80] = "Util Maui Blue Poly", + [81] = "Util Bright Blue", + [82] = "Matte Dark Blue", + [83] = "Matte Blue", + [84] = "Matte Midnight Blue", + [85] = "Worn Dark blue", + [86] = "Worn Blue", + [87] = "Worn Light blue", + [88] = "Metallic Taxi Yellow", + [89] = "Metallic Race Yellow", + [90] = "Metallic Bronze", + [91] = "Metallic Yellow Bird", + [92] = "Metallic Lime", + [93] = "Metallic Champagne", + [94] = "Metallic Pueblo Beige", + [95] = "Metallic Dark Ivory", + [96] = "Metallic Choco Brown", + [97] = "Metallic Golden Brown", + [98] = "Metallic Light Brown", + [99] = "Metallic Straw Beige", + [100] = "Metallic Moss Brown", + [101] = "Metallic Biston Brown", + [102] = "Metallic Beechwood", + [103] = "Metallic Dark Beechwood", + [104] = "Metallic Choco Orange", + [105] = "Metallic Beach Sand", + [106] = "Metallic Sun Bleeched Sand", + [107] = "Metallic Cream", + [108] = "Util Brown", + [109] = "Util Medium Brown", + [110] = "Util Light Brown", + [111] = "Metallic White", + [112] = "Metallic Frost White", + [113] = "Worn Honey Beige", + [114] = "Worn Brown", + [115] = "Worn Dark Brown", + [116] = "Worn straw beige", + [117] = "Brushed Steel", + [118] = "Brushed Black steel", + [119] = "Brushed Aluminium", + [120] = "Chrome", + [121] = "Worn Off White", + [122] = "Util Off White", + [123] = "Worn Orange", + [124] = "Worn Light Orange", + [125] = "Metallic Securicor Green", + [126] = "Worn Taxi Yellow", + [127] = "police car blue", + [128] = "Matte Green", + [129] = "Matte Brown", + [130] = "Worn Orange", + [131] = "Matte White", + [132] = "Worn White", + [133] = "Worn Olive Army Green", + [134] = "Pure White", + [135] = "Hot Pink", + [136] = "Salmon pink", + [137] = "Metallic Vermillion Pink", + [138] = "Orange", + [139] = "Green", + [140] = "Blue", + [141] = "Mettalic Black Blue", + [142] = "Metallic Black Purple", + [143] = "Metallic Black Red", + [144] = "Hunter Green", + [145] = "Metallic Purple", + [146] = "Metaillic V Dark Blue", + [147] = "MODSHOP BLACK1", + [148] = "Matte Purple", + [149] = "Matte Dark Purple", + [150] = "Metallic Lava Red", + [151] = "Matte Forest Green", + [152] = "Matte Olive Drab", + [153] = "Matte Desert Brown", + [154] = "Matte Desert Tan", + [155] = "Matte Foilage Green", + [156] = "DEFAULT ALLOY COLOR", + [157] = "Epsilon Blue", + [158] = "Unknown", +} + +Config.ColorInformation = { + [0] = "black", + [1] = "black", + [2] = "black", + [3] = "darksilver", + [4] = "silver", + [5] = "bluesilver", + [6] = "silver", + [7] = "darksilver", + [8] = "silver", + [9] = "bluesilver", + [10] = "darksilver", + [11] = "darksilver", + [12] = "matteblack", + [13] = "gray", + [14] = "lightgray", + [15] = "black", + [16] = "black", + [17] = "darksilver", + [18] = "silver", + [19] = "utilgunmetal", + [20] = "silver", + [21] = "black", + [22] = "black", + [23] = "darksilver", + [24] = "silver", + [25] = "bluesilver", + [26] = "darksilver", + [27] = "red", + [28] = "torinored", + [29] = "formulared", + [30] = "blazered", + [31] = "gracefulred", + [32] = "garnetred", + [33] = "desertred", + [34] = "cabernetred", + [35] = "candyred", + [36] = "orange", + [37] = "gold", + [38] = "orange", + [39] = "red", + [40] = "mattedarkred", + [41] = "orange", + [42] = "matteyellow", + [43] = "red", + [44] = "brightred", + [45] = "garnetred", + [46] = "red", + [47] = "red", + [48] = "darkred", + [49] = "darkgreen", + [50] = "racingreen", + [51] = "seagreen", + [52] = "olivegreen", + [53] = "green", + [54] = "gasolinebluegreen", + [55] = "mattelimegreen", + [56] = "darkgreen", + [57] = "green", + [58] = "darkgreen", + [59] = "green", + [60] = "seawash", + [61] = "midnightblue", + [62] = "darkblue", + [63] = "saxonyblue", + [64] = "blue", + [65] = "blue", + [66] = "blue", + [67] = "diamondblue", + [68] = "blue", + [69] = "blue", + [70] = "brightblue", + [71] = "purpleblue", + [72] = "blue", + [73] = "ultrablue", + [74] = "brightblue", + [75] = "darkblue", + [76] = "midnightblue", + [77] = "blue", + [78] = "blue", + [79] = "lightningblue", + [80] = "blue", + [81] = "brightblue", + [82] = "mattedarkblue", + [83] = "matteblue", + [84] = "matteblue", + [85] = "darkblue", + [86] = "blue", + [87] = "lightningblue", + [88] = "yellow", + [89] = "yellow", + [90] = "bronze", + [91] = "yellow", + [92] = "lime", + [93] = "champagne", + [94] = "beige", + [95] = "darkivory", + [96] = "brown", + [97] = "brown", + [98] = "lightbrown", + [99] = "beige", + [100] = "brown", + [101] = "brown", + [102] = "beechwood", + [103] = "beechwood", + [104] = "chocoorange", + [105] = "yellow", + [106] = "yellow", + [107] = "cream", + [108] = "brown", + [109] = "brown", + [110] = "brown", + [111] = "white", + [112] = "white", + [113] = "beige", + [114] = "brown", + [115] = "brown", + [116] = "beige", + [117] = "steel", + [118] = "blacksteel", + [119] = "aluminium", + [120] = "chrome", + [121] = "wornwhite", + [122] = "offwhite", + [123] = "orange", + [124] = "lightorange", + [125] = "green", + [126] = "yellow", + [127] = "blue", + [128] = "green", + [129] = "brown", + [130] = "orange", + [131] = "white", + [132] = "white", + [133] = "darkgreen", + [134] = "white", + [135] = "pink", + [136] = "pink", + [137] = "pink", + [138] = "orange", + [139] = "green", + [140] = "blue", + [141] = "blackblue", + [142] = "blackpurple", + [143] = "blackred", + [144] = "darkgreen", + [145] = "purple", + [146] = "darkblue", + [147] = "black", + [148] = "purple", + [149] = "darkpurple", + [150] = "red", + [151] = "darkgreen", + [152] = "olivedrab", + [153] = "brown", + [154] = "tan", + [155] = "green", + [156] = "silver", + [157] = "blue", + [158] = "black", +} + +Config.ClassList = { + [0] = "Compact", + [1] = "Sedan", + [2] = "SUV", + [3] = "Coupe", + [4] = "Muscle", + [5] = "Sport Classic", + [6] = "Sport", + [7] = "Super", + [8] = "Motorbike", + [9] = "Off-Road", + [10] = "Industrial", + [11] = "Utility", + [12] = "Van", + [13] = "Bike", + [14] = "Boat", + [15] = "Helicopter", + [16] = "Plane", + [17] = "Service", + [18] = "Emergency", + [19] = "Military", + [20] = "Commercial", + [21] = "Train" +} + +function GetJobType(job) + if Config.PoliceJobs[job] then + return 'police' + elseif Config.AmbulanceJobs[job] then + return 'ambulance' + elseif Config.DojJobs[job] then + return 'doj' + else + return nil + end +end + +-- this is a hack, because the qb-menu in qb-policejob populates an impound location and passed it through to the event. +-- if this impound locations are changed in qb-policejob, they must also be changed here. +Config.ImpoundLocations = { + [1] = vector4(436.68, -1007.42, 27.32, 180.0), + [2] = vector4(-436.14, 5982.63, 31.34, 136.0), +} diff --git a/ui/app.js b/ui/app.js index 7ed789f4..f8adef2e 100644 --- a/ui/app.js +++ b/ui/app.js @@ -1,5368 +1,5368 @@ -let canSearchForProfiles = true; -let canSaveProfile = true; -let canRefreshBolo = true; -let canRefreshReports = true; -let canRefreshIncidents = true; -let canSearchForWeapons = true; -let canInputTag = true; -let canInputBoloTag = true; -let canInputBoloOfficerTag = true; -let canSearchReports = true; -let canCreateBulletin = 0; -let mouse_is_inside = false; -let currentTab = ".dashboard-page-container"; -let MyName = ""; -let canInputReportTag = true; -let canInputReportOfficerTag = true; -let canInputReportCivilianTag = true; -let canSearchForVehicles = true; -let canSearchForReports = true; -let canSaveVehicle = true; -let canSaveWeapon = true; -var LastName = ""; -var DispatchNum = 0; -var playerJob = ""; -let rosterLink = ""; - -let impoundChanged = false; - -// TEMP CONFIG OF JOBS -const PoliceJobs = { - ['police']: true, -} - -const AmbulanceJobs = { - ['ambulance']: true, -} - -const DojJobs = { - ['lawyer']: true, - ['judge']: true -} - -const MONTH_NAMES = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December", -]; - -function getFormattedDate(date, prefomattedDate = false, hideYear = false) { - const day = date.getDate(); - const month = MONTH_NAMES[date.getMonth()]; - const year = date.getFullYear(); - const hours = date.getHours(); - let minutes = date.getMinutes(); - - if (minutes < 10) { - minutes = `0${minutes}`; - } - - if (prefomattedDate) { - return `${prefomattedDate} at ${hours}:${minutes}`; - } - - if (hideYear) { - return `${day}. ${month} at ${hours}:${minutes}`; - } - - return `${day}. ${month} ${year}. at ${hours}:${minutes}`; -} - -var quotes = [ - 'Project Sloth On Top!', - 'A Discord rewrite fixes everything.', - 'Does anyone even read these?', -] - -function randomizeQuote() { - return randomQuote = quotes[Math.floor(Math.random() * quotes.length)]; -} - -function timeAgo(dateParam) { - if (!dateParam) { - return null; - } - - const date = - typeof dateParam === "object" ? dateParam : new Date(dateParam); - const DAY_IN_MS = 86400000; - const today = new Date(); - const yesterday = new Date(today - DAY_IN_MS); - const seconds = Math.round((today - date) / 1000); - const minutes = Math.round(seconds / 60); - const isToday = today.toDateString() === date.toDateString(); - const isYesterday = yesterday.toDateString() === date.toDateString(); - const isThisYear = today.getFullYear() === date.getFullYear(); - - if (seconds < 5) { - return "Just Now"; - } else if (seconds < 60) { - return `${seconds} Seconds ago`; - } else if (seconds < 90) { - return "About a minute ago"; - } else if (minutes < 60) { - return `${minutes} Minutes ago`; - } else if (isToday) { - return getFormattedDate(date, "Today"); - } else if (isYesterday) { - return getFormattedDate(date, "Yesterday"); - } else if (isThisYear) { - return getFormattedDate(date, false, true); - } - - return getFormattedDate(date); -} - -$(document).ready(() => { - $(".header").hover( - function () { - $(".close-all").css("opacity", "0.5"); - }, - function () { - $(".close-all").css("opacity", "1"); - } - ); - $(".incidents-charges-title-container").hover( - function () { - $(".incidents-charges-table-container").css("opacity", "0.1"); - $(".close-all").css("filter", "none"); - }, - function () { - $(".close-all").css("filter", "brightness(30%)"); - $(".incidents-charges-table-container").css("opacity", "1"); - } - ); - $(".nav-item").click(function () { - if ($(this).hasClass("active-nav") == false) { - fidgetSpinner($(this).data("page")); - currentTab = $(this).data("page"); - } - }); - - $(".profile-items").on("click", ".profile-item", async function () { - let id = $(this).data("id"); - let result = await $.post( - `https://${GetParentResourceName()}/getProfileData`, - JSON.stringify({ - id: id, - }) - ); - - if (!canInputTag) { - if ($(".tags-add-btn").hasClass("fa-minus")) { - $(".tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".tag-input").remove(); - canInputTag = true; - } - - if ($(".gallery-upload-input").css("display") == "block") { - $(".gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".gallery-upload-input").css("display", "none"); - }, 250); - } - - if ($(".gallery-add-btn").hasClass("fa-minus")) { - $(".gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - - $(".manage-profile-editing-title").html(`You are currently editing ${result["firstname"]} ${result["lastname"]}`); - $(".manage-profile-citizenid-input").val(result['cid']); - $(".manage-profile-name-input-1").val(result["firstname"]); - $(".manage-profile-name-input-2").val(result["lastname"]); - $(".manage-profile-dob-input").val(result["dob"]); - $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); - $(".manage-profile-apartment-input").val(`${result.apartment}`); - $(".manage-profile-url-input").val(result["profilepic"] ?? ""); - $(".manage-profile-info").val(result["mdtinfo"]); - $(".manage-profile-info").removeAttr("disabled"); - $(".manage-profile-fingerprint").val(result["fingerprint"]); - $(".manage-profile-fingerprint").removeAttr("disabled"); - $(".manage-profile-pic").attr("src", result["profilepic"] ?? "img/male.png"); - - const { vehicles, tags, gallery, convictions, properties } = result - - $(".licenses-holder").empty(); - $(".tags-holder").empty(); - $(".vehs-holder").empty(); - $(".gallery-inner-container").empty(); - $(".convictions-holder").empty(); - - let licencesHTML = '
        No Licenses
        '; - let tagsHTML = '
        No Tags
        '; - let convHTML = '
        Clean Record ?
        '; - let vehHTML = '
        No Vehicles
        '; - let galleryHTML = '
        No Photos
        '; - let propertyHTML = '
        No Properties
        '; - - // convert key value pair object of licenses to array - let licenses = Object.entries(result.licences); - - if (licenses.length == 0 || licenses.length == undefined) { - var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; - licenses = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); - } - - if (licenses.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { - licencesHTML = ''; - for (const [lic, hasLic] of licenses) { - - let tagColour = hasLic == true ? "green-tag" : "red-tag"; - licencesHTML += `${titleCase(lic)}`; - } - if (vehicles && vehicles.length > 0) { - - vehHTML = ''; - vehicles.forEach(value => { - vehHTML += `
        ${value.plate} - ${value.model}
        ` - }) - } - if (convictions && convictions.length > 0) { - convHTML = ''; - convictions.forEach(value => { - convHTML += `
        ${value}
        `; - }) - } - if (properties && properties.length > 0) { - propertyHTML = ''; - properties.forEach(value => { - propertyHTML += `
        ${value.label}
        `; - }) - } - } - if (tags && tags.length > 0) { - tagsHTML = ''; - tags.forEach((tag) => { - tagsHTML += `
        ${tag}
        `; - }) - } - - if (gallery && gallery.length > 0) { - galleryHTML = ''; - gallery.forEach(value => { - galleryHTML += ``; - }) - } - - if (result.isLimited) { - $(".manage-profile-vehs-container").fadeOut(250); - $(".manage-profile-houses-container").fadeOut(250); - $(".manage-profile-houses-container").fadeOut(250); - } else { - $(".manage-profile-vehs-container").fadeIn(250); - $(".manage-profile-houses-container").fadeIn(250); - $(".manage-profile-houses-container").fadeIn(250); - } - - $(".licenses-holder").html(licencesHTML); - $(".tags-holder").html(tagsHTML); - $(".convictions-holder").html(convHTML); - $(".vehs-holder").html(vehHTML); - $(".gallery-inner-container").html(galleryHTML); - $(".houses-holder").html(propertyHTML); - }); - //
        ID: ${BulletinId}
        - - $(".bulletin-add-btn").click(function () { - if (canCreateBulletin == 0) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - let BulletinId = Number($(".bulletin-item").first().data("id")) + 1; - if (Number.isNaN(BulletinId)) { - BulletinId = 1; - } - canCreateBulletin = BulletinId; - $(".bulletin-items-continer") - .prepend(`
        - - -
        -
        ${MyName} - Just Now
        -
        -
        `); - } else { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".bulletin-items-continer") - .find("[data-id='" + canCreateBulletin + "']") - .remove(); - canCreateBulletin = 0; - } - }); - //
        ID: ${canCreateBulletin}
        - $(".bulletin-items-continer").on("keydown", ".bulletin-item", function (e) { - if (e.keyCode === 13) { - $(".bulletin-add-btn").removeClass("fa-minus").addClass("fa-plus"); - let id = $(this).find(".bulletin-id").text(); - let date = $(this).find(".bulletin-date").text(); - let title = $(this).find(".bulletin-item-title").text(); - let info = $(this).find(".bulletin-item-info").text(); - let time = new Date(); - $.post( - `https://${GetParentResourceName()}/newBulletin`, - JSON.stringify({ - title: title, - info: info, - time: time.getTime(), - }) - ); - $(".bulletin-items-continer") - .find("[data-id='" + canCreateBulletin + "']") - .remove(); - $(".bulletin-items-continer") - .prepend(`
        -
        ${title}
        -
        ${info}
        -
        - -
        ${MyName} - ${timeAgo( - Number(time.getTime()) - )}
        -
        -
        `); - canCreateBulletin = 0; - } - }); - $(".bulletin-items-continer").on( - "contextmenu", - ".bulletin-item", - function (e) { - let args = [ - { - className: "remove-bulletin", - icon: "fas fa-times", - text: "Remove Item", - info: $(this).data("id"), - status: $(this).data("title"), - }, - ]; - openContextMenu(e, args); - } - ); - $(".contextmenu").on("click", ".remove-bulletin", function () { - let id = $(this).data("info"); - let title = $(this).data("status") - $(".bulletin-items-continer") - .find("[data-id='" + id + "']") - .remove(); - $.post( - `https://${GetParentResourceName()}/deleteBulletin`, - JSON.stringify({ - id: id, - title: title - }) - ); - if (canCreateBulletin == id) { - canCreateBulletin = 0; - } - if ($(".bulletin-add-btn").hasClass("fa-minus")) { - $(".bulletin-add-btn").removeClass("fa-minus").addClass("fa-plus"); - } - }); - $(".associated-incidents-tags-add-btn").on("click", "", function () { - document.addEventListener("mouseup", onMouseDownIcidents); - $(".icidents-person-search-container").fadeIn(250); - $(".close-all").css("filter", "brightness(15%)"); - }); - $(".gallery-add-btn").click(function () { - if ($(".manage-profile-citizenid-input").val()) { - if ($(".gallery-upload-input").css("display") == "none") { - $(".gallery-upload-input").slideDown(250); - $(".gallery-upload-input").css("display", "block"); - $(this).removeClass("fa-plus").addClass("fa-minus"); - } else { - $(".gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".gallery-upload-input").css("display", "none"); - }, 250); - $(this).removeClass("fa-minus").addClass("fa-plus"); - } - } else { - $(this).effect("shake", { times: 2, distance: 2 }, 500); - } - }); - $("#gallery-upload-input").keydown(function (e) { - if (e.keyCode === 13) { - let URL = $("#gallery-upload-input").val(); - let cid = $(".manage-profile-citizenid-input").val(); - if (URL !== "") { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".gallery-inner-container").prepend( - `` - ); - $("#gallery-upload-input").val(""); - $(".gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".gallery-upload-input").css("display", "none"); - }, 250); - $(".gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - } - }); - $(".manage-profile-save").click(function () { - if (canSaveProfile == true) { - canSaveProfile = false; - $(".manage-profile-save").empty(); - $(".manage-profile-save").prepend( - `` - ); - setTimeout(() => { - $(".manage-profile-save").empty(); - $(".manage-profile-save").html("Save"); - canSaveProfile = true; - }, 750); - - setTimeout(() => { - let tags = new Array(); - let gallery = new Array(); - let licenses = {}; - - $(".tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "" && $(this).text() != "No Tags") { - tags.push($(this).text()); - } - }); - - $(".gallery-inner-container") - .find("img") - .each(function () { - if ($(this).attr("src") != "") { - gallery.push($(this).attr("src")); - } - }); - - let pfp = $(".manage-profile-pic").attr("src"); - let newpfp = $(".manage-profile-url-input").val(); - if (newpfp.includes("base64")) { - newpfp = "img/not-found.webp"; - } else { - pfp = newpfp; - } - let description = $(".manage-profile-info").val(); - let fingerprint = $(".manage-profile-fingerprint").val(); - let id = $(".manage-profile-citizenid-input").val(); - - $(".licenses-holder") - .find("span") - .each(function(){ - let type = $(this).data("type") - if ($(this).attr('class').includes('green-tag')){ - licenses[type] = true; - } - else{ - licenses[type] = false; - } - }) - - const fName = $(".manage-profile-name-input-1").val(); - const sName = $(".manage-profile-name-input-2").val(); - - $.post( - `https://${GetParentResourceName()}/saveProfile`, - JSON.stringify({ - pfp: pfp, - description: description, - id: id, - fName: fName, - sName: sName, - tags: tags, - gallery: gallery, - fingerprint: fingerprint, - licenses: licenses - }) - ); - $(".manage-profile-pic").attr("src", newpfp); - }, 250); - } - }); - $(".manage-incidents-title-holder").on( - "click", - ".manage-incidents-save", - function () { - if (canSaveProfile == true) { - canSaveProfile = false; - $(".manage-incidents-save").empty(); - $(".manage-incidents-save").prepend( - `` - ); - setTimeout(() => { - $(".manage-incidents-save").empty(); - $(".manage-incidents-save").prepend( - `` - ); - canSaveProfile = true; - }, 750); - - // Title, information, tags, officers involved, civs involved, evidence - const title = $("#manage-incidents-title-input").val(); - const information = $( - ".manage-incidents-reports-content" - ).val(); - const dbid = $(".manage-incidents-editing-title").data("id"); - - let tags = new Array(); - let officers = new Array(); - let civilians = new Array(); - let evidence = new Array(); - - $(".manage-incidents-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - tags.push($(this).text()); - } - }); - - $(".manage-incidents-officers-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - officers.push($(this).text()); - } - }); - - $(".manage-incidents-civilians-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - civilians.push($(this).text()); - } - }); - - $(".manage-incidents-evidence-holder") - .find("img") - .each(function () { - if ($(this).attr("src") != "") { - evidence.push($(this).attr("src")); - } - }); - - let time = new Date(); - - let associated = new Array(); - - $(".associated-incidents-user-container").each(function ( - index - ) { - var cid = $(this).data("id"); - var guilty = false; - var warrant = false; - var processed = false; - var isassociated = false; - var charges = new Array(); - - $(".associated-incidents-user-tags-holder") - .children("div") - .each(function (index) { - if ($(this).data("id") == cid) { - if ($(this).hasClass("green-tag")) { - if ($(this).text() == "Guilty") { - guilty = true; - } - if ($(this).text() == "Warrant") { - warrant = true; - } - if ($(this).text() == "Processed") { - processed = true; - } - if ($(this).text() == "Associated") { - isassociated = true; - } - } - } - }); - - $(".associated-incidents-user-holder") - .children("div") - .each(function (index) { - if ( - ( $(".associated-incidents-user-holder") - .children() - .eq(index) - .data("id") == cid ) - ) { - charges.push( - $(".associated-incidents-user-holder") - .children() - .eq(index) - .html() - ); - } - }); - - associated.push({ - Cid: $(this).data("id"), - Warrant: warrant, - Guilty: guilty, - Processed: processed, - Isassociated: isassociated, - Charges: charges, - Fine: $(".fine-amount") - .filter("[data-id='" + $(this).data("id") + "']") - .val(), - Sentence: $(".sentence-amount") - .filter("[data-id='" + $(this).data("id") + "']") - .val(), - recfine: $(".fine-recommended-amount") - .filter("[data-id='" + $(this).data("id") + "']") - .val(), - recsentence: $(".sentence-recommended-amount") - .filter("[data-id='" + $(this).data("id") + "']") - .val(), - }); - }); - - $.post( - `https://${GetParentResourceName()}/saveIncident`, - JSON.stringify({ - ID: dbid, - title: title, - information: information, - tags: tags, - officers: officers, - civilians: civilians, - evidence: evidence, - associated: associated, - time: time.getTime(), - }) - ); - - setTimeout(() => { - if (canRefreshIncidents == true) { - canRefreshIncidents = false; - $(".incidents-search-refresh").empty(); - $(".incidents-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".incidents-search-refresh").empty(); - $(".incidents-search-refresh").html("Refresh"); - canRefreshIncidents = true; - $.post( - `https://${GetParentResourceName()}/getAllIncidents`, - JSON.stringify({}) - ); - }, 1500); - } - }, 1000); - } - } - ); - $(".manage-incidents-title-holder").on( - "click", - ".manage-incidents-create", - function () { - let tempalte = - "Summary:\n\n[Insert Report Summary Here]"; - $("#manage-incidents-title-input").val( - "Name - Charge - " + $(".date").html() - ); - $(".manage-incidents-reports-content").val(tempalte); - - $(".manage-incidents-tags-holder").empty(); - $(".manage-incidents-officers-holder").empty(); - $(".manage-incidents-civilians-holder").empty(); - $(".manage-incidents-evidence-holder").empty(); - $(".manage-incidents-title-holder").empty(); - $(".manage-incidents-title-holder").prepend( - ` -
        Manage Incident
        -
        -
        - ` - ); - $(".manage-incidents-title").css("width", "66%"); - $(".manage-incidents-create").css("margin-right", "0px"); - - $(".incidents-ghost-holder").html(""); - $(".associated-incidents-tags-holder").html(""); - - $(".manage-incidents-editing-title").html( - "You are currently creating a new Incident" - ); - $(".manage-incidents-editing-title").data("id", 0); - - $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); - $(".manage-incidents-reports-content").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-officers-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-civilians-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-evidence-add-btn").css( - "pointer-events", - "auto" - ); - $(".associated-incidents-tags-add-btn").css( - "pointer-events", - "auto" - ); - } - ); - $(".tags-add-btn").click(function () { - if ($(".manage-profile-citizenid-input").val()) { - if (canInputTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".tags-holder").prepend( - `` - ); - canInputTag = false; - } else if (!canInputTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-input").remove(); - canInputTag = true; - } - } else { - $(this).effect("shake", { times: 2, distance: 2 }, 500); - } - }); - - $(".tags-holder").on("keydown", ".tag-input", function (e) { - if (e.keyCode === 13) { - addTag($(".tag-input").text()); - if ($(".tags-add-btn").hasClass("fa-minus")) { - $(".tags-add-btn").removeClass("fa-minus").addClass("fa-plus"); - } - $(".tag-input").remove(); - } - }); - $(".contextmenu").on("click", ".search-vehicle", function () { - let plate = $(this).data("info"); - fidgetSpinner(".dmv-page-container"); - currentTab = ".dmv-page-container"; - setTimeout(() => { - $(".dmv-search-input").slideDown(250); - $(".dmv-search-input").css("display", "block"); - setTimeout(() => { - $("#dmv-search-input:text").val(plate.toString()); - setTimeout(() => { - var e = jQuery.Event("keydown"); - e.which = 13; // # Some key code value - e.keyCode = 13 - $("#dmv-search-input").trigger(e); - }, 250); - }, 250); - }, 250); - }); - $(".vehs-holder").on("contextmenu", ".veh-tag", function (e) { - let args = [ - { - className: "search-vehicle", - icon: "fas fa-car", - text: "Search Vehicle", - info: $(this).data("plate"), - status: "", - }, - ]; - openContextMenu(e, args); - }); - - $(".contextmenu").on("click", ".make-waypoint", function () { - let coord = $(this).data("info").split("===") - setTimeout(() => { - $.post( - `https://${GetParentResourceName()}/SetHouseLocation`, - JSON.stringify({ - coord: coord, - }) - ); - }, 250); - }); - $(".houses-holder").on("contextmenu", ".white-tag", function (e) { - let args = [ - { - className: "make-waypoint", - icon: "fas fa-map-pin", - text: "Make Waypoint", - info: $(this).data("location"), - status: "", - }, - ]; - openContextMenu(e, args); - }); - $(".gallery-inner-container").on("click", ".gallery-img", function () { - if ($(this).css("filter") == "none") { - $(this).css("filter", "blur(5px)"); - } else { - $(this).css("filter", "none"); - } - }); - $(".contextmenu").on("click", ".expand-image", function () { - expandImage($(this).data("info")); - }); - $(".contextmenu").on("click", ".remove-image", function () { - removeImage($(this).data("info")); - }); - $(".contextmenu").on("click", ".copy-image-link", function () { - copyImageSource($(this).data("info")); - }); - $(".contextmenu").on("click", ".remove-image-incident", function () { - $(".manage-incidents-evidence-holder img") - .filter("[src='" + $(this).data("info") + "']") - .remove(); - }); - $(".gallery-inner-container").on( - "contextmenu", - ".gallery-img", - function (e) { - let args = [ - { - className: "remove-image", - icon: "fas fa-times", - text: "Remove Image", - info: $(this).attr("src"), - status: "", - }, - { - className: "expand-image", - icon: "fas fa-expand", - text: "Expand Image", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - { - className: "copy-image-link", - icon: "fa-regular fa-copy", - text: "Copy Image Link", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - ]; - openContextMenu(e, args); - } - ); - - $(".licenses-holder").on("contextmenu", ".license-tag", function (e) { - const status = $(this).data("type"); - let type = $(this).html(); - - if (type == "Theory") { - info = "theory"; - } else if (type == "Car") { - info = "drive"; - } else if (type == "Bike") { - info = "drive_bike"; - } else if (type == "Truck") { - info = "drive_truck"; - } else if (type == "Hunting") { - info = "hunting"; - } else if (type == "Pilot") { - info = "pilot"; - } else if (type == "Weapon") { - info = "weapon"; - } else { - info = type; - } - - if ($(this).hasClass("green-tag")) { - openContextMenu(e, [ - { - className: "revoke-licence", - icon: "fas fa-times", - text: "Revoke License", - info: info, - status: status, - }, - ]); - } else if ($(this).hasClass("red-tag")) { - openContextMenu(e, [ - { - className: "give-licence", - icon: "fas fa-check", - text: "Give License", - info: info, - status: status, - }, - ]); - } - }); - - $(".contextmenu").on("click", ".revoke-licence", function () { - // $.post( - // `https://${GetParentResourceName()}/updateLicence`, - // JSON.stringify({ - // cid: $(".manage-profile-citizenid-input").val(), - // type: $(this).data("status"), - // status: "revoke", - // }) - // ); - - const Elem = $(this).data("status"); - $(".license-tag") - .filter(`[data-type="${Elem}"]`) - .removeClass("green-tag") - .addClass("red-tag"); - - onMouseDown(); - }); - - $(".contextmenu").on("click", ".give-licence", function () { - // $.post( - // `https://${GetParentResourceName()}/updateLicence`, - // JSON.stringify({ - // cid: $(".manage-profile-citizenid-input").val(), - // type: $(this).data("status"), - // status: "give", - // }) - // ); - - const Elem = $(this).data("status"); - $(".license-tag") - .filter(`[data-type="${Elem}"]`) - .removeClass("red-tag") - .addClass("green-tag"); - - onMouseDown(); - }); - - $(".profile-title").click(function () { - if (canSearchForProfiles == true) { - if ($(".profile-search-input").css("display") == "none") { - $(".profile-search-input").slideDown(250); - $(".profile-search-input").css("display", "block"); - } else { - $(".profile-search-input").slideUp(250); - setTimeout(() => { - $(".profile-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#profile-search-input").keydown(async function (e) { - if (e.keyCode === 13 && canSearchForProfiles == true) { - let name = $("#profile-search-input").val(); - if (name != "") { - canSearchForProfiles = false; - $(".profile-items").empty(); - $(".profile-items").prepend( - `
        ` - ); - - let result = await $.post( - `https://${GetParentResourceName()}/searchProfiles`, - JSON.stringify({ - name: name, - }) - ); - - searchProfilesResults(result); - } - } - }); - - $(".incidents-title").click(function () { - if (canSearchForProfiles == true) { - if ($(".incidents-search-input").css("display") == "none") { - $(".incidents-search-input").slideDown(250); - $(".incidents-search-input").css("display", "block"); - } else { - $(".incidents-search-input").slideUp(250); - setTimeout(() => { - $(".incidents-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#incidents-search-input").keydown(function (e) { - if (e.keyCode === 13 && canSearchForProfiles == true) { - let incident = $("#incidents-search-input").val(); - if (incident !== "") { - canSearchForProfiles = false; - $.post( - `https://${GetParentResourceName()}/searchIncidents`, - JSON.stringify({ - incident: incident, - }) - ); - $(".incidents-items").empty(); - $(".incidents-items").prepend( - `
        ` - ); - } - } - }); - - $("#dispatchmsg").keydown(function (e) { - const keyCode = e.which || e.keyCode; - if (keyCode === 13 && !e.shiftKey) { - e.preventDefault(); - const time = new Date(); - $.post( - `https://${GetParentResourceName()}/dispatchMessage`, - JSON.stringify({ - message: $(this).val(), - time: time.getTime(), - }) - ); - $(this).val(""); - } - }); - - $(".incidents-items").on("click", ".incidents-item", function () { - const id = $(this).data("id"); - $.post( - `https://${GetParentResourceName()}/getIncidentData`, - JSON.stringify({ - id: id, - }) - ); - }); - $(".manage-incidents-civilians-holder").on("click", ".manage-incidents-civilians", async function () { - const name = $(this).text(); - fidgetSpinner(".profile-page-container"); - currentTab = ".profile-page-container"; - $(".profile-search-input").slideDown(250); - $(".profile-search-input").css("display", "block"); - $("#profile-search-input:text").val(name); - canSearchForProfiles = false; - let result = await $.post( - `https://${GetParentResourceName()}/searchProfiles`, - JSON.stringify({ - name: name, - }) - ); - - searchProfilesResults(result); - } - ); - document.onkeyup = function (data) { - if (data.which == 27) { - let shouldClose = true; - - if ($(".respond-calls-container").css("display") == "block") { - shouldClose = false; - $(".respond-calls-container").fadeOut(500); - setTimeout(() => { - $(".close-all").css("filter", "none"); - }, 250); - } - - if ($(".gallery-image-enlarged").css("display") == "block") { - shouldClose = false; - $(".gallery-image-enlarged").fadeOut(150); - $(".gallery-image-enlarged").css("display", "none"); - $(".close-all").css("filter", "none"); - } - - if ($(".incidents-image-enlarged").css("display") == "block") { - shouldClose = false; - $(".incidents-image-enlarged").fadeOut(150); - $(".incidents-image-enlarged").css("display", "none"); - } - - if ( - $(".icidents-person-search-container").css("display") != "none" - ) { - shouldClose = false; - $(".icidents-person-search-container").fadeOut(250); - $(".close-all").css("filter", "none"); - } - - if ($(".incidents-charges-table").css("display") != "none") { - shouldClose = false; - $(".incidents-charges-table").slideUp(500); - $(".incidents-charges-table").fadeOut(500); - setTimeout(() => { - $(".close-all").css("filter", "none"); - }, 550); - } - - if ($(".dispatch-attached-units").css("display") != "none") { - shouldClose = false; - $(".dispatch-attached-units").slideUp(500); - $(".dispatch-attached-units").fadeOut(500); - setTimeout(() => { - $(".close-all").css("filter", "none"); - }, 550); - } - - if ($(".impound-form").css("display") != "none") { - shouldClose = false; - $(".impound-form").slideUp(250); - $(".impound-form").fadeOut(250); - setTimeout(() => { - $(".close-all").css("filter", "none"); - }, 550); - } - - if (shouldClose == true) { - $.post(`https://${GetParentResourceName()}/escape`, JSON.stringify({})); - } - } - }; - $(".manage-incidents-tags-add-btn").click(function () { - if ($(".tag-incident-input")[0]) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-incident-input").remove(); - } else { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-incidents-tags-holder").prepend( - `` - ); - } - }); - - $(".icidents-person-search-name-input").on("keydown", "", function (e) { - if (e.keyCode === 13) { - let name = $(".icidents-person-search-name-input").val(); - $.post( - `https://${GetParentResourceName()}/incidentSearchPerson`, - JSON.stringify({ - name: name, - }) - ); - } - }); - $(".manage-incidents-tags-holder").on( - "keydown", - ".tag-incident-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-incidents-tags-holder").prepend( - `
        ${$( - ".tag-incident-input" - ).text()}
        ` - ); - // Have it save instantly if it's an existing report. - if ($(".manage-incidents-tags-add-btn").hasClass("fa-minus")) { - $(".manage-incidents-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".tag-incident-input").remove(); - } - } - ); - - $(".manage-incidents-officers-add-btn").click(function () { - if ($(".officers-incident-input")[0]) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".officers-incident-input").remove(); - } else { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-incidents-officers-holder").prepend( - `` - ); - } - }); - - $(".manage-incidents-officers-holder").on( - "keydown", - ".officers-incident-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-incidents-officers-holder").prepend( - `
        ${$( - ".officers-incident-input" - ).text()}
        ` - ); - // Have it save instantly if it's an existing report. - if ( - $(".manage-incidents-officers-add-btn").hasClass("fa-minus") - ) { - $(".manage-incidents-officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".officers-incident-input").remove(); - } - } - ); - - $(".manage-incidents-civilians-add-btn").click(function () { - if ($(".civilians-incident-input")[0]) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".civilians-incident-input").remove(); - } else { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-incidents-civilians-holder").prepend( - `` - ); - } - }); - - $(".manage-incidents-civilians-holder").on( - "keydown", - ".civilians-incident-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-incidents-civilians-holder").prepend( - `
        ${$( - ".civilians-incident-input" - ).text()}
        ` - ); - // Have it save instantly if it's an existing report. - if ( - $(".manage-incidents-civilians-add-btn").hasClass( - "fa-minus" - ) - ) { - $(".manage-incidents-civilians-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".civilians-incident-input").remove(); - } - } - ); - - $(".manage-incidents-evidence-add-btn").click(function () { - if ($(".incidents-upload-input").css("display") == "none") { - $(".incidents-upload-input").slideDown(250); - $(".incidents-upload-input").css("display", "block"); - $(this).removeClass("fa-plus").addClass("fa-minus"); - } else { - $(".incidents-upload-input").slideUp(250); - setTimeout(() => { - $(".incidents-upload-input").css("display", "none"); - }, 250); - $(this).removeClass("fa-minus").addClass("fa-plus"); - } - }); - - $("#incidents-upload-input").keydown(function (e) { - if (e.keyCode === 13) { - let URL = $("#incidents-upload-input").val(); - let cid = $(".manage-profile-citizenid-input").val(); - if (URL !== "") { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".manage-incidents-evidence-holder").prepend( - `` - ); - $("#incidents-upload-input").val(""); - $(".incidents-upload-input").slideUp(250); - setTimeout(() => { - $(".incidents-upload-input").css("display", "none"); - }, 250); - $(".manage-incidents-evidence-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - } - }); - - $(".manage-incidents-evidence-holder").on( - "click", - ".incidents-img", - function () { - if ($(this).css("filter") == "none") { - $(this).css("filter", "blur(5px)"); - } else { - $(this).css("filter", "none"); - } - } - ); - - $(".manage-bolos-title-holder").on( - "click", - ".manage-bolos-new", - function () { - //if ($(".manage-bolos-editing-title").html() == 'You are currently creating a new BOLO') { - //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) - //} else { - var template = ""; - if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - template = - "ICU Room #: [ # ]\n\nReport ID: [ Report ID ]\n\nTime Admitted: [ Date and Time Here ]\n\nSurgery: [Yes/No]\n\nInjuries/Ailments:\n - [ Enter List Of Injuries Here ]\n\n\nAdditional Attending:\n - [ List Any Other Staff Here ]\n\n\n🧑‍🤝‍🧑 Additional Emergency Contacts:\n - [ Name And Number ]\n\n\nNotes:\n[Additional Notes Here]"; - } - $(".manage-bolos-editing-title").html( - "You are currently creating a new BOLO" - ); - $(".manage-bolos-input-title").val(""); - $(".manage-bolos-input-plate").val(""); - $(".manage-bolos-input-owner").val(""); - $(".manage-bolos-input-individual").val(""); - $(".manage-bolos-reports-content").val(template); - $(".manage-bolos-tags-holder").empty(); - $(".bolo-gallery-inner-container").empty(); - $(".manage-officers-tags-holder").empty(); - - if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { - $(".manage-bolos-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".bolo-gallery-add-btn").hasClass("fa-minus")) { - $(".bolo-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".officers-add-btn").hasClass("fa-minus")) { - $(".officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - - if ($(".bolo-gallery-upload-input").css("display") == "block") { - $(".bolo-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".bolo-gallery-upload-input").css("display", "none"); - }, 250); - } - - canInputTag = true; - canInputBoloTag = true; - canInputBoloOfficerTag = true; - - $(".tag-bolo-input").remove(); - canInputBoloTag = true; - - //} - } - ); - - $(".manage-bolos-title-holder").on( - "click", - ".manage-bolos-save", - function () { - let existing = !( - $(".manage-bolos-editing-title").html() == - "You are currently creating a new BOLO" - ); - let id = $(".manage-bolos-editing-title").data("id"); - let title = $("#bolotitle").val(); - let plate = $("#boloplate").val(); - let owner = $("#boloowner").val(); - let individual = $("#boloindividual").val(); - let detail = $("#bolodetail").val(); - - let tags = new Array(); - let gallery = new Array(); - let officers = new Array(); - - $(".manage-bolos-tags-holder").each(function (index) { - if ($(this).text() != "") { - tags.push($(this).text()); - } - }); - - $(".bolo-gallery-inner-container") - .find("img") - .each(function () { - if ($(this).attr("src") != "") { - gallery.push($(this).attr("src")); - } - }); - - $(".manage-officers-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - officers.push($(this).text()); - } - }); - - let time = new Date(); - - $.post( - `https://${GetParentResourceName()}/newBolo`, - JSON.stringify({ - existing: existing, - id: id, - title: title, - plate: plate, - owner: owner, - individual: individual, - detail: detail, - tags: tags, - gallery: gallery, - officers: officers, - time: time.getTime(), - }) - ); - } - ); - - $(".manage-incidents-evidence-holder").on( - "contextmenu", - ".incidents-img", - function (e) { - let args = [ - { - className: "remove-image-incident", - icon: "fas fa-times", - text: "Remove Image", - info: $(this).attr("src"), - status: "", - }, - { - className: "expand-image", - icon: "fas fa-expand", - text: "Expand Image", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - { - className: "copy-image-link", - icon: "fa-regular fa-copy", - text: "Copy Image Link", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - ]; - openContextMenu(e, args); - } - ); - - $(".bolos-search-title").click(function () { - if (canSearchForProfiles == true) { - if ($(".bolos-search-input").css("display") == "none") { - $(".bolos-search-input").slideDown(250); - $(".bolos-search-input").css("display", "block"); - } else { - $(".bolos-search-input").slideUp(250); - setTimeout(() => { - $(".bolos-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#bolos-search-input").keydown(function (e) { - if (e.keyCode === 13 && canSearchForProfiles == true) { - let searchVal = $("#bolos-search-input").val(); - if (searchVal !== "") { - canSearchForProfiles = false; - $.post( - `https://${GetParentResourceName()}/searchBolos`, - JSON.stringify({ - searchVal: searchVal, - }) - ); - $(".bolos-items").empty(); - $(".bolos-items").prepend(`
        `); - } - } - }); - - $(".bolos-search-refresh").click(function () { - if (canRefreshBolo == true) { - canRefreshBolo = false; - $(".bolos-search-refresh").empty(); - $(".bolos-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".bolos-search-refresh").empty(); - $(".bolos-search-refresh").html("Refresh"); - canRefreshBolo = true; - $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); - }, 1500); - } - }); - - $(".manage-bolos-tags-add-btn").click(function () { - if (canInputBoloTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-bolos-tags-holder").prepend( - `` - ); - canInputBoloTag = false; - } else if (!canInputBoloTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-bolo-input").remove(); - canInputBoloTag = true; - } - }); - - $(".manage-bolos-tags-holder").on( - "keydown", - ".tag-bolo-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-bolos-tags-holder").prepend( - `
        ${$(".tag-bolo-input").text()}
        ` - ); - // Have it save instantly if it's an existing report. - if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { - $(".manage-bolos-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".tag-bolo-input").remove(); - canInputBoloTag = true; - } - } - ); - - $(".bolo-gallery-add-btn").click(function () { - //if ($(".manage-profile-citizenid-input").val()) { - if ($(".bolo-gallery-upload-input").css("display") == "none") { - $(".bolo-gallery-upload-input").slideDown(250); - $(".bolo-gallery-upload-input").css("display", "block"); - $(this).removeClass("fa-plus").addClass("fa-minus"); - } else { - $(".bolo-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".bolo-gallery-upload-input").css("display", "none"); - }, 250); - $(this).removeClass("fa-minus").addClass("fa-plus"); - } - //} else { - // $(this).effect("shake", { times: 2, distance: 2 }, 500) - // } - }); - - $("#bolo-gallery-upload-input").keydown(function (e) { - if (e.keyCode === 13) { - let URL = $("#bolo-gallery-upload-input").val(); - let cid = $(".manage-profile-citizenid-input").val(); - if (URL !== "") { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".bolo-gallery-inner-container").prepend( - `` - ); - $("#bolo-gallery-upload-input").val(""); - $(".bolo-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".bolo-gallery-upload-input").css("display", "none"); - }, 250); - $(".bolo-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - } - }); - - $(".bolos-items").on("click", ".bolo-item", function () { - if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { - $(".manage-bolos-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".bolo-gallery-add-btn").hasClass("fa-minus")) { - $(".bolo-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".officers-add-btn").hasClass("fa-minus")) { - $(".officers-add-btn").removeClass("fa-minus").addClass("fa-plus"); - } - - if ($(".bolo-gallery-upload-input").css("display") == "block") { - $(".bolo-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".bolo-gallery-upload-input").css("display", "none"); - }, 250); - } - - canInputTag = true; - canInputBoloTag = true; - canInputBoloOfficerTag = true; - let id = $(this).data("id"); - $.post( - `https://${GetParentResourceName()}/getBoloData`, - JSON.stringify({ - id: id, - }) - ); - }); - - $(".contextmenu").on("click", ".bolo-delete", function () { - if ($(this).data("info") != 0) { - if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - $(".bolos-items") - .find("[data-id='" + $(this).data("info") + "']") - .remove(); - $.post( - `https://${GetParentResourceName()}/deleteICU`, - JSON.stringify({ - id: $(this).data("info"), - }) - ); - } - $(".bolos-items") - .find("[data-id='" + $(this).data("info") + "']") - .remove(); - $.post( - `https://${GetParentResourceName()}/deleteBolo`, - JSON.stringify({ - id: $(this).data("info"), - }) - ); - } - }); - - $(".bolos-items").on("contextmenu", ".bolo-item", function (e) { - var args = ""; - args = [ - { - className: "bolo-delete", - icon: "fas fa-times", - text: "Delete Bolo", - info: $(this).data("id"), - status: "", - }, - ]; - if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - args = [ - { - className: "bolo-delete", - icon: "fas fa-times", - text: "Delete Check-In", - info: $(this).data("id"), - status: "", - }, - ]; - } - openContextMenu(e, args); - }); - $(".incidents-ghost-holder").on( - "contextmenu", - ".associated-incidents-user-holder", - function (e) { - let args = [ - { - className: "add-charge", - icon: "fas fa-check", - text: "Modify Charges", - info: $(this).data("name"), - status: "", - }, - ]; - openContextMenu(e, args); - } - ); - $(".contextmenu").on("click", ".add-charge", function () { - let stupidasscid = $(this).data("info"); - $(".incidents-charges-table").slideDown(500); - $(".incidents-charges-table").fadeIn(500); - $("#current-charges-holder").data("cid", $(this).data("info")); - $("#current-charges-holder").html(""); - $(".associated-incidents-user-holder") - .children("div") - .each(function (index) { - if ( - $(".associated-incidents-user-holder") - .children() - .eq(index) - .data("id") == stupidasscid - ) { - const randomNum = Math.ceil( - Math.random() * 1000 - ).toString(); - $("#current-charges-holder").prepend( - `
        ${$( - ".associated-incidents-user-holder" - ) - .children() - .eq(index) - .html()}
        ` - ); - } - }); - setTimeout(() => { - $(".close-all").css("filter", "brightness(30%)"); - }, 250); - $.post(`https://${GetParentResourceName()}/getPenalCode`, JSON.stringify({})); - }); - - var shiftPressed = false; - $(document).keydown(function (event) { - shiftPressed = event.keyCode == 16; - }); - $(document).keyup(function (event) { - if (event.keyCode == 16) { - shiftPressed = false; - } - }); - - $(".offenses-main-container").on("mousedown",".offense-item",function (e) { - const cid = $("#current-charges-holder").data("cid"); - const newItem = $(this).find(".offense-item-offense").html(); - const Fine = +$(this).data("fine"); - const Sentence = +$(this).data("sentence"); - if (e.which == 1) { - let randomNum = Math.ceil(Math.random() * 1000).toString(); - $(`[data-name="${cid}"]`).prepend(`
        ${$(this).find(".offense-item-offense").html()}
        `); - $("#current-charges-holder").prepend(`
        ${$(this).find(".offense-item-offense").html()}
        `); - - const CurrRfine = $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(); - const NewFine = +CurrRfine + +Fine; - $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(NewFine); - - const CurrRsentence = $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(); - const NewSentence = +CurrRsentence + +Sentence; - $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(NewSentence); - - } else if (e.which == 3) { - $(".associated-incidents-user-holder").children("div").each(function (index) { - if ($(".associated-incidents-user-holder").children().eq(index).data("id") == cid) { - if ($(".associated-incidents-user-holder").children().eq(index).html() == newItem) { - const linkedId = $(".associated-incidents-user-holder").children().eq(index).data("link"); - //$(".current-charges-tag").filter(`[data-link="${linkedId}"]`).remove() - $(".white-tag").filter(`[data-link="${linkedId}"]`).remove(); - - var stop = false; - - $("#current-charges-holder").children("div").each(function (index) { - if (stop == false) { - if ($("#current-charges-holder").children().eq(index).html() == newItem) { - const linkedId = $("#current-charges-holder").children().eq(index).data("link"); - $(".current-charges-tag").filter(`[data-link="${linkedId}"]`).remove(); - stop = true; - } - } - }); - - const CurrRfine = $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(); - const NewFine = +CurrRfine - Fine; - $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(NewFine); - - const CurrRsentence = $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(); - const NewSentence = +CurrRsentence - +Sentence; - $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(NewSentence); - return false; - } - } - }); - } - } - ); - - var timeout; - $(".offenses-main-container").on("mouseenter",".offense-item",function (e) { - var descr = $(this).data("descr") - timeout = setTimeout(function() { - let args = [ - { - className: "incidents-remove-tag", - text: "Remove Tag", - info: descr, - status: "", - }, - ]; - openChargesContextMenu(e, args); - }, 500); - }); - - $(".offenses-main-container").on("mouseleave",".offense-item",function (e) { - clearTimeout(timeout) - hideChargesMenu(); - }); - - $(".bolo-gallery-inner-container").on("click", ".bolo-img", function () { - if ($(this).css("filter") == "none") { - $(this).css("filter", "blur(5px)"); - } else { - $(this).css("filter", "none"); - } - }); - $(".contextmenu").on("click", ".bolo-remove-image", function () { - $(".bolo-gallery-inner-container img") - .filter("[src='" + $(this).data("info") + "']") - .remove(); - }); - $(".bolo-gallery-inner-container").on( - "contextmenu", - ".bolo-img", - function (e) { - let args = [ - { - className: "bolo-remove-image", - icon: "fas fa-times", - text: "Remove Image", - info: $(this).attr("src"), - status: "", - }, - { - className: "expand-image", - icon: "fas fa-expand", - text: "Expand Image", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - { - className: "copy-image-link", - icon: "fa-regular fa-copy", - text: "Copy Image Link", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - ]; - openContextMenu(e, args); - } - ); - - $(".officers-add-btn").click(function () { - if (canInputBoloOfficerTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-officers-tags-holder").prepend( - `` - ); - canInputBoloOfficerTag = false; - } else if (!canInputBoloOfficerTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".officer-tag-bolo-input").remove(); - canInputBoloOfficerTag = true; - } - }); - - $(".manage-officers-tags-holder").on( - "keydown", - ".officer-tag-bolo-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-officers-tags-holder").prepend( - `
        ${$( - ".officer-tag-bolo-input" - ).text()}
        ` - ); - // Have it save instantly if it's an existing report. - if ($(".officers-add-btn").hasClass("fa-minus")) { - canInputBoloOfficerTag = true; - $(".officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - canInputBoloOfficerTag = true; - $(".officer-tag-bolo-input").remove(); - } - } - ); - $(".incidents-ghost-holder").on( - "click", - ".associated-incidents-user-tag", - function () { - if ($(this).hasClass("red-tag")) { - $(this).removeClass("red-tag"); - $(this).addClass("green-tag"); - if ($(this).text() == "Associated") { - $(".associated-incidents-user-holder") - .filter(`[data-name="${$(this).data("id")}"]`) - .css("display", "none"); - $(".associated-incidents-fine-input") - .filter(`[data-id="${$(this).data("id")}"]`) - .css("display", "none"); - $(".manage-incidents-title-tag") - .filter(`[data-id="${$(this).data("id")}"]`) - .css("display", "none"); - $(".associated-incidents-sentence-input") - .filter(`[data-id="${$(this).data("id")}"]`) - .css("display", "none"); - } - } else { - $(this).removeClass("green-tag"); - $(this).addClass("red-tag"); - if ($(this).text() == "Associated") { - $(".associated-incidents-user-holder") - .filter(`[data-name="${$(this).data("id")}"]`) - .fadeIn(100); - $(".associated-incidents-fine-input") - .filter(`[data-id="${$(this).data("id")}"]`) - .fadeIn(100); - $(".manage-incidents-title-tag") - .filter(`[data-id="${$(this).data("id")}"]`) - .fadeIn(100); - $(".associated-incidents-sentence-input") - .filter(`[data-id="${$(this).data("id")}"]`) - .fadeIn(100); - } - } - } - ); - $(".contextmenu").on( - "click", - ".associated-incidents-remove-tag", - function () { - $( - `.associated-incidents-tag:contains(${$(this).data("info")})` - ).remove(); - $( - `.associated-incidents-user-title:contains(${$(this).data( - "info" - )})` - ) - .parent() - .remove(); - const incidentId = $(".manage-incidents-editing-title").data("id"); - if (incidentId != 0) { - $.post( - `https://${GetParentResourceName()}/removeIncidentCriminal`, - JSON.stringify({ - cid: $(this).data("status"), - incidentId: incidentId, - }) - ); - } - } - ); - $(".associated-incidents-tags-holder").on( - "contextmenu", - ".associated-incidents-tag", - function (e) { - let args = [ - { - className: "associated-incidents-remove-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: $(this).data("id"), - }, - ]; - openContextMenu(e, args); - } - ); - $(".icidents-person-search-holder").on( - "click", - ".icidents-person-search-item", - function () { - $(".icidents-person-search-container").fadeOut(250); - $(".close-all").css("filter", "none"); - $(".associated-incidents-tags-holder").prepend( - `
        ${$(this).data("name")}
        ` - ); - - $(".incidents-ghost-holder").prepend( - ` -
        -
        ${$(this).data( - "info" - )}
        -
        -
        Warrant
        -
        Guilty
        -
        Processed
        -
        Associated
        -
        -
        -
        -
        Recommended Fine
        -
        -
        Recommended Sentence
        -
        -
        Fine
        -
        -
        Sentence
        -
        -
        - ` - ); - } - ); - - $(".contextmenu").on("click", ".incidents-remove-tag", function () { - $(`.tag:contains(${$(this).data("info")})`).remove(); - }); - - $(".manage-incidents-tags-holder").on("contextmenu", ".tag", function (e) { - let args = [ - { - className: "incidents-remove-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: "", - }, - ]; - openContextMenu(e, args); - }); - - $(".contextmenu").on("click", ".incidents-remove-officer-tag", function () { - $( - `.manage-incidents-officers:contains(${$(this).data("info")})` - ).remove(); - }); - - $(".manage-incidents-officers-holder").on( - "contextmenu", - ".manage-incidents-officers", - function (e) { - let args = [ - { - className: "incidents-remove-officer-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: "", - }, - ]; - openContextMenu(e, args); - } - ); - - $(".contextmenu").on("click", ".incidents-remove-civ-tag", function () { - $( - `.manage-incidents-civilians:contains(${$(this).data("info")})` - ).remove(); - }); - - $(".manage-incidents-civilians-holder").on( - "contextmenu", - ".manage-incidents-civilians", - function (e) { - let args = [ - { - className: "incidents-remove-civ-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: "", - }, - ]; - openContextMenu(e, args); - } - ); - - $(".incidents-search-refresh").click(function () { - if (canRefreshIncidents == true) { - canRefreshIncidents = false; - $(".incidents-search-refresh").empty(); - $(".incidents-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".incidents-search-refresh").empty(); - $(".incidents-search-refresh").html("Refresh"); - canRefreshIncidents = true; - $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); - }, 1500); - } - }); - - $(".contextmenu").on("click", ".incidents-remove-normal-tag", function () { - $(`.tag:contains(${$(this).data("info")})`).remove(); - let cid = $(".manage-profile-citizenid-input").val(); - if (cid) { - $.post( - `https://${GetParentResourceName()}/removeProfileTag`, - JSON.stringify({ - cid: cid, - text: $(this).data("info"), - }) - ); - } - }); - $(".tags-holder").on("contextmenu", ".tag", function (e) { - let args = [ - { - className: "incidents-remove-normal-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: "", - }, - ]; - openContextMenu(e, args); - }); - $(".reports-search-title").click(function () { - if (canSearchReports == true) { - if ($(".reports-search-input").css("display") == "none") { - $(".reports-search-input").slideDown(250); - $(".reports-search-input").css("display", "block"); - } else { - $(".reports-search-input").slideUp(250); - setTimeout(() => { - $(".reports-search-input").css("display", "none"); - }, 250); - } - } - }); - $(".icidents-person-search-container").hover( - function () { - mouse_is_inside = true; - }, - function () { - mouse_is_inside = false; - } - ); - - $(".reports-search-refresh").click(function () { - if (canRefreshReports == true) { - canRefreshReports = false; - $(".reports-search-refresh").empty(); - $(".reports-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".reports-search-refresh").empty(); - $(".reports-search-refresh").html("Refresh"); - canRefreshReports = true; - $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); - }, 1500); - } - }); - - $(".dispatch-comms-refresh").click(function () { - $(".dispatch-comms-refresh").empty(); - $(".dispatch-comms-refresh").prepend( - `` - ); - setTimeout(() => { - $(".dispatch-comms-refresh").empty(); - $(".dispatch-comms-refresh").html("Refresh"); - canRefreshReports = true; - $.post(`https://${GetParentResourceName()}/refreshDispatchMsgs`, JSON.stringify({})); - }, 1500); - }); - - $(".reports-items").on("click", ".reports-item", function () { - if (currentTab != ".reports-page-container") { - fidgetSpinner(".reports-page-container"); - currentTab = ".reports-page-container"; - } - - if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { - $(".manage-reports-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".reports-gallery-add-btn").hasClass("fa-minus")) { - $(".reports-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".reports-officers-add-btn").hasClass("fa-minus")) { - $(".reports-officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - - if ($(".reports-gallery-upload-input").css("display") == "block") { - $(".reports-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".reports-gallery-upload-input").css("display", "none"); - }, 250); - } - - canInputTag = true; - canInputReportTag = true; - canInputReportOfficerTag = true; - let id = $(this).data("id"); - $.post( - `https://${GetParentResourceName()}/getReportData`, - JSON.stringify({ - id: id, - }) - ); - }); - - $(".manage-reports-tags-add-btn").click(function () { - if (canInputReportTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-reports-tags-holder").prepend( - `` - ); - canInputReportTag = false; - } else if (!canInputReportTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-reports-input").remove(); - canInputReportTag = true; - } - }); - - $(".manage-reports-tags-holder").on( - "keydown", - ".tag-reports-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-reports-tags-holder").prepend( - `
        ${$(".tag-reports-input").text()}
        ` - ); - // Have it save instantly if it's an existing report. - if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { - $(".manage-reports-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".tag-reports-input").remove(); - canInputReportTag = true; - } - } - ); - - $(".reports-gallery-add-btn").click(function () { - //if ($(".manage-profile-citizenid-input").val()) { - if ($(".reports-gallery-upload-input").css("display") == "none") { - $(".reports-gallery-upload-input").slideDown(250); - $(".reports-gallery-upload-input").css("display", "block"); - $(this).removeClass("fa-plus").addClass("fa-minus"); - } else { - $(".reports-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".reports-gallery-upload-input").css("display", "none"); - }, 250); - $(this).removeClass("fa-minus").addClass("fa-plus"); - } - //} else { - // $(this).effect("shake", { times: 2, distance: 2 }, 500) - // } - }); - - $("#reports-gallery-upload-input").keydown(function (e) { - if (e.keyCode === 13) { - let URL = $("#reports-gallery-upload-input").val(); - let cid = $(".manage-profile-citizenid-input").val(); - if (URL !== "") { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".reports-gallery-inner-container").prepend( - `` - ); - $("#reports-gallery-upload-input").val(""); - $(".reports-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".reports-gallery-upload-input").css("display", "none"); - }, 250); - $(".reports-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - } - }); - - $(".reports-gallery-inner-container").on( - "click", - ".reports-img", - function () { - if ($(this).css("filter") == "none") { - $(this).css("filter", "blur(5px)"); - } else { - $(this).css("filter", "none"); - } - } - ); - $(".contextmenu").on("click", ".reports-remove-image", function () { - $(".reports-gallery-inner-container img") - .filter("[src='" + $(this).data("info") + "']") - .remove(); - }); - - $(".reports-gallery-inner-container").on( - "contextmenu", - ".reports-img", - function (e) { - let args = [ - { - className: "reports-remove-image", - icon: "fas fa-times", - text: "Remove Image", - info: $(this).attr("src"), - status: "", - }, - { - className: "expand-image", - icon: "fas fa-expand", - text: "Expand Image", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - { - className: "copy-image-link", - icon: "fa-regular fa-copy", - text: "Copy Image Link", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - ]; - openContextMenu(e, args); - } - ); - - $(".reports-officers-add-btn").click(function () { - if (canInputReportOfficerTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".reports-officers-tags-holder").prepend( - `` - ); - canInputReportOfficerTag = false; - } else if (!canInputReportOfficerTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".officer-tag-reports-input").remove(); - canInputReportOfficerTag = true; - } - }); - - $(".reports-officers-tags-holder").on( - "keydown", - ".officer-tag-reports-input", - function (e) { - if (e.keyCode === 13) { - $(".reports-officers-tags-holder").prepend( - `
        ${$( - ".officer-tag-reports-input" - ).text()}
        ` - ); - // Have it save instantly if it's an existing report. - if ($(".reports-officers-add-btn").hasClass("fa-minus")) { - canInputReportOfficerTag = true; - $(".reports-officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - canInputReportOfficerTag = true; - $(".officer-tag-reports-input").remove(); - } - } - ); - - $(".reports-civilians-add-btn").click(function () { - if (canInputReportCivilianTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".reports-civilians-tags-holder").prepend( - `` - ); - canInputReportCivilianTag = false; - } else if (!canInputReportCivilianTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".civilian-tag-reports-input").remove(); - canInputReportCivilianTag = true; - } - }); - - $(".reports-civilians-tags-holder").on( - "keydown", - ".civilian-tag-reports-input", - function (e) { - if (e.keyCode === 13) { - $(".reports-civilians-tags-holder").prepend( - `
        ${$( - ".civilian-tag-reports-input" - ).text()}
        ` - ); - // Have it save instantly if it's an existing report. - if ($(".reports-civilians-add-btn").hasClass("fa-minus")) { - canInputReportCivilianTag = true; - $(".reports-civilians-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - canInputReportCivilianTag = true; - $(".civilian-tag-reports-input").remove(); - } - } - ); - - $(".manage-reports-title-holder").on( - "click", - ".manage-reports-new", - function () { - //if ($(".manage-bolos-editing-title").html() == 'You are currently creating a new BOLO') { - //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) - //} else { - let template = ""; - if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - template = - "Submitted to ICU?: [Yes/No]\n\nIncident Report:\n[ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]\n\n\nList of Injuries:\n- [ State what injury or injuries occurred ]\n\n\n💉 Surgical Report:\n[ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]\n\n\nAttending:\n- [ List Any Attending Here ]\n\n\nMedications Applied:\n- [ List Any Attending Here ]\n\n\nNotes:\n[ Additional Notes Here ]"; - } - $(".manage-reports-editing-title").html( - "You are currently creating a new report" - ); - $(".manage-reports-input-title").val(""); - $(".manage-reports-input-type").val(""); - $(".manage-reports-reports-content").val(template); - $(".manage-reports-tags-holder").empty(); - $(".reports-gallery-inner-container").empty(); - $(".reports-officers-tags-holder").empty(); - $(".reports-civilians-tags-holder").empty(); - - if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { - $(".manage-reports-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".reports-gallery-add-btn").hasClass("fa-minus")) { - $(".reports-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".officers-add-btn").hasClass("fa-minus")) { - $(".officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - - if ($(".reports-gallery-upload-input").css("display") == "block") { - $(".reports-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".reports-gallery-upload-input").css("display", "none"); - }, 250); - } - - canInputTag = true; - canInputReportTag = true; - canInputReportOfficerTag = true; - - $(".tag-reports-input").remove(); - canInputReportTag = true; - - //} - } - ); - - $("#reports-search-input").keydown(function (e) { - if (e.keyCode === 13 && canSearchForReports == true) { - let name = $(this).val(); - if (name !== "") { - canSearchForReports = false; - $.post( - `https://${GetParentResourceName()}/searchReports`, - JSON.stringify({ - name: name, - }) - ); - $(".reports-items").empty(); - $(".reports-items").prepend( - `
        ` - ); - } - } - }); - - $(".manage-reports-title-holder").on( - "click", - ".manage-reports-save", - function () { - let existing = !( - $(".manage-reports-editing-title").html() == - "You are currently creating a new report" - ); - let id = $(".manage-reports-editing-title").data("id"); - let title = $("#reporttitle").val(); - let type = $("#reporttype").val(); - let details = $("#reportdetail").val(); - let tags = new Array(); - let gallery = new Array(); - let officers = new Array(); - let civilians = new Array(); - - $(".manage-reports-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - tags.push($(this).text()); - } - }); - - $(".reports-gallery-inner-container") - .find("img") - .each(function () { - if ($(this).attr("src") != "") { - gallery.push($(this).attr("src")); - } - }); - - $(".reports-officers-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - officers.push($(this).text()); - } - }); - - $(".reports-civilians-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - civilians.push($(this).text()); - } - }); - - let time = new Date(); - - $.post( - `https://${GetParentResourceName()}/newReport`, - JSON.stringify({ - existing: existing, - id: id, - title: title, - type: type, - details: details, - tags: tags, - gallery: gallery, - officers: officers, - civilians: civilians, - time: time.getTime(), - }) - ); - } - ); - - $(".dmv-search-title").click(function () { - if (canSearchForVehicles == true) { - if ($(".dmv-search-input").css("display") == "none") { - $(".dmv-search-input").slideDown(250); - $(".dmv-search-input").css("display", "block"); - } else { - $(".dmv-search-input").slideUp(250); - setTimeout(() => { - $(".dmv-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#dmv-search-input").keydown(async function (e) { - if (e.keyCode === 13 && canSearchForVehicles == true) { - let name = $("#dmv-search-input").val(); - if (name !== "") { - canSearchForVehicles = false; - $(".dmv-items").empty(); - $(".dmv-items").prepend(`
        `); - - let result = await $.post( - `https://${GetParentResourceName()}/searchVehicles`, - JSON.stringify({ - name: name, - }) - ); - if (result.length === 0) { - $(".dmv-items").html( - ` -
        - -
        -
        -
        No Vehicles Matching that search
        -
        -
        -
        -
        -
        - ` - ); - canSearchForVehicles = true; - return true; - } - $(".dmv-items").empty(); - - let vehicleHTML = ""; - - result.forEach((value) => { - let paint = value.color; - let impound = "red-tag"; - let bolo = "red-tag"; - let codefive = "red-tag"; - let stolen = "red-tag"; - - if (value.state == 'Impounded') { - impound = "green-tag"; - } - - if (value.bolo) { - bolo = "green-tag"; - } - - if (value.code) { - codefive = "green-tag"; - } - - if (value.stolen) { - stolen = "green-tag"; - } - - vehicleHTML += ` -
        - -
        -
        -
        ${value.model}
        -
        -
        ${value.colorName}
        -
        Impound
        -
        BOLO
        -
        Stolen
        -
        Code 5
        -
        -
        -
        -
        Plate: ${value.plate} · Owner: ${value.owner}
        -
        -
        -
        - `; - }); - - $(".dmv-items").html(vehicleHTML); - - canSearchForVehicles = true; - - } - } - }); - - $(".dmv-items").on("click", ".dmv-item", function () { - $.post( - `https://${GetParentResourceName()}/getVehicleData`, - JSON.stringify({ - plate: $(this).data("plate"), - }) - ); - }); - - $(".vehicle-information-title-holder").on( - "click", - ".vehicle-information-save", - function () { - if (canSaveVehicle) { - canSaveVehicle = false; - $(".vehicle-information-save").empty(); - $(".vehicle-information-save").prepend( - `` - ); - setTimeout(() => { - $(".vehicle-information-save").empty(); - $(".vehicle-information-save").html("Save"); - canSaveVehicle = true; - }, 750); - setTimeout(() => { - let dbid = $(".vehicle-information-title-holder").data("dbid"); - let plate = $(".vehicle-info-plate-input").val(); - let notes = $(".vehicle-info-content").val(); - let points = $("#vehiclePointsSlider").val(); - - let imageurl = $(".vehicle-info-image").attr("src"); - let newImageurl = $(".vehicle-info-imageurl-input").val(); - if (newImageurl.includes("base64")) { - imageurl = "img/not-found.webp"; - } else { - imageurl = newImageurl; - } - - let code5 = false; - let code5tag = $(".vehicle-tags").find(".code5-tag"); - if (code5tag.hasClass("green-tag")) { - code5 = true - } - - let stolen = false; - let stolentag = $(".vehicle-tags").find(".stolen-tag"); - if (stolentag.hasClass("green-tag")) { - stolen = true - } - - let impoundInfo = {} - impoundInfo.impoundActive = $(".vehicle-tags").find(".impound-tag").hasClass("green-tag") - impoundInfo.impoundChanged = impoundChanged - if (impoundChanged === true) { - if (impoundInfo.impoundActive === true) { - impoundInfo.plate = $(".impound-plate").val(); - impoundInfo.linkedreport = $(".impound-linkedreport").val(); - impoundInfo.fee = $(".impound-fee").val(); - impoundInfo.time = $(".impound-time").val(); - } - } - - $.post( - `https://${GetParentResourceName()}/saveVehicleInfo`, - JSON.stringify({ - dbid: dbid, - plate: plate, - imageurl: imageurl, - notes: notes, - stolen: stolen, - code5: code5, - impound: impoundInfo, - points: points, - }) - ); - - impoundChanged = false; - $(".vehicle-info-image").attr("src", newImageurl); - }, 250); - } - } - ); - - $(".contextmenu").on("click", ".mark-code-5", function () { - let tag = $(".vehicle-tags").find(".code5-tag"); - if (tag.hasClass("red-tag")) { - tag.removeClass("red-tag").addClass("green-tag"); - } - }); - - $(".contextmenu").on("click", ".remove-code-5", function () { - let tag = $(".vehicle-tags").find(".code5-tag"); - if (tag.hasClass("green-tag")) { - tag.removeClass("green-tag").addClass("red-tag"); - } - }); - - $(".vehicle-tags").on("contextmenu", ".code5-tag", function (e) { - let plate = $(".vehicle-info-plate-input").val(); - if (plate) { - let args = []; - if ($(this).hasClass("red-tag")) { - args = [ - { - className: "mark-code-5", - icon: "fas fa-check", - text: "Mark as Code 5", - info: plate, - status: "", - }, - ]; - } else { - args = [ - { - className: "remove-code-5", - icon: "fas fa-times", - text: "Remove Code 5 Status", - info: plate, - status: "", - }, - ]; - } - - openContextMenu(e, args); - } - }); - - $(".contextmenu").on("click", ".mark-stolen", function () { - let tag = $(".vehicle-tags").find(".stolen-tag"); - if (tag.hasClass("red-tag")) { - tag.removeClass("red-tag").addClass("green-tag"); - } - }); - - $(".contextmenu").on("click", ".remove-stolen", function () { - let tag = $(".vehicle-tags").find(".stolen-tag"); - if (tag.hasClass("green-tag")) { - tag.removeClass("green-tag").addClass("red-tag"); - } - }); - - $(".vehicle-tags").on("contextmenu", ".stolen-tag", function (e) { - let plate = $(".vehicle-info-plate-input").val(); - if (plate) { - let args = []; - if ($(this).hasClass("red-tag")) { - args = [ - { - className: "mark-stolen", - icon: "fas fa-check", - text: "Mark as Stolen", - info: plate, - status: "", - }, - ]; - } else { - args = [ - { - className: "remove-stolen", - icon: "fas fa-times", - text: "Remove Code 5 Status", - info: plate, - status: "", - }, - ]; - } - - openContextMenu(e, args); - } - }); - - $(".contextmenu").on("click", ".impound-vehicle", function () { - const plate = $(this).data("info"); - $(".impound-linkedreport").val("").removeAttr("disabled"); - $(".impound-fee").val("").removeAttr("disabled"); - $(".impound-time").val("").removeAttr("disabled"); - $(".impound-fee").css("color", "white"); - $(".impound-cancel").html("Cancel"); - $(".impound-submit").fadeIn(250); - $(".impound-form").slideDown(250); - $(".impound-form").fadeIn(250); - $(".impound-form").data("plate", plate); - $(".impound-plate").val(plate); - }); - - $(".impound-submit").click(function () { - const plate = $(".impound-plate").val(); - const linkedreport = $(".impound-linkedreport").val(); - const fee = $(".impound-fee").val(); - const time = $(".impound-time").val(); - - if (!plate || plate === "") { - $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); - setTimeout(() => { - $(".impound-form").css( - "border", - "1px solid rgb(168, 168, 168)" - ); - }, 500); - return; - } - - if (!linkedreport || linkedreport === "") { - $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); - setTimeout(() => { - $(".impound-form").css( - "border", - "1px solid rgb(168, 168, 168)" - ); - }, 500); - return; - } - - if (!fee || fee === "") { - $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); - setTimeout(() => { - $(".impound-form").css( - "border", - "1px solid rgb(168, 168, 168)" - ); - }, 500); - return; - } - - if (!time || time === "") { - $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); - setTimeout(() => { - $(".impound-form").css( - "border", - "1px solid rgb(168, 168, 168)" - ); - }, 500); - return; - } - - /* $.post( - `https://${GetParentResourceName()}/impoundVehicle`, - JSON.stringify({ - plate: plate, - linkedreport: linkedreport, - fee: fee, - time: time, - }) - ); */ - - //$(".impound-plate").val(""); - //$(".impound-linkedreport").val(""); - //$(".impound-fee").val(""); - //$(".impound-time").val(""); - //$(".impound-fee").css("color", "white"); - - $(".vehicle-tags").find(".impound-tag").addClass("green-tag").removeClass("red-tag"); - - $(".impound-form").slideUp(250); - $(".impound-form").fadeOut(250); - impoundChanged = true; - }); - - $(".impound-cancel").click(function () { - $(".impound-form").slideUp(250); - $(".impound-form").fadeOut(250); - - $(".impound-plate").val(""); - $(".impound-linkedreport").val(""); - $(".impound-fee").val(""); - $(".impound-time").val(""); - $(".impound-fee").css("color", "white"); - }); - - $(".contextmenu").on("click", ".remove-impound", function () { - const plate = $(this).data("info"); - /* $.post( - `https://${GetParentResourceName()}/removeImpound`, - JSON.stringify({ - plate: plate, - }) - ); */ - $(".impound-plate").val(""); - $(".impound-linkedreport").val(""); - $(".impound-fee").val(""); - $(".impound-time").val(""); - impoundChanged = true; - - $(".vehicle-tags") - .find(".impound-tag") - .addClass("red-tag") - .removeClass("green-tag"); - }); - - $(".contextmenu").on("click", ".status-impound", function () { - const plate = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/statusImpound`, - JSON.stringify({ - plate: plate, - }) - ); - }); - - $(".vehicle-tags").on("contextmenu", ".impound-tag", function (e) { - let plate = $(".vehicle-info-plate-input").val(); - if (plate) { - let args = []; - if ($(this).hasClass("red-tag")) { - args = [ - { - className: "impound-vehicle", - icon: "fas fa-check", - text: "State Impound", - info: plate, - status: "", - }, - ]; - } else { - args = [ - { - className: "remove-impound", - icon: "fas fa-times", - text: "Unimpound Vehicle", - info: plate, - status: "", - }, - { - className: "status-impound", - icon: "fas fa-info-circle", - text: "View Impound Status", - info: plate, - status: "", - }, - ]; - } - openContextMenu(e, args); - } - }); - - - $(".calls-search-title").click(function () { - if (canSearchForProfiles == true) { - if ($(".calls-search-input").css("display") == "none") { - $(".calls-search-input").slideDown(250); - $(".calls-search-input").css("display", "block"); - } else { - $(".calls-search-input").slideUp(250); - setTimeout(() => { - $(".calls-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#calls-search-input").keydown(function (e) { - if (e.keyCode === 13) { - let searchCall = $("#calls-search-input").val(); - if (searchCall !== "") { - $.post( - `https://${GetParentResourceName()}/searchCalls`, - JSON.stringify({ - searchCall: searchCall, - }) - ); - $(".calls-items").empty(); - $(".calls-items").prepend(`
        `); - } - } - }); - - $(".weapons-search-title").click(function () { - if (canSearchForWeapons == true) { - if ($(".weapons-search-input").css("display") == "none") { - $(".weapons-search-input").slideDown(250); - $(".weapons-search-input").css("display", "block"); - } else { - $(".weapons-search-input").slideUp(250); - setTimeout(() => { - $(".weapons-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#weapons-search-input").keydown(async function (e) { - if (e.keyCode === 13 && canSearchForWeapons == true) { - let name = $("#weapons-search-input").val(); - if (name !== "") { - canSearchForWeapons = false; - $(".weapons-items").empty(); - $(".weapons-items").prepend(`
        `); - - let result = await $.post( - `https://${GetParentResourceName()}/searchWeapons`, - JSON.stringify({ - name: name, - }) - ); - if (result.length === 0) { - $(".weapons-items").html( - ` -
        - -
        -
        -
        No Weapons Matching that search
        -
        -
        -
        -
        -
        - ` - ); - canSearchForWeapons = true; - return true; - } - $(".weapons-items").empty(); - - let weaponHTML = ""; - - result.forEach((value) => { - weaponHTML += ` -
        - -
        -
        -
        ${value.weapModel} - Class ${value.weapClass}
        - -
        -
        -
        Serial Number: ${value.serial} · Owner: ${value.owner}
        -
        -
        -
        - `; - }); - - $(".weapons-items").html(weaponHTML); - - canSearchForWeapons = true; - } - } - }); - - $(".weapon-information-title-holder").on("click", ".weapon-information-new", function () { - $(".weapon-information-title-holder").data("dbid", 0); - $(".weapon-info-serial-input").val(""); - $(".weapon-info-owner-input").val(""); - $(".weapon-info-class-input").val(""); - $(".weapon-info-model-input").val(""); - $(".weapon-info-imageurl-input").val("img/not-found.webp"); - - canSaveWeapon = true; - } -); - - $(".weapon-information-title-holder").on("click", ".weapon-information-save", function () { - if (canSaveProfile == true) { - canSaveProfile = false; - $(".manage-profile-save").empty(); - $(".manage-profile-save").prepend( - `` - ); - setTimeout(() => { - $(".manage-profile-save").empty(); - $(".manage-profile-save").html("Save"); - canSaveProfile = true; - }, 750); - - setTimeout(() => { - let serial = $(".weapon-info-serial-input").val(); - let notes = $(".weapon-info-content").val(); - let owner = $(".weapon-info-owner-input").val(); - let weapClass = $(".weapon-info-class-input").val(); - let weapModel = $(".weapon-info-model-input").val(); - - let imageurl = $(".weapon-info-image").attr("src"); - let newImageurl = $(".weapon-info-imageurl-input").val(); - if (newImageurl.includes("base64")) { - imageurl = "img/not-found.webp"; - } else { - imageurl = newImageurl; - } - - $.post( - `https://${GetParentResourceName()}/saveWeaponInfo`, - JSON.stringify({ - serial: serial, - imageurl: imageurl, - notes: notes, - owner: owner, - weapClass: weapClass, - weapModel: weapModel, - }) - ); - - $(".weapon-info-image").attr("src", newImageurl); - }, 250); - } - } -); - - $(".weapons-items").on("click", ".weapons-item", function () { - $.post( - `https://${GetParentResourceName()}/getWeaponData`, - JSON.stringify({ - serial: $(this).data("serial"), - }) - ); - }); - - $(".contextmenu").on("click", ".view-profile", async function () { - const cid = $(this).data("info"); - fidgetSpinner(".profile-page-container"); - currentTab = ".profile-page-container"; - $(".profile-search-input").slideDown(250); - $(".profile-search-input").css("display", "block"); - $("#profile-search-input:text").val(cid.toString()); - canSearchForProfiles = false; - let result = await $.post( - `https://${GetParentResourceName()}/searchProfiles`, - JSON.stringify({ - name: cid, - }) - ); - - searchProfilesResults(result); - }); - - $(".contextmenu").on("click", ".view-incident", function () { - const incidentId = $(this).data("info"); - fidgetSpinner(".incidents-page-container"); - currentTab = ".incidents-page-container"; - setTimeout(() => { - $(".incidents-search-input").slideDown(250); - $(".incidents-search-input").css("display", "block"); - setTimeout(() => { - $("#incidents-search-input:text").val(incidentId.toString()); - canSearchForProfiles = false; - $.post( - `https://${GetParentResourceName()}/searchIncidents`, - JSON.stringify({ - incident: incidentId.toString(), - }) - ); - $(".incidents-items").empty(); - $(".incidents-items").prepend( - `
        ` - ); - setTimeout(() => { - $.post( - `https://${GetParentResourceName()}/getIncidentData`, - JSON.stringify({ - id: incidentId.toString(), - }) - ); - }, 250); - }, 250); - }, 250); - }); - - $(".warrants-items").on("contextmenu", ".warrants-item", function (e) { - //let information = $(this).html() - //if (information) { - args = [ - { - className: "view-profile", - icon: "far fa-eye", - text: "View Profile", - info: $(this).data("cid"), - status: "", - }, - { - className: "view-incident", - icon: "fas fa-search", - text: "View Incident", - info: $(this).data("id"), - status: "", - }, - ]; - openContextMenu(e, args); - //} - }); - - $(".contextmenu").on("click", ".toggle-duty", function () { - let info = $(this).data("info"); - let currentStatus = $(`[data-id="${info}"]`) - .find(".unit-status") - .html(); - if (currentStatus == "10-8") { - $(`[data-id="${info}"]`).find(".unit-status").html("10-7"); - $(`[data-id="${info}"]`) - .find(".unit-status") - .removeClass("green-status") - .addClass("yellow-status"); - $.post( - `https://${GetParentResourceName()}/toggleDuty`, - JSON.stringify({ - cid: info, - status: 0, - }) - ); - } else if (currentStatus == "10-7") { - $(`[data-id="${info}"]`).find(".unit-status").html("10-8"); - $(`[data-id="${info}"]`) - .find(".unit-status") - .removeClass("yellow-status") - .addClass("green-status"); - $.post( - `https://${GetParentResourceName()}/toggleDuty`, - JSON.stringify({ - cid: info, - status: 1, - }) - ); - } - }); - - $(".contextmenu").on("click", ".set-callsign", function () { - let info = $(this).data("info"); - $(".callsign-container").fadeIn(0); - $(".callsign-inner-container").slideDown(500); - $(".callsign-inner-container").fadeIn(500); - $(".callsign-container").data("id", info); - }); - - $(".contextmenu").on("click", ".set-radio", function () { - let info = $(this).data("info"); - $(".radio-container").fadeIn(0); - $(".radio-inner-container").slideDown(500); - $(".radio-inner-container").fadeIn(500); - $(".radio-container").data("id", info); - }); - - $(".contextmenu").on("click", ".set-waypoint", function () { - let info = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/setWaypointU`, - JSON.stringify({ - cid: info, - }) - ); - }); - - $(".active-unit-list").on("contextmenu", ".active-unit-item", function (e) { - let cid = $(this).data("id"); - if (cid) { - args = [ - { - className: "toggle-duty", - icon: "fas fa-thumbtack", - text: "Toggle Duty", - info: cid, - status: "", - }, - { - className: "set-callsign", - icon: "far fa-id-badge", - text: "Set Callsign", - info: cid, - status: "", - }, - { - className: "set-radio", - icon: "fas fa-broadcast-tower", - text: "Set Radio", - info: cid, - status: "", - }, - { - className: "set-waypoint", - icon: "fas fa-map-marker-alt", - text: "Set Waypoint", - info: cid, - status: "", - }, - ]; - openContextMenu(e, args); - } - }); - - $(".contextmenu").on("click", ".Set-Waypoint", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/setWaypoint`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".call-attach", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/callAttach`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".call-detach", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/callDetach`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".remove-blip", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/removeCallBlip`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".attached-units", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/attachedUnits`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $("#respondcalls").keydown(function (e) { - const keyCode = e.which || e.keyCode; - if (keyCode === 13 && !e.shiftKey) { - const callid = $(".respond-calls-container").data("id"); - e.preventDefault(); - const time = new Date(); - $.post( - `https://${GetParentResourceName()}/sendCallResponse`, - JSON.stringify({ - message: $(this).val(), - time: time.getTime(), - callid: callid, - }) - ); - $(this).val(""); - } - }); - - $(".contextmenu").on("click", ".respond-call", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/getCallResponses`, - JSON.stringify({ - callid: callId, - }) - ); - /**$(".respond-calls").fadeIn(0) - $(".respond-calls-container").fadeIn(250) - $(".close-all").css("filter", "brightness(15%)"); - $("#respondcalls").val("")*/ - }); - - $('#vehiclePointsSlider').change(function(){ - //console.log(this.value); - var currentValue = $('#vehiclePointsSliderValue'); - currentValue.html(this.value); - }); - - - $(".active-calls-list").on( - "contextmenu", - ".active-calls-item", - function (e) { - const callId = $(this).data("id"); - const canRespond = $(this).data("canrespond"); - if (callId) { - if (canRespond == true) { - args = [ - { - className: "respond-call", - icon: "fas fa-reply", - text: "Respond to Call", - info: callId, - status: "", - }, - { - className: "attached-units", - icon: "fas fa-link", - text: "Attached Units", - info: callId, - status: "", - }, - { - className: "call-detach", - icon: "fas fa-sign-out-alt", - text: "Detach", - info: callId, - status: "", - }, - { - className: "call-attach", - icon: "fas fa-sign-in-alt", - text: "Respond", - info: callId, - status: "", - }, - { - className: "Set-Waypoint", - icon: "fas fa-map-marker-alt", - text: "Set Waypoint", - info: callId, - status: "", - }, - { - className: "remove-blip", - icon: "fa-solid fa-circle-minus", - text: "Remove Blip", - info: callId, - status: "", - }, - ]; - } else if (canRespond == false) { - args = [ - { - className: "attached-units", - icon: "fas fa-link", - text: "Attached Units", - info: callId, - status: "", - }, - { - className: "call-detach", - icon: "fas fa-sign-out-alt", - text: "Detach", - info: callId, - status: "", - }, - { - className: "call-attach", - icon: "fas fa-sign-in-alt", - text: "Respond", - info: callId, - status: "", - }, - { - className: "Set-Waypoint", - icon: "fas fa-map-marker-alt", - text: "Set Waypoint", - info: callId, - status: "", - }, - { - className: "remove-blip", - icon: "fa-solid fa-circle-minus", - text: "Remove Blip", - info: callId, - status: "", - }, - ]; - } - - openContextMenu(e, args); - } - } - ); - - $(".contextmenu").on("click", ".call-dispatch-detach", function () { - const cid = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/callDispatchDetach`, - JSON.stringify({ - callid: $(".dispatch-attached-units-container").attr("id"), - cid: cid, - }) - ); - $(".dispatch-attached-unit-item").filter(`[data-id="${cid}"]`).remove(); - }); - - $(".contextmenu").on("click", ".Set-Dispatch-Waypoint", function () { - const cid = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/setDispatchWaypoint`, - JSON.stringify({ - callid: $(".dispatch-attached-units-container").attr("id"), - cid: cid, - }) - ); - }); - - $(".dispatch-attached-units-holder").on( - "contextmenu", - ".dispatch-attached-unit-item", - function (e) { - const cid = $(this).data("id"); - if (cid) { - args = [ - { - className: "set-waypoint", - icon: "fas fa-map-marker-alt", - text: "Set Waypoint", - info: cid, - status: "", - }, - ]; - openContextMenu(e, args); - } - } - ); - - $(".contextmenu").on("click", ".dispatch-reply", function () { - const callsign = $(this).data("info"); - const currVal = $(".dispatch-input").val(); - if (currVal === "") { - $(".dispatch-input").val(callsign + " "); - } else { - $(".dispatch-input").val(currVal + " " + callsign + " "); - } - $(".dispatch-input").focus(); - }); - - $(".dispatch-items").on( - "contextmenu", - ".dispatch-item-message", - function (e) { - const Callsign = $(this).data("author"); - - var mySubString = Callsign.substring( - Callsign.indexOf("(") + 1, - Callsign.lastIndexOf(")") - ); - - args = [ - { - className: "dispatch-reply", - icon: "fas fa-reply", - text: "Reply", - info: mySubString, - status: "", - }, - ]; - openContextMenu(e, args); - } - ); - - $(".callsign-buttons").on("click", ".callsign-cancel", function () { - $(".callsign-inner-container").slideUp(500); - $(".callsign-inner-container").fadeOut(500); - setTimeout(() => { - $(".callsign-container").slideUp(500); - $(".callsign-container").fadeOut(500); - $(".callsign-input").val(""); - }, 500); - }); - - $(".callsign-buttons").on("click", ".callsign-submit", function () { - const callsign = $(".callsign-input").val(); - if (callsign.length > 2) { - let editingcallsign = $(".callsign-container").data("id"); - let name = $(`[data-id="${editingcallsign}"]`) - .find(".unit-name") - .html() - .replace(/\s*(?:\[[^\]]*\]|\([^)]*\))\s*/g, ""); - let newunitname = `(${callsign}) ${name}`; - $(`[data-id="${editingcallsign}"]`) - .find(".unit-name") - .html(newunitname); - $.post( - `https://${GetParentResourceName()}/setCallsign`, - JSON.stringify({ - cid: editingcallsign, - newcallsign: callsign, - }) - ); - - $(".callsign-inner-container").slideUp(500); - $(".callsign-inner-container").fadeOut(500); - setTimeout(() => { - $(".callsign-container").slideUp(500); - $(".callsign-container").fadeOut(500); - $(".callsign-input").val(""); - }, 500); - } - }); - - $(".radio-buttons").on("click", ".radio-cancel", function () { - $(".radio-inner-container").slideUp(500); - $(".radio-inner-container").fadeOut(500); - setTimeout(() => { - $(".radio-container").slideUp(500); - $(".radio-container").fadeOut(500); - $(".radio-input").val(""); - }, 500); - }); - - $(".radio-buttons").on("click", ".radio-submit", function () { - const radio = $(".radio-input").val(); - if (radio.length > 0) { - let editingradio = $(".radio-container").data("id"); - let newunitname = `${radio}`; - $(`[data-id="${editingradio}"]`) - .find(".unit-radio") - .html(newunitname); - $.post( - `https://${GetParentResourceName()}/setRadio`, - JSON.stringify({ - cid: editingradio, - newradio: radio, - }) - ); - - $(".radio-inner-container").slideUp(500); - $(".radio-inner-container").fadeOut(500); - setTimeout(() => { - $(".radio-container").slideUp(500); - $(".radio-container").fadeOut(500); - $(".radio-input").val(""); - }, 500); - } - }); - - $(".cams-items").click(function () { - var camId = this.id; - $.post( - `https://${GetParentResourceName()}/openCamera`, - JSON.stringify({ - cam: camId, - }) - ); - $.post(`https://${GetParentResourceName()}/escape`, JSON.stringify({})); - }) - - var draggedElement = 0; - var dragging = false; - - $(".active-unit-list").on("click", ".active-unit-item", function (e) { - if (dragging) { - $("#draggedItem").css("opacity", 0.0); - document.getElementById("draggedItem").innerHTML = ""; - dragging = false; - } else { - dragging = true; - draggedElement = $(this).data("id"); - let draggedItemHtml = $(this).html(); - document.getElementById("draggedItem").innerHTML = draggedItemHtml; - document.getElementById("draggedItem").style.left = "cursorX-50"; - document.getElementById("draggedItem").style.top = "cursorY-50"; - document.getElementById("draggedItem").style.opacity = "0.5"; - } - }); - - document.onmousemove = handleMouseMove; - - function handleMouseMove(event) { - let dot, eventDoc, doc, body, pageX, pageY; - event = event || window.event; // IE-ism - if (event.pageX == null && event.clientX != null) { - eventDoc = (event.target && event.target.ownerDocument) || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = - event.clientX + - ((doc && doc.scrollLeft) || (body && body.scrollLeft) || 0) - - ((doc && doc.clientLeft) || (body && body.clientLeft) || 0); - event.pageY = - event.clientY + - ((doc && doc.scrollTop) || (body && body.scrollTop) || 0) - - ((doc && doc.clientTop) || (body && body.clientTop) || 0); - } - - if (dragging) { - cursorX = event.pageX; - cursorY = event.pageY; - document.getElementById("draggedItem").style.left = - "" + cursorX - 50 + "px"; - document.getElementById("draggedItem").style.top = - "" + cursorY - 50 + "px"; - } - } - - $(".active-calls-list").on("click", ".active-calls-item", function (e) { - const callId = $(this).data("id"); - $("#draggedItem").css("opacity", 0.0); - document.getElementById("draggedItem").innerHTML = ""; - dragging = false; - if (callId && draggedElement) { - $.post( - `https://${GetParentResourceName()}/callDragAttach`, - JSON.stringify({ - callid: callId, - cid: draggedElement, - }) - ); - draggedElement = 0; - } - }); - - function JobColors(sentJob) { - if (sentJob) { - if (PoliceJobs[sentJob] !== undefined) { - document.documentElement.style.setProperty( - "--color-1", - "#1E3955" - ); - document.documentElement.style.setProperty( - "--color-2", - "#213F5F" - ); - document.documentElement.style.setProperty( - "--color-3", - "#2C537B" - ); - document.documentElement.style.setProperty( - "--color-4", - "#23405E" - ); - document.documentElement.style.setProperty( - "--color-5", - "#152638" - ); - document.documentElement.style.setProperty( - "--color-6", - "#121f2c" - ); - document.documentElement.style.setProperty( - "--color-7", - "rgb(28, 54, 82)" - ); - document.documentElement.style.setProperty( - "--color-8", - "#2554cc" - ); - document.documentElement.style.setProperty( - "--color-9", - "#6E707C" - ); - document.documentElement.style.setProperty( - "--color-10", - "#8f741b" - ); - $(".badge-logo").attr("src", "img/sasp_badge.webp"); - $(".header-title").html("SAN ANDREAS STATE POLICE"); - $(".bolo-nav-item").html("BOLOs"); - $(".bolos-search-title").html("Bolos"); - $("#bolos-search-input").attr("placeholder", "Search Bolo..."); - $(".manage-bolos-title").html("Manage Bolo"); - $(".manage-bolos-editing-title").html( - "You are currently creating a new BOLO" - ); - $(".boloplate-title").html("Plate"); - $(".boloowner-title").html("Owner"); - $(".boloindividual-title").html("Individual"); - $("#boloplate").attr("placeholder", "Place plate here..."); - $("#bolodetail").attr( - "placeholder", - "Bolo detail goes here..." - ); - $("#boloowner").attr( - "placeholder", - "Place vehicle owner here..." - ); - $("#boloindividual").attr( - "placeholder", - "Place invidivual here..." - ); - $("#home-warrants-container").fadeIn(0); - $("#home-reports-container").fadeOut(0); - //$(".quote-span").html("TUCKER MALD, BEST MALD"); - $(".incidents-nav-item").show(); - $(".bolo-nav-item").show(); - $(".dmv-nav-item").show(); - $(".weapons-nav-item").show() - $(".cams-nav-item").show(); - $(".map-nav-item").show(); - $(".dispatch-title-ofsomesort").html("Dispatch"); - $(".dispatch-comms-container").fadeIn(0); - $(".manage-profile-name-input-1").attr("readonly", true); - $(".manage-profile-name-input-2").attr("readonly", true); - $("#reports-officers-involved-tag-title").html( - "Officers Involved" - ); - $(".roster-iframe").attr("src", rosterLink); - - $(".manage-profile-save").css("display", "block"); - $(".manage-profile-editing-title").css("display", "block"); - $(".manage-incidents-create").css("display", "block"); - $(".manage-incidents-save").css("display", "block"); - $(".manage-incidents-editing-title").css("display", "block"); - $(".manage-reports-new").css("display", "block"); - $(".manage-reports-save").css("display", "block"); - $(".manage-reports-editing-title").css("display", "block"); - $(".vehicle-information-save").css("display", "block"); - $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); - $(".manage-incidents-title ").css("margin-right", "0px") - $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); - } else if (AmbulanceJobs[sentJob] !== undefined) { - $("#home-warrants-container").fadeOut(0); - $("#home-reports-container").fadeIn(0); - document.documentElement.style.setProperty( - "--color-1", - "#5F2121" - ); - document.documentElement.style.setProperty( - "--color-2", - "#7B2C2C" - ); - document.documentElement.style.setProperty( - "--color-3", - "#4A1C1C" - ); - document.documentElement.style.setProperty( - "--color-4", - "#5E2323" - ); - document.documentElement.style.setProperty( - "--color-5", - "#381515" - ); - document.documentElement.style.setProperty( - "--color-6", - "#2C1212" - ); - document.documentElement.style.setProperty( - "--color-7", - "#521C1C" - ); - document.documentElement.style.setProperty( - "--color-8", - "#CC2525" - ); - document.documentElement.style.setProperty( - "--color-9", - "#8A8D91" - ); - document.documentElement.style.setProperty( - "--color-10", - "#444444" - ); - $(".badge-logo").attr("src", "img/ems_badge.webp"); - $(".header-title").html("PILLBOX HILL MEDICAL CENTER"); - //$(".quote-span").html("The simplest explanation is almost always somebody screwed up."); - $(".bolo-nav-item").html("ICU"); - $(".bolos-search-title").html("ICU Check-ins"); - $("#bolos-search-input").attr( - "placeholder", - "Search Check-ins..." - ); - $(".manage-bolos-title").html("Manage ICU Check-in"); - $(".manage-bolos-editing-title").html( - "You are creating a new ICU Check-in" - ); - $(".boloplate-title").html("Estimated Recovery"); - $(".boloowner-title").html("Emergency Contact"); - $(".boloindividual-title").html("Patient"); - $("#boloplate").attr( - "placeholder", - "Enter recovery time here..." - ); - $("#bolodetail").attr( - "placeholder", - "Enter ICU Check-in details here..." - ); - $("#boloowner").attr( - "placeholder", - "Enter emergency contact here..." - ); - $("#boloindividual").attr( - "placeholder", - "Enter patient name and CID here..." - ); - $(".incidents-nav-item").hide(); - $(".dmv-nav-item").hide(); - $(".cams-nav-item").hide(); - $("#reports-officers-involved-tag-title").html("EMS Involved"); - $(".dispatch-title-ofsomesort").html("Dispatch"); - $(".dispatch-comms-container").fadeIn(0); - $(".manage-profile-name-input-1").attr("readonly", true); - $(".manage-profile-name-input-2").attr("readonly", true); - $(".roster-iframe").attr("src", rosterLink); - - $(".manage-profile-save").css("display", "block"); - $(".manage-profile-editing-title").css("display", "block"); - $(".manage-incidents-create").css("display", "block"); - $(".manage-incidents-save").css("display", "block"); - $(".manage-incidents-editing-title").css("display", "block"); - $(".manage-reports-new").css("display", "block"); - $(".manage-reports-save").css("display", "block"); - $(".manage-reports-editing-title").css("display", "block"); - $(".vehicle-information-save").css("display", "block"); - $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); - $(".manage-incidents-title ").css("margin-right", "0px") - $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); - } else if (DojJobs[sentJob] !== undefined) { - document.documentElement.style.setProperty( - "--color-1", - "#553a1e" - ); - document.documentElement.style.setProperty( - "--color-2", - "#5f4321" - ); - document.documentElement.style.setProperty( - "--color-3", - "#7b552c" - ); - document.documentElement.style.setProperty( - "--color-4", - "#5e4123" - ); - document.documentElement.style.setProperty( - "--color-5", - "#382815" - ); - document.documentElement.style.setProperty( - "--color-6", - "#2c2312" - ); - document.documentElement.style.setProperty( - "--color-7", - "rgb(82, 60, 28)" - ); - document.documentElement.style.setProperty( - "--color-8", - "#cc9225" - ); - $(".badge-logo").attr("src", "img/court.webp"); - $(".header-title").html("DEPARTMENT OF JUSTICE"); - //$(".quote-span").html("Actually useless."); - //$(".dmv-nav-item").hide(); - $(".weapons-nav-item").show() - $(".bolo-nav-item").hide(); - $(".dispatch-title-ofsomesort").html("Message Board"); - $(".dispatch-comms-container").fadeOut(0); - $(".manage-profile-name-input-1").attr("readonly", false); - $(".manage-profile-name-input-2").attr("readonly", false); - $("#home-warrants-container").css("height", "98%"); - $(".roster-iframe").attr("src", rosterLink); - - $(".manage-profile-save").css("display", "none"); - $(".manage-profile-editing-title").css("display", "none"); - $(".manage-incidents-create").css("display", "none"); - $(".manage-incidents-title").css("margin-right", "auto"); - $(".manage-incidents-title").css("width", "95%"); - $(".manage-incidents-save").css("display", "none"); - $(".manage-incidents-editing-title").css("display", "none"); - $(".manage-reports-new").css("display", "none"); - $(".manage-reports-save").css("display", "none"); - $(".manage-reports-editing-title").css("display", "none"); - $(".vehicle-information-save").css("display", "none"); - $(".vehicle-information-title").css("margin-right", "auto").css("width", "95%"); - $(".manage-incidents-title ").css("margin-right", "auto") - $(".manage-reports-title").css("margin-right", "auto").css("width", "95%"); - } - } - } -{/*
        ID: ${value.id}
        */} - window.addEventListener("message", function (event) { - let eventData = event.data; - $(".dispatch-msg-notif").fadeIn(500); - if (eventData.type == "show") { - if (eventData.enable == true) { - rosterLink = eventData.rosterLink; - playerJob = eventData.job; - JobColors(playerJob); - $(".quote-span").html(randomizeQuote()); - if (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined) { - $(".manage-profile-licenses-container").removeClass("display_hidden"); - $(".manage-convictions-container").removeClass("display_hidden"); - $(".manage-profile-vehs-container").removeClass("display_hidden"); - $(".manage-profile-houses-container").removeClass("display_hidden"); - } - - /* if (PoliceJobs[playerJob] !== undefined || AmbulanceJobs[playerJob] !== undefined) { - $(".manage-profile-save").css("display", "block"); - $(".manage-profile-editing-title").css("display", "block"); - $(".manage-incidents-create").css("display", "block"); - $(".manage-incidents-save").css("display", "block"); - $(".manage-incidents-editing-title").css("display", "block"); - $(".manage-reports-new").css("display", "block"); - $(".manage-reports-save").css("display", "block"); - $(".manage-reports-editing-title").css("display", "block"); - } else if (DojJobs[playerJob] !== undefined) { - $(".manage-profile-save").css("display", "none"); - $(".manage-profile-editing-title").css("display", "none"); - $(".manage-incidents-create").css("display", "none"); - $(".manage-incidents-save").css("display", "none"); - $(".manage-incidents-editing-title").css("display", "none"); - $(".manage-reports-new").css("display", "none"); - $(".manage-reports-save").css("display", "none"); - $(".manage-reports-editing-title").css("display", "none"); - } */ - - $("body").fadeIn(0); - $(".close-all").css("filter", "none"); - $(".close-all").fadeOut(0); - if (!currentTab) { - currentTab = ".dashboard-page-container"; - } - $(currentTab).slideDown(250); - timeShit(); - } else { - $(".callsign-inner-container").fadeOut(0); - $(".callsign-container").fadeOut(0); - $(".radio-inner-container").fadeOut(0); - $(".radio-container").fadeOut(0); - $(".icidents-person-search-container").fadeOut(0); - $(".dispatch-attached-units").fadeOut(0); - $(".respond-calls").fadeOut(0); - $(".respond-calls-container").fadeOut(0); - $("body").slideUp(250); - $(".close-all").slideUp(250); - } - } else if (eventData.type == "data") { - $(".name-shit").html(eventData.name); - $(".header-location").html(" " + eventData.location); - MyName = eventData.fullname; - - $(".bulletin-items-continer").empty(); - $.each(eventData.bulletin, function (index, value) { - $( - ".bulletin-items-continer" - ).prepend(`
        -
        ${value.title}
        -
        ${value.desc}
        -
        -
        ${value.author - } - ${timeAgo(Number(value.time))}
        -
        -
        `); - }); - - let policeCount = 0; - let emsCount = 0; - let dojCount = 0; - let fireCount = 0; - - let activeUnits = eventData.activeUnits; - let cid = eventData.citizenid; - let onDutyOnly = eventData.ondutyonly; - $(".active-unit-list").html(' '); - let unitListHTML = ''; - - activeUnits = Object.values(activeUnits) - activeUnits.forEach((unit) => { - if (onDutyOnly && unit.duty == 0 && unit.cid != cid) { - return - } - let status = unit.duty == 1 ? "10-8" : '10-7'; - let statusColor = unit.duty == 1 ? "green-status" : 'yellow-status'; - let radioBack = unit.sig100 ? "#7b2c2c" : "var(--color-3)"; - let radio = unit.radio ? unit.radio : "0"; - let callSign = unit.callSign ? unit.callSign : "000"; - let activeInfoJob = `
        UNKNOWN
        `; - if (PoliceJobs[unit.unitType] !== undefined) { - policeCount++; - activeInfoJob = `
        LSPD
        `; - } else if (AmbulanceJobs[unit.unitType] !== undefined) { - activeInfoJob = `
        Ambulance
        ` - emsCount++; - /* } else if (DojJobs[unit.unitType] !== undefined) { - activeInfoJob = `
        FIRE
        ` - fireCount++; */ - } else if (DojJobs[unit.unitType] !== undefined) { - activeInfoJob = `
        DOJ
        ` - dojCount++; - } - - unitListHTML += ` -
        -
        ${status}
        - ${activeInfoJob} -
        (${callSign}) ${unit.firstName} ${unit.lastName}
        -
        ${radio}
        -
        - `; - }); - - $(".active-unit-list").html(unitListHTML) - - - $("#police-count").html(policeCount); - $("#ems-count").html(emsCount); - $("#doj-count").html(dojCount); - $("#fire-count").html(fireCount); - /* } else if (eventData.type == "bulletin") { - $(".bulletin-items-continer").empty(); - $.each(eventData.data, function (index, value) { - $( - ".bulletin-items-continer" - ).prepend(`
        -
        ${value.title}
        -
        ${value.desc}
        -
        -
        ID: ${value.id}
        -
        ${value.author - } - ${timeAgo(Number(value.time))}
        -
        -
        `); - }); */ - } else if (eventData.type == "newBulletin") { - const value = eventData.data; - $(".bulletin-items-continer") - .prepend(`
        -
        ${value.title}
        -
        ${value.info}
        -
        -
        ID: ${value.id}
        -
        ${value.author} - ${timeAgo( - Number(value.time) - )}
        -
        -
        `); - } else if (eventData.type == "deleteBulletin") { - $(".bulletin-items-continer") - .find("[data-id='" + eventData.data + "']") - .remove(); - } else if (eventData.type == "warrants") { - $(".warrants-items").empty(); - $.each(eventData.data, function (index, value) { - $('.warrants-items').prepend(`
        -
        -
        ${value.name}
        -
        -
        -
        Incident ID: ${value.linkedincident}
        -
        -
        `) - }) - } else if (eventData.type == "dispatchmessages") { - const table = eventData.data; - LastName = ""; - DispatchNum = 0; - $(".dispatch-items").empty(); - $.each(table, function (index, value) { - DispatchNum = DispatchNum + 1; - if (LastName == value.name) { - $(".dispatch-items").append(` -
        -
        ${value.message}
        -
        - `); - } else { - if (DispatchNum == 1) { - $(".dispatch-items") - .append(`
        - -
        -
        ${value.name - } ${timeAgo( - Number(value.time) - )}
        -
        ${value.message}
        -
        -
        `); - } else { - $(".dispatch-items") - .append(`
        - -
        -
        ${value.name - } ${timeAgo( - Number(value.time) - )}
        -
        ${value.message}
        -
        -
        `); - } - } - LastName = value.name; - $(".dispatch-items").scrollTop( - $(".dispatch-items")[0].scrollHeight - ); - }); - $(".dispatch-items").scrollTop( - $(".dispatch-items")[0].scrollHeight - ); - } else if (eventData.type == "dispatchmessage") { - const value = eventData.data; - DispatchNum = DispatchNum + 1; - const BodyDisplay = $("body").css("display"); - if (BodyDisplay == "block") { - if (LastName == value.name) { - $(".dispatch-items").append(` -
        -
        ${value.message}
        -
        - `); - } else { - if (DispatchNum == 1) { - $(".dispatch-items") - .append(`
        - -
        -
        ${value.name - } ${timeAgo( - Number(value.time) - )}
        -
        ${value.message}
        -
        -
        `); - } else { - $(".dispatch-items") - .append(`
        - -
        -
        ${value.name - } ${timeAgo( - Number(value.time) - )}
        -
        ${value.message}
        -
        -
        `); - } - } - LastName = value.name; - } else if (BodyDisplay == "none") { - $.post( - `https://${GetParentResourceName()}/dispatchNotif`, - JSON.stringify({ - data: value, - }) - ); - } - $(".dispatch-items").scrollTop( - $(".dispatch-items")[0].scrollHeight - ); - } else if (eventData.type == "call") { - ClearMap(); - const value = eventData.data; - DispatchMAP(value); - if (value && value.job.includes(playerJob)) { - const prio = value["priority"]; - let DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; - - if ( - value.dispatchCode == "911" || - value.dispatchCode == "311" - ) { - DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; - } - - if (value["time"]) { - DispatchItem += `
        ${timeAgo( - value.time - )}
        `; - } - - if (value["firstStreet"]) { - DispatchItem += `
        ${value.firstStreet}
        `; - } - - if (value["callsign"]) { - DispatchItem += `
        ${value.callsign}
        `; - } - - if (value["doorCount"]) { - DispatchItem += `
        ${value.doorCount}
        `; - } - - if (value["speed"]) { - DispatchItem += `
        ${value.speed}
        `; - } - - if (value["weapon"]) { - DispatchItem += `
        ${value.weapon}
        `; - } - - if (value["heading"]) { - DispatchItem += `
        ${value.heading}
        `; - } - - if (value["gender"]) { - let gender = "Male"; - if (value["gender"] == 0 || value["gender"] == 2) { - gender = "Female"; - } - DispatchItem += `
        ${gender}
        `; - } - - if (value["model"] && value["plate"]) { - DispatchItem += `
        ${value["model"]}${value["plate"]}
        `; - } else if (value["plate"]) { - DispatchItem += `
        ${value["plate"]}
        `; - } else if (value["model"]) { - DispatchItem += `
        ${value["model"]}
        `; - } - - if (value["firstColor"]) { - DispatchItem += `
        ${value["firstColor"]}
        `; - } - - if (value["automaticGunfire"] == true) { - DispatchItem += `
        Automatic Gunfire
        `; - } - - if (value["name"] && value["number"]) { - DispatchItem += `
        ${value["name"]}${value["number"]}
        `; - } else if (value["number"]) { - DispatchItem += `
        ${value["number"]}
        `; - } else if (value["name"]) { - DispatchItem += `
        ${value["name"]}
        `; - } - - if (value["information"]) { - DispatchItem += `
        ${value["information"]}
        `; - } - - DispatchItem += `
        `; - $(".active-calls-list").prepend( - $(DispatchItem).hide().fadeIn("slow") - ); - } - } else if (eventData.type == "attachedUnits") { - const table = eventData.data; - if (table) { - $(".dispatch-attached-units").fadeIn(0); - $(".dispatch-attached-units-container").fadeIn(250); - $(".close-all").css("filter", "brightness(15%)"); - $(".dispatch-attached-units-holder").empty(); - $.each(table, function (index, value) { - $( - ".dispatch-attached-units-holder" - ).prepend(`
        -
        ${value.job}
        -
        (${value.callsign}) ${value.fullname}
        -
        1
        -
        `); - }); - setTimeout(() => { - $(".dispatch-attached-units-container").attr( - "id", - eventData.callid - ); - }, 1000); - } - } else if (eventData.type == "sendCallResponse") { - if ($(".respond-calls-container").data("id") == eventData.callid) { - $(".respond-calls-responses").prepend( - `
        ${eventData["name"] - } responded "${eventData["message"]}" - ${timeAgo( - Number(eventData.time) - )}.
        ` - ); - } - } else if (eventData.type == "getCallResponses") { - const table = eventData.data; - $(".respond-calls").fadeIn(0); - $(".respond-calls-container").fadeIn(250); - $(".close-all").css("filter", "brightness(15%)"); - $("#respondcalls").val(""); - $(".respond-calls-responses").empty(); - setTimeout(() => { - $(".respond-calls-container").data("id", eventData.callid); - }, 1000); - $.each(table, function (index, value) { - $(".respond-calls-responses").prepend( - `
        ${value["name"] - } responded "${value["message"]}" - ${timeAgo( - Number(value.time) - )}.
        ` - ); - }); - } else if (eventData.type == "calls") { - const table = eventData.data; - $(".active-calls-list").empty(); - $.each(table, function (index, value) { - if (value && value.job.includes(playerJob)) { - const prio = value["priority"]; - let DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; - - if ( - value.dispatchCode == "911" || - value.dispatchCode == "311" - ) { - DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; - } - - if (value["time"]) { - DispatchItem += `
        ${timeAgo( - value.time - )}
        `; - } - - if (value["firstStreet"]) { - DispatchItem += `
        ${value.firstStreet}
        `; - } - - if (value["heading"]) { - DispatchItem += `
        ${value.heading}
        `; - } - - if (value["weapon"]) { - DispatchItem += `
        ${value.weapon}
        `; - } - - if (value["gender"]) { - let gender = "Male"; - if (value["gender"] == 0 || value["gender"] == 2) { - gender = "Female"; - } - DispatchItem += `
        ${gender}
        `; - } - - if (value["model"] && value["plate"]) { - DispatchItem += `
        ${value["model"]}${value["plate"]}
        `; - } else if (value["plate"]) { - DispatchItem += `
        ${value["plate"]}
        `; - } else if (value["model"]) { - DispatchItem += `
        ${value["model"]}
        `; - } - - if (value["firstColor"]) { - DispatchItem += `
        ${value["firstColor"]}
        `; - } - - if (value["automaticGunfire"] == true) { - DispatchItem += `
        Automatic Gunfire
        `; - } - - if (value["name"] && value["number"]) { - DispatchItem += `
        ${value["name"]}${value["number"]}
        `; - } else if (value["number"]) { - DispatchItem += `
        ${value["number"]}
        `; - } else if (value["name"]) { - DispatchItem += `
        ${value["name"]}
        `; - } - - if (value["information"]) { - DispatchItem += `
        ${value["information"]}
        `; - } - - DispatchItem += `
        `; - $(".active-calls-list").prepend( - $(DispatchItem).hide().fadeIn("slow") - ); - } - }); - } else if (eventData.type == "incidents") { - let table = eventData.data; - canSearchForProfiles = true; - $(".incidents-items").empty(); - $.each(table, function (index, value) { - $(".incidents-items").append( - `
        -
        -
        ${value.title}
        -
        Incident Report
        -
        -
        -
        ID: ${value.id}
        -
        ${value.author - } - ${timeAgo(Number(value.time))}
        -
        -
        ` - ); - }); - } else if (eventData.type == "getPenalCode") { - const titles = eventData.titles; - const penalcode = eventData.penalcode; - $(".offenses-main-container").empty(); - $.each(titles, function (index, value) { - $(".offenses-main-container").append( - `
        -
        ${value}
        -
        -
        -
        - ` - ); - }); - $.each(penalcode, function (index, value) { - $.each(value, function (i, v) { - $(`#penal-${index}`).append(` -
        -
        -
        ${v.title}
        -
        ${v.class}
        -
        -
        -
        ${v.id}
        -
        ${v.months} Months - $${v.fine}
        -
        - `); - }); - }); - } else if (eventData.type == "incidentData") { - let table = eventData.data; - - $(".incidents-ghost-holder").html(""); - $(".associated-incidents-tags-holder").html(""); - - $(".manage-incidents-editing-title").html( - "You are currently editing incident " + table["id"] - ); - $(".manage-incidents-editing-title").data( - "id", - Number(table["id"]) - ); - - $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); - $(".manage-incidents-reports-content").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-officers-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-civilians-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-evidence-add-btn").css( - "pointer-events", - "auto" - ); - $(".associated-incidents-tags-add-btn").css( - "pointer-events", - "auto" - ); - - $("#manage-incidents-title-input").val(table["title"]); - $(".manage-incidents-reports-content").val(table["details"]); - - $(".manage-incidents-tags-holder").empty(); - $.each(table["tags"], function (index, value) { - $(".manage-incidents-tags-holder").append( - `
        ${value}
        ` - ); - }); - - $(".manage-incidents-officers-holder").empty(); - $.each(table["officersinvolved"], function (index, value) { - $(".manage-incidents-officers-holder").append( - `
        ${value}
        ` - ); - }); - - $(".manage-incidents-civilians-holder").empty(); - $.each(table["civsinvolved"], function (index, value) { - $(".manage-incidents-civilians-holder").append( - `
        ${value}
        ` - ); - }); - - $(".manage-incidents-evidence-holder").empty(); - $.each(table["evidence"], function (index, value) { - $(".manage-incidents-evidence-holder").append( - `` - ); - }); - - $(".manage-incidents-title-holder").empty(); - if (PoliceJobs[playerJob] !== undefined || AmbulanceJobs[playerJob] !== undefined) { - $(".manage-incidents-title-holder").prepend( - ` -
        Manage Incident
        -
        -
        - ` - ); - $(".manage-incidents-title").css("width", "66%"); - $(".manage-incidents-create").css("margin-right", "0px"); - } else if (DojJobs[playerJob] !== undefined) { - $(".manage-incidents-title-holder").prepend( - ` -
        Manage Incident
        - ` - ); - $(".manage-incidents-title").css("width", "95%"); - } - - let associateddata = eventData.convictions; - $.each(associateddata, function (index, value) { - $(".associated-incidents-tags-holder").prepend( - `
        ${value.name}
        ` - ); - - var warrantTag = "red-tag"; - var guiltyTag = "red-tag"; - var processedTag = "red-tag"; - var associatedTag = "red-tag"; - - if (value.warrant == 1) { - warrantTag = "green-tag"; - } - if (value.guilty == 1) { - guiltyTag = "green-tag"; - } - if (value.processed == 1) { - processedTag = "green-tag"; - } - if (value.associated == 1) { - associatedTag = "green-tag"; - } - - const cid = value.cid; - - if (value.associated == 1) { - $(".incidents-ghost-holder").prepend( - `
        -
        ${value.name} (#${value.cid})
        -
        -
        Warrant
        -
        Guilty
        -
        Processed
        -
        Associated
        -
        - - - - - - - - - -
        ` - ); - } else { - $(".incidents-ghost-holder").prepend( - `
        -
        ${value.name} (#${value.cid})
        -
        -
        Warrant
        -
        Guilty
        -
        Processed
        -
        Associated
        -
        -
        -
        -
        Recommended Fine
        -
        -
        Recommended Sentence
        -
        -
        Fine
        -
        -
        Sentence
        -
        -
        ` - ); - } - - $(".fine-amount") - .filter("[data-id='" + value.cid + "']") - .val(value.fine); - - $(".sentence-amount") - .filter("[data-id='" + value.cid + "']") - .val(value.sentence); - - $(".fine-recommended-amount") - .filter("[data-id='" + value.cid + "']") - .val(value.recfine); - - $(".sentence-recommended-amount") - .filter("[data-id='" + value.cid + "']") - .val(value.recsentence); - - const charges = value["charges"]; - for (var i = 0; i < charges.length; i++) { - const randomNum = Math.ceil( - Math.random() * 1000 - ).toString(); - $(`[data-name="${cid}"]`).prepend( - `
        ${charges[i]}
        ` - ); - } - }); - } else if (eventData.type == "incidentSearchPerson") { - let table = eventData.data; - $(".icidents-person-search-holder").empty(); - $.each(table, function (index, value) { - let name = value.firstname + " " + value.lastname; - $(".icidents-person-search-holder").prepend( - ` -
        - -
        -
        Citizen ID
        -
        ${value.id}
        -
        Name
        -
        ${name}
        -
        -
        - ` - ); - }); - } else if (eventData.type == "boloData") { - let table = eventData.data; - $(".manage-bolos-editing-title").html( - "You are currently editing BOLO " + table["id"] - ); - - if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - $(".manage-bolos-editing-title").html( - "You are editing ICU Check-in " + table["id"] - ); - } - - $(".manage-bolos-editing-title").data("id", Number(table["id"])); - - $(".manage-bolos-input-title").val(table["title"]); - $(".manage-bolos-input-plate").val(table["plate"]); - $(".manage-bolos-input-owner").val(table["owner"]); - $(".manage-bolos-input-individual").val(table["individual"]); - - $(".manage-bolos-reports-content").val(table["detail"]); - - $(".manage-bolos-tags-holder").empty(); - $.each(table["tags"], function (index, value) { - $(".manage-bolos-tags-holder").prepend( - `
        ${value}
        ` - ); - }); - - $(".bolo-gallery-inner-container").empty(); - $.each(table["gallery"], function (index, value) { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".bolo-gallery-inner-container").prepend( - `` - ); - }); - - $(".manage-officers-tags-holder").empty(); - $.each(table["officersinvolved"], function (index, value) { - $(".manage-officers-tags-holder").prepend( - `
        ${value}
        ` - ); - }); - } else if (eventData.type == "bolos") { - let table = eventData.data; - var reportName = "General BOLO"; - canSearchForProfiles = true; - $(".bolos-items").empty(); - if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - reportName = "ICU Check-in"; - } - $.each(table, function (index, value) { - $(".bolos-items").prepend( - `
        -
        -
        ${value.title}
        -
        ${reportName}
        -
        -
        -
        ID: ${value.id}
        -
        ${value.author - } - ${timeAgo(Number(value.time))}
        -
        -
        ` - ); - }); - } else if (eventData.type == "boloComplete") { - let id = eventData.data; - if (canRefreshBolo == true) { - canRefreshBolo = false; - $(".bolos-search-refresh").empty(); - $(".bolos-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".bolos-search-refresh").empty(); - $(".bolos-search-refresh").html("Refresh"); - canRefreshBolo = true; - $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); - }, 1500); - } - $(".manage-bolos-editing-title").html( - "You are currently editing BOLO " + id - ); - $(".manage-bolos-editing-title").data("id", Number(id)); - } else if (eventData.type == "reportComplete") { - let id = eventData.data; - if (canRefreshReports == true) { - canRefreshReports = false; - $(".reports-search-refresh").empty(); - $(".reports-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".reports-search-refresh").empty(); - $(".reports-search-refresh").html("Refresh"); - canRefreshReports = true; - $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); - }, 1500); - } - $(".manage-reports-editing-title").html( - "You are currently editing report " + id - ); - $(".manage-reports-editing-title").data("id", Number(id)); - } else if (eventData.type == "reports") { - let table = eventData.data; - canSearchForReports = true; - $(".reports-items").empty(); - $.each(table, function (index, value) { - $(".reports-items").append( - `
        -
        -
        ${value.title}
        -
        ${value.type - } Report
        -
        -
        -
        ID: ${value.id}
        -
        ${value.author - } - ${timeAgo(Number(value.time))}
        -
        -
        ` - ); - }); - } else if (eventData.type == "reportData") { - let table = eventData.data; - - $(".manage-reports-editing-title").html( - "You are currently editing report " + table["id"] - ); - - $(".manage-reports-editing-title").data("id", Number(table["id"])); - - $(".manage-reports-input-title").val(table["title"]); - $(".manage-reports-input-type").val(table["type"]); - $(".manage-reports-reports-content").val(table["details"]); - - $(".manage-reports-tags-holder").empty(); - $.each(table["tags"], function (index, value) { - $(".manage-reports-tags-holder").append( - `
        ${value}
        ` - ); - }); - - $(".reports-gallery-inner-container").empty(); - $.each(table["gallery"], function (index, value) { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".reports-gallery-inner-container").append( - `` - ); - }); - - $(".reports-officers-tags-holder").empty(); - $.each(table["officersinvolved"], function (index, value) { - $(".reports-officers-tags-holder").append( - `
        ${value}
        ` - ); - }); - } else if (eventData.type == "searchedVehicles") { - - } else if (eventData.type == "getVehicleData") { - impoundChanged = false; - let table = eventData.data; - - $(".vehicle-information-title-holder").data( - "dbid", - Number(table["dbid"]) - ); - - $(".vehicle-info-plate-input").val(table["plate"]); - $(".vehicle-info-owner-input").val(table["name"]); - $(".vehicle-info-class-input").val(table["class"]); - $(".vehicle-info-model-input").val(table["model"]); - $(".vehicle-info-imageurl-input").val(table["image"]); - let vehiclePoints = table["points"] != null ? table["points"] : 0; - $("#vehiclePointsSlider").val(vehiclePoints); - $("#vehiclePointsSliderValue").html(vehiclePoints); - - $(".vehicle-info-content").val(table["information"]); - - $(".vehicle-tags").empty(); - $(".vehicle-info-image").attr("src", table["image"]); - $(".vehicle-tags").prepend( - `
        ${table.colorName}
        ` - ); - - let impound = "red-tag"; - let bolo = "red-tag"; - let codefive = "red-tag"; - let stolen = "red-tag"; - - if (table.impound) { - impound = "green-tag"; - } - - if (table.bolo) { - bolo = "green-tag"; - } - - if (table.code) { - codefive = "green-tag"; - } - - if (table.stolen) { - stolen = "green-tag"; - } - - $(".vehicle-tags").append(`
        Impound
        `); - $(".vehicle-tags").append(`
        BOLO
        `); - $(".vehicle-tags").append(`
        Code 5
        `); - $(".vehicle-tags").append(`
        Stolen
        `); - $(".vehicle-info-imageurl-input").val(table["image"]); - } else if (eventData.type == "getWeaponData") { - impoundChanged = false; - let table = eventData.data; - - $(".weapon-information-title-holder").data( "dbid", table["id"] ); - - $(".weapon-info-serial-input").val(table["serial"]); - $(".weapon-info-owner-input").val(table["owner"]); - $(".weapon-info-class-input").val(table["weapClass"]); - $(".weapon-info-model-input").val(table["weapModel"]); - $(".weapon-info-imageurl-input").val(table["image"]); - - $(".weapon-info-content").val(table["information"]); - - $(".weapon-info-image").attr("src", table["image"]); - - $(".weapon-info-imageurl-input").val(table["image"]); - } else if (eventData.type == "updateVehicleDbId") { - $(".vehicle-information-title-holder").data("dbid", Number(eventData.data)); - } else if (eventData.type == "updateIncidentDbId") { - $(".manage-incidents-editing-title").data("id", Number(eventData.data)); - - $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); - $(".manage-incidents-reports-content").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-officers-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-civilians-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-evidence-add-btn").css( - "pointer-events", - "auto" - ); - $(".associated-incidents-tags-add-btn").css( - "pointer-events", - "auto" - ); - } else if (eventData.type == "callDetach") { - $(".active-calls-item") - .filter("[data-id='" + eventData.callid + "']") - .children() - .children() - .find(".call-radio") - .html(eventData.data); - } else if (eventData.type == "callAttach") { - $(".active-calls-item") - .filter("[data-id='" + eventData.callid + "']") - .children() - .children() - .find(".call-radio") - .html(eventData.data); - } else if (eventData.type == "getAllLogs") { - let table = eventData.data; - $(".stafflogs-container").empty(); - $.each(table, function (index, value) { - $(".stafflogs-container").append( - `

        • ${value.text - } (${timeAgo( - Number(value.time) - )})

        ` - ); - }); - } else if (eventData.type == "statusImpound") { - const table = eventData.data; - const plate = eventData.plate; - const linkedreport = table["linkedreport"]; - const fee = table["fee"]; - const time = table["time"] * 1000; - - let localDate = new Date(time); - const impoundDate = localDate.toLocaleDateString("en-US", { - timeZone: "UTC", - }); - const impoundTime = localDate.toLocaleTimeString("en-US", { - timeZone: "UTC", - }); - - $(".impound-plate").val(plate).attr("disabled", "disabled"); - $(".impound-linkedreport") - .val(linkedreport) - .attr("disabled", "disabled"); - $(".impound-fee") - .val("$" + fee) - .attr("disabled", "disabled"); - - if (table.paid === 1) { - $(".impound-fee").css("color", "green"); - } else { - $(".impound-fee").css("color", "red"); - } - - $(".impound-time") - .val(impoundDate + " - " + impoundTime) - .attr("disabled", "disabled"); - $(".impound-cancel").html("Close"); - $(".impound-submit").fadeOut(250); - $(".impound-form").slideDown(250); - $(".impound-form").fadeIn(250); - } else if (eventData.type == "greenImpound") { - $(".vehicle-tags") - .find(".impound-tag") - .addClass("green-tag") - .removeClass("red-tag"); - } else if (eventData.type == "redImpound") { - $(".vehicle-tags") - .find(".impound-tag") - .removeClass("green-tag") - .addClass("red-tag"); - } - }); -}); - -function fidgetSpinner(page) { - $(".close-all").fadeOut(0); - $(".container-load").fadeIn(0); - if (page == ".dashboard-page-container"){ - $.post(`https://${GetParentResourceName()}/getAllDashboardData`, JSON.stringify({})); - } - if (page == ".bolos-page-container") { - $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); - } - if (page == ".reports-page-container") { - $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); - } - if (page == ".stafflogs-page-container") { - $.post(`https://${GetParentResourceName()}/getAllLogs`, JSON.stringify({})); - } - if (page == ".incidents-page-container") { - $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); - } - setTimeout(() => { - $(".container-load").fadeOut(0); - $(page).fadeIn(0); - }, 1250); -} - -function timeShit() { - let localDate = new Date(); - const myTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone - date = localDate.toLocaleDateString("en-US", { - timeZone: myTimeZone, - }); - time = localDate.toLocaleTimeString("en-US", { - timeZone: myTimeZone, - }); - $(".date").html(date); - $(".time").html(time); -} - -setInterval(timeShit, 1000); - -function addTag(tagInput) { - $(".tags-holder").prepend(`
        ${tagInput}
        `); - - $.post( - `https://${GetParentResourceName()}/newTag`, - JSON.stringify({ - id: $(".manage-profile-citizenid-input").val(), - tag: tagInput, - }) - ); -} - -// Context menu - -var menu = document.querySelector(".contextmenu"); - -function showMenu(x, y) { - $(".contextmenu").css("left", x + "px"); - $(".contextmenu").css("top", y + "px"); - $(".contextmenu").addClass("contextmenu-show"); -} - -function showChargesMenu(x, y) { - $(".ccontextmenu").css("left", x + "px"); - $(".ccontextmenu").css("top", y + "px"); - $(".ccontextmenu").addClass("ccontextmenu-show"); -} - -function hideMenu() { - $(".contextmenu").removeClass("contextmenu-show"); -} - -function hideChargesMenu() { - $(".ccontextmenu").removeClass("ccontextmenu-show"); -} - -function onMouseDown(e) { - hideMenu(); - hideChargesMenu(); - document.removeEventListener("mouseup", onMouseDown); -} - -function openContextMenu(e, args) { - e.preventDefault(); - showMenu(e.pageX, e.pageY); - $(".contextmenu").empty(); - $.each(args, function (index, value) { - if (value.status !== "blur(5px)") { - $(".contextmenu").prepend( - ` -
      • - - - ${value.text} - -
      • - ` - ); - } - }); - document.addEventListener("mouseup", onMouseDown); -} - -function openChargesContextMenu(e, args) { - e.preventDefault(); - showChargesMenu(e.pageX, e.pageY); - $(".ccontextmenu").empty(); - $.each(args, function (index, value) { - if (value.status !== "blur(5px)") { - $(".ccontextmenu").prepend( - ` -
      • - ${value.info} -
      • - ` - ); - } - }); - document.addEventListener("mouseup", onMouseDown); -} - -function expandImage(url) { - $(".close-all").css("filter", "brightness(35%)"); - $(".gallery-image-enlarged").fadeIn(150); - $(".gallery-image-enlarged").css("display", "block"); - $(".gallery-image-enlarged").attr("src", url); -} - -function copyImageSource(url) { - const el = document.createElement('textarea'); - el.value = url; - document.body.appendChild(el); - el.select(); - document.execCommand('copy'); - document.body.removeChild(el); -} - -function removeImage(url) { - let cid = $(".manage-profile-citizenid-input").val(); - $(".gallery-inner-container img") - .filter("[src='" + url + "']") - .remove(); -} - -function hideIcidentsMenu() { - if ( - $(".icidents-person-search-container").css("display") != "none" && - !mouse_is_inside - ) { - $(".icidents-person-search-container").fadeOut(250); - $(".close-all").css("filter", "none"); - } -} - -function onMouseDownIcidents(e) { - hideIcidentsMenu(); - document.removeEventListener("mouseup", onMouseDownIcidents); -} - -function titleCase(str) { - return str - .split(' ') - .map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase()) - .join(' '); -} - -function searchProfilesResults(result) { - canSearchForProfiles = true; - $(".profile-items").empty(); - - if (result.length < 1) { - $(".profile-items").html( - ` -
        - -
        -
        -
        No Users Matching that search
        -
        -
        -
        -
        -
        - ` - ); - return true; - } - - let profileHTML = ""; - - result.forEach((value) => { - let charinfo = value.charinfo; - let metadata = value.licences; - - if (typeof value.charinfo == "string") { - charinfo = JSON.parse(charinfo); - } - - if (typeof value.metadata == "string") { - metadata = JSON.parse(metadata); - } - - let name = charinfo.firstname + " " + charinfo.lastname; - let warrant = "red-tag"; - let convictions = "red-tag"; - - let licences = ""; - let licArr = Object.entries(value.licences); - - if (licArr.length == 0 || licArr.length == undefined) { - var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; - licArr = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); - } - - if (licArr.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { - for (const [lic, hasLic] of licArr) { - let tagColour = - hasLic == true ? "green-tag" : "red-tag"; - licences += `${titleCase(lic)}`; - } - } - - if (value.warrant == true) { - warrant = "green-tag"; - } - - if (value.convictions < 5) { - convictions = "green-tag"; - } else if ( - value.convictions > 4 && - value.convictions < 15 - ) { - convictions = "orange-tag"; - } - - if (value.pp == '') { - value.pp = 'img/not-found.webp' - } - - profileHTML += ` -
        - -
        -
        -
        ${name}
        -
        - ${licences} -
        -
        -
        -
        ID: ${value.citizenid}
          -
        -
        -
        - `; - }); - - $(".profile-items").html(profileHTML); -} - -window.addEventListener("load", function () { - document - .getElementById("offenses-search") - .addEventListener("keyup", function () { - var search = this.value.toLowerCase(); - if (search.length > 1) { - $.each($(".offense-item"), function (i, d) { - const Name = $(this) - .find(".offense-item-offense") - .html() - .toLowerCase(); - const Number = $(this) - .find(".offense-item-id") - .html() - .toLowerCase(); - if (Name.includes(search)) { - $(this).show(); - } else if (Number.includes(search)) { - $(this).show(); - } else { - $(this).hide(); - } - }); - } else { - $.each($(".offense-item"), function (i, d) { - $(this).show(); - }); - } - }); +let canSearchForProfiles = true; +let canSaveProfile = true; +let canRefreshBolo = true; +let canRefreshReports = true; +let canRefreshIncidents = true; +let canSearchForWeapons = true; +let canInputTag = true; +let canInputBoloTag = true; +let canInputBoloOfficerTag = true; +let canSearchReports = true; +let canCreateBulletin = 0; +let mouse_is_inside = false; +let currentTab = ".dashboard-page-container"; +let MyName = ""; +let canInputReportTag = true; +let canInputReportOfficerTag = true; +let canInputReportCivilianTag = true; +let canSearchForVehicles = true; +let canSearchForReports = true; +let canSaveVehicle = true; +let canSaveWeapon = true; +var LastName = ""; +var DispatchNum = 0; +var playerJob = ""; +let rosterLink = ""; + +let impoundChanged = false; + +// TEMP CONFIG OF JOBS +const PoliceJobs = { + ['police']: true, +} + +const AmbulanceJobs = { + ['ambulance']: true, +} + +const DojJobs = { + ['lawyer']: true, + ['judge']: true +} + +const MONTH_NAMES = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", +]; + +function getFormattedDate(date, prefomattedDate = false, hideYear = false) { + const day = date.getDate(); + const month = MONTH_NAMES[date.getMonth()]; + const year = date.getFullYear(); + const hours = date.getHours(); + let minutes = date.getMinutes(); + + if (minutes < 10) { + minutes = `0${minutes}`; + } + + if (prefomattedDate) { + return `${prefomattedDate} at ${hours}:${minutes}`; + } + + if (hideYear) { + return `${day}. ${month} at ${hours}:${minutes}`; + } + + return `${day}. ${month} ${year}. at ${hours}:${minutes}`; +} + +var quotes = [ + 'Project Sloth On Top!', + 'A Discord rewrite fixes everything.', + 'Does anyone even read these?', +] + +function randomizeQuote() { + return randomQuote = quotes[Math.floor(Math.random() * quotes.length)]; +} + +function timeAgo(dateParam) { + if (!dateParam) { + return null; + } + + const date = + typeof dateParam === "object" ? dateParam : new Date(dateParam); + const DAY_IN_MS = 86400000; + const today = new Date(); + const yesterday = new Date(today - DAY_IN_MS); + const seconds = Math.round((today - date) / 1000); + const minutes = Math.round(seconds / 60); + const isToday = today.toDateString() === date.toDateString(); + const isYesterday = yesterday.toDateString() === date.toDateString(); + const isThisYear = today.getFullYear() === date.getFullYear(); + + if (seconds < 5) { + return "Just Now"; + } else if (seconds < 60) { + return `${seconds} Seconds ago`; + } else if (seconds < 90) { + return "About a minute ago"; + } else if (minutes < 60) { + return `${minutes} Minutes ago`; + } else if (isToday) { + return getFormattedDate(date, "Today"); + } else if (isYesterday) { + return getFormattedDate(date, "Yesterday"); + } else if (isThisYear) { + return getFormattedDate(date, false, true); + } + + return getFormattedDate(date); +} + +$(document).ready(() => { + $(".header").hover( + function () { + $(".close-all").css("opacity", "0.5"); + }, + function () { + $(".close-all").css("opacity", "1"); + } + ); + $(".incidents-charges-title-container").hover( + function () { + $(".incidents-charges-table-container").css("opacity", "0.1"); + $(".close-all").css("filter", "none"); + }, + function () { + $(".close-all").css("filter", "brightness(30%)"); + $(".incidents-charges-table-container").css("opacity", "1"); + } + ); + $(".nav-item").click(function () { + if ($(this).hasClass("active-nav") == false) { + fidgetSpinner($(this).data("page")); + currentTab = $(this).data("page"); + } + }); + + $(".profile-items").on("click", ".profile-item", async function () { + let id = $(this).data("id"); + let result = await $.post( + `https://${GetParentResourceName()}/getProfileData`, + JSON.stringify({ + id: id, + }) + ); + + if (!canInputTag) { + if ($(".tags-add-btn").hasClass("fa-minus")) { + $(".tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".tag-input").remove(); + canInputTag = true; + } + + if ($(".gallery-upload-input").css("display") == "block") { + $(".gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".gallery-upload-input").css("display", "none"); + }, 250); + } + + if ($(".gallery-add-btn").hasClass("fa-minus")) { + $(".gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + $(".manage-profile-editing-title").html(`You are currently editing ${result["firstname"]} ${result["lastname"]}`); + $(".manage-profile-citizenid-input").val(result['cid']); + $(".manage-profile-name-input-1").val(result["firstname"]); + $(".manage-profile-name-input-2").val(result["lastname"]); + $(".manage-profile-dob-input").val(result["dob"]); + $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); + $(".manage-profile-apartment-input").val(`${result.apartment}`); + $(".manage-profile-url-input").val(result["profilepic"] ?? ""); + $(".manage-profile-info").val(result["mdtinfo"]); + $(".manage-profile-info").removeAttr("disabled"); + $(".manage-profile-fingerprint").val(result["fingerprint"]); + $(".manage-profile-fingerprint").removeAttr("disabled"); + $(".manage-profile-pic").attr("src", result["profilepic"] ?? "img/male.png"); + + const { vehicles, tags, gallery, convictions, properties } = result + + $(".licenses-holder").empty(); + $(".tags-holder").empty(); + $(".vehs-holder").empty(); + $(".gallery-inner-container").empty(); + $(".convictions-holder").empty(); + + let licencesHTML = '
        No Licenses
        '; + let tagsHTML = '
        No Tags
        '; + let convHTML = '
        Clean Record ?
        '; + let vehHTML = '
        No Vehicles
        '; + let galleryHTML = '
        No Photos
        '; + let propertyHTML = '
        No Properties
        '; + + // convert key value pair object of licenses to array + let licenses = Object.entries(result.licences); + + if (licenses.length == 0 || licenses.length == undefined) { + var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; + licenses = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); + } + + if (licenses.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { + licencesHTML = ''; + for (const [lic, hasLic] of licenses) { + + let tagColour = hasLic == true ? "green-tag" : "red-tag"; + licencesHTML += `${titleCase(lic)}`; + } + if (vehicles && vehicles.length > 0) { + + vehHTML = ''; + vehicles.forEach(value => { + vehHTML += `
        ${value.plate} - ${value.model}
        ` + }) + } + if (convictions && convictions.length > 0) { + convHTML = ''; + convictions.forEach(value => { + convHTML += `
        ${value}
        `; + }) + } + if (properties && properties.length > 0) { + propertyHTML = ''; + properties.forEach(value => { + propertyHTML += `
        ${value.label}
        `; + }) + } + } + if (tags && tags.length > 0) { + tagsHTML = ''; + tags.forEach((tag) => { + tagsHTML += `
        ${tag}
        `; + }) + } + + if (gallery && gallery.length > 0) { + galleryHTML = ''; + gallery.forEach(value => { + galleryHTML += ``; + }) + } + + if (result.isLimited) { + $(".manage-profile-vehs-container").fadeOut(250); + $(".manage-profile-houses-container").fadeOut(250); + $(".manage-profile-houses-container").fadeOut(250); + } else { + $(".manage-profile-vehs-container").fadeIn(250); + $(".manage-profile-houses-container").fadeIn(250); + $(".manage-profile-houses-container").fadeIn(250); + } + + $(".licenses-holder").html(licencesHTML); + $(".tags-holder").html(tagsHTML); + $(".convictions-holder").html(convHTML); + $(".vehs-holder").html(vehHTML); + $(".gallery-inner-container").html(galleryHTML); + $(".houses-holder").html(propertyHTML); + }); + //
        ID: ${BulletinId}
        + + $(".bulletin-add-btn").click(function () { + if (canCreateBulletin == 0) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + let BulletinId = Number($(".bulletin-item").first().data("id")) + 1; + if (Number.isNaN(BulletinId)) { + BulletinId = 1; + } + canCreateBulletin = BulletinId; + $(".bulletin-items-continer") + .prepend(`
        + + +
        +
        ${MyName} - Just Now
        +
        +
        `); + } else { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".bulletin-items-continer") + .find("[data-id='" + canCreateBulletin + "']") + .remove(); + canCreateBulletin = 0; + } + }); + //
        ID: ${canCreateBulletin}
        + $(".bulletin-items-continer").on("keydown", ".bulletin-item", function (e) { + if (e.keyCode === 13) { + $(".bulletin-add-btn").removeClass("fa-minus").addClass("fa-plus"); + let id = $(this).find(".bulletin-id").text(); + let date = $(this).find(".bulletin-date").text(); + let title = $(this).find(".bulletin-item-title").text(); + let info = $(this).find(".bulletin-item-info").text(); + let time = new Date(); + $.post( + `https://${GetParentResourceName()}/newBulletin`, + JSON.stringify({ + title: title, + info: info, + time: time.getTime(), + }) + ); + $(".bulletin-items-continer") + .find("[data-id='" + canCreateBulletin + "']") + .remove(); + $(".bulletin-items-continer") + .prepend(`
        +
        ${title}
        +
        ${info}
        +
        + +
        ${MyName} - ${timeAgo( + Number(time.getTime()) + )}
        +
        +
        `); + canCreateBulletin = 0; + } + }); + $(".bulletin-items-continer").on( + "contextmenu", + ".bulletin-item", + function (e) { + let args = [ + { + className: "remove-bulletin", + icon: "fas fa-times", + text: "Remove Item", + info: $(this).data("id"), + status: $(this).data("title"), + }, + ]; + openContextMenu(e, args); + } + ); + $(".contextmenu").on("click", ".remove-bulletin", function () { + let id = $(this).data("info"); + let title = $(this).data("status") + $(".bulletin-items-continer") + .find("[data-id='" + id + "']") + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteBulletin`, + JSON.stringify({ + id: id, + title: title + }) + ); + if (canCreateBulletin == id) { + canCreateBulletin = 0; + } + if ($(".bulletin-add-btn").hasClass("fa-minus")) { + $(".bulletin-add-btn").removeClass("fa-minus").addClass("fa-plus"); + } + }); + $(".associated-incidents-tags-add-btn").on("click", "", function () { + document.addEventListener("mouseup", onMouseDownIcidents); + $(".icidents-person-search-container").fadeIn(250); + $(".close-all").css("filter", "brightness(15%)"); + }); + $(".gallery-add-btn").click(function () { + if ($(".manage-profile-citizenid-input").val()) { + if ($(".gallery-upload-input").css("display") == "none") { + $(".gallery-upload-input").slideDown(250); + $(".gallery-upload-input").css("display", "block"); + $(this).removeClass("fa-plus").addClass("fa-minus"); + } else { + $(".gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".gallery-upload-input").css("display", "none"); + }, 250); + $(this).removeClass("fa-minus").addClass("fa-plus"); + } + } else { + $(this).effect("shake", { times: 2, distance: 2 }, 500); + } + }); + $("#gallery-upload-input").keydown(function (e) { + if (e.keyCode === 13) { + let URL = $("#gallery-upload-input").val(); + let cid = $(".manage-profile-citizenid-input").val(); + if (URL !== "") { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".gallery-inner-container").prepend( + `` + ); + $("#gallery-upload-input").val(""); + $(".gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".gallery-upload-input").css("display", "none"); + }, 250); + $(".gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + } + }); + $(".manage-profile-save").click(function () { + if (canSaveProfile == true) { + canSaveProfile = false; + $(".manage-profile-save").empty(); + $(".manage-profile-save").prepend( + `` + ); + setTimeout(() => { + $(".manage-profile-save").empty(); + $(".manage-profile-save").html("Save"); + canSaveProfile = true; + }, 750); + + setTimeout(() => { + let tags = new Array(); + let gallery = new Array(); + let licenses = {}; + + $(".tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "" && $(this).text() != "No Tags") { + tags.push($(this).text()); + } + }); + + $(".gallery-inner-container") + .find("img") + .each(function () { + if ($(this).attr("src") != "") { + gallery.push($(this).attr("src")); + } + }); + + let pfp = $(".manage-profile-pic").attr("src"); + let newpfp = $(".manage-profile-url-input").val(); + if (newpfp.includes("base64")) { + newpfp = "img/not-found.webp"; + } else { + pfp = newpfp; + } + let description = $(".manage-profile-info").val(); + let fingerprint = $(".manage-profile-fingerprint").val(); + let id = $(".manage-profile-citizenid-input").val(); + + $(".licenses-holder") + .find("span") + .each(function(){ + let type = $(this).data("type") + if ($(this).attr('class').includes('green-tag')){ + licenses[type] = true; + } + else{ + licenses[type] = false; + } + }) + + const fName = $(".manage-profile-name-input-1").val(); + const sName = $(".manage-profile-name-input-2").val(); + + $.post( + `https://${GetParentResourceName()}/saveProfile`, + JSON.stringify({ + pfp: pfp, + description: description, + id: id, + fName: fName, + sName: sName, + tags: tags, + gallery: gallery, + fingerprint: fingerprint, + licenses: licenses + }) + ); + $(".manage-profile-pic").attr("src", newpfp); + }, 250); + } + }); + $(".manage-incidents-title-holder").on( + "click", + ".manage-incidents-save", + function () { + if (canSaveProfile == true) { + canSaveProfile = false; + $(".manage-incidents-save").empty(); + $(".manage-incidents-save").prepend( + `` + ); + setTimeout(() => { + $(".manage-incidents-save").empty(); + $(".manage-incidents-save").prepend( + `` + ); + canSaveProfile = true; + }, 750); + + // Title, information, tags, officers involved, civs involved, evidence + const title = $("#manage-incidents-title-input").val(); + const information = $( + ".manage-incidents-reports-content" + ).val(); + const dbid = $(".manage-incidents-editing-title").data("id"); + + let tags = new Array(); + let officers = new Array(); + let civilians = new Array(); + let evidence = new Array(); + + $(".manage-incidents-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + tags.push($(this).text()); + } + }); + + $(".manage-incidents-officers-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + officers.push($(this).text()); + } + }); + + $(".manage-incidents-civilians-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + civilians.push($(this).text()); + } + }); + + $(".manage-incidents-evidence-holder") + .find("img") + .each(function () { + if ($(this).attr("src") != "") { + evidence.push($(this).attr("src")); + } + }); + + let time = new Date(); + + let associated = new Array(); + + $(".associated-incidents-user-container").each(function ( + index + ) { + var cid = $(this).data("id"); + var guilty = false; + var warrant = false; + var processed = false; + var isassociated = false; + var charges = new Array(); + + $(".associated-incidents-user-tags-holder") + .children("div") + .each(function (index) { + if ($(this).data("id") == cid) { + if ($(this).hasClass("green-tag")) { + if ($(this).text() == "Guilty") { + guilty = true; + } + if ($(this).text() == "Warrant") { + warrant = true; + } + if ($(this).text() == "Processed") { + processed = true; + } + if ($(this).text() == "Associated") { + isassociated = true; + } + } + } + }); + + $(".associated-incidents-user-holder") + .children("div") + .each(function (index) { + if ( + ( $(".associated-incidents-user-holder") + .children() + .eq(index) + .data("id") == cid ) + ) { + charges.push( + $(".associated-incidents-user-holder") + .children() + .eq(index) + .html() + ); + } + }); + + associated.push({ + Cid: $(this).data("id"), + Warrant: warrant, + Guilty: guilty, + Processed: processed, + Isassociated: isassociated, + Charges: charges, + Fine: $(".fine-amount") + .filter("[data-id='" + $(this).data("id") + "']") + .val(), + Sentence: $(".sentence-amount") + .filter("[data-id='" + $(this).data("id") + "']") + .val(), + recfine: $(".fine-recommended-amount") + .filter("[data-id='" + $(this).data("id") + "']") + .val(), + recsentence: $(".sentence-recommended-amount") + .filter("[data-id='" + $(this).data("id") + "']") + .val(), + }); + }); + + $.post( + `https://${GetParentResourceName()}/saveIncident`, + JSON.stringify({ + ID: dbid, + title: title, + information: information, + tags: tags, + officers: officers, + civilians: civilians, + evidence: evidence, + associated: associated, + time: time.getTime(), + }) + ); + + setTimeout(() => { + if (canRefreshIncidents == true) { + canRefreshIncidents = false; + $(".incidents-search-refresh").empty(); + $(".incidents-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".incidents-search-refresh").empty(); + $(".incidents-search-refresh").html("Refresh"); + canRefreshIncidents = true; + $.post( + `https://${GetParentResourceName()}/getAllIncidents`, + JSON.stringify({}) + ); + }, 1500); + } + }, 1000); + } + } + ); + $(".manage-incidents-title-holder").on( + "click", + ".manage-incidents-create", + function () { + let tempalte = + "Summary:\n\n[Insert Report Summary Here]"; + $("#manage-incidents-title-input").val( + "Name - Charge - " + $(".date").html() + ); + $(".manage-incidents-reports-content").val(tempalte); + + $(".manage-incidents-tags-holder").empty(); + $(".manage-incidents-officers-holder").empty(); + $(".manage-incidents-civilians-holder").empty(); + $(".manage-incidents-evidence-holder").empty(); + $(".manage-incidents-title-holder").empty(); + $(".manage-incidents-title-holder").prepend( + ` +
        Manage Incident
        +
        +
        + ` + ); + $(".manage-incidents-title").css("width", "66%"); + $(".manage-incidents-create").css("margin-right", "0px"); + + $(".incidents-ghost-holder").html(""); + $(".associated-incidents-tags-holder").html(""); + + $(".manage-incidents-editing-title").html( + "You are currently creating a new Incident" + ); + $(".manage-incidents-editing-title").data("id", 0); + + $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); + $(".manage-incidents-reports-content").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-officers-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-civilians-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-evidence-add-btn").css( + "pointer-events", + "auto" + ); + $(".associated-incidents-tags-add-btn").css( + "pointer-events", + "auto" + ); + } + ); + $(".tags-add-btn").click(function () { + if ($(".manage-profile-citizenid-input").val()) { + if (canInputTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".tags-holder").prepend( + `` + ); + canInputTag = false; + } else if (!canInputTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".tag-input").remove(); + canInputTag = true; + } + } else { + $(this).effect("shake", { times: 2, distance: 2 }, 500); + } + }); + + $(".tags-holder").on("keydown", ".tag-input", function (e) { + if (e.keyCode === 13) { + addTag($(".tag-input").text()); + if ($(".tags-add-btn").hasClass("fa-minus")) { + $(".tags-add-btn").removeClass("fa-minus").addClass("fa-plus"); + } + $(".tag-input").remove(); + } + }); + $(".contextmenu").on("click", ".search-vehicle", function () { + let plate = $(this).data("info"); + fidgetSpinner(".dmv-page-container"); + currentTab = ".dmv-page-container"; + setTimeout(() => { + $(".dmv-search-input").slideDown(250); + $(".dmv-search-input").css("display", "block"); + setTimeout(() => { + $("#dmv-search-input:text").val(plate.toString()); + setTimeout(() => { + var e = jQuery.Event("keydown"); + e.which = 13; // # Some key code value + e.keyCode = 13 + $("#dmv-search-input").trigger(e); + }, 250); + }, 250); + }, 250); + }); + $(".vehs-holder").on("contextmenu", ".veh-tag", function (e) { + let args = [ + { + className: "search-vehicle", + icon: "fas fa-car", + text: "Search Vehicle", + info: $(this).data("plate"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + + $(".contextmenu").on("click", ".make-waypoint", function () { + let coord = $(this).data("info").split("===") + setTimeout(() => { + $.post( + `https://${GetParentResourceName()}/SetHouseLocation`, + JSON.stringify({ + coord: coord, + }) + ); + }, 250); + }); + $(".houses-holder").on("contextmenu", ".white-tag", function (e) { + let args = [ + { + className: "make-waypoint", + icon: "fas fa-map-pin", + text: "Make Waypoint", + info: $(this).data("location"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + $(".gallery-inner-container").on("click", ".gallery-img", function () { + if ($(this).css("filter") == "none") { + $(this).css("filter", "blur(5px)"); + } else { + $(this).css("filter", "none"); + } + }); + $(".contextmenu").on("click", ".expand-image", function () { + expandImage($(this).data("info")); + }); + $(".contextmenu").on("click", ".remove-image", function () { + removeImage($(this).data("info")); + }); + $(".contextmenu").on("click", ".copy-image-link", function () { + copyImageSource($(this).data("info")); + }); + $(".contextmenu").on("click", ".remove-image-incident", function () { + $(".manage-incidents-evidence-holder img") + .filter("[src='" + $(this).data("info") + "']") + .remove(); + }); + $(".gallery-inner-container").on( + "contextmenu", + ".gallery-img", + function (e) { + let args = [ + { + className: "remove-image", + icon: "fas fa-times", + text: "Remove Image", + info: $(this).attr("src"), + status: "", + }, + { + className: "expand-image", + icon: "fas fa-expand", + text: "Expand Image", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + ]; + openContextMenu(e, args); + } + ); + + $(".licenses-holder").on("contextmenu", ".license-tag", function (e) { + const status = $(this).data("type"); + let type = $(this).html(); + + if (type == "Theory") { + info = "theory"; + } else if (type == "Car") { + info = "drive"; + } else if (type == "Bike") { + info = "drive_bike"; + } else if (type == "Truck") { + info = "drive_truck"; + } else if (type == "Hunting") { + info = "hunting"; + } else if (type == "Pilot") { + info = "pilot"; + } else if (type == "Weapon") { + info = "weapon"; + } else { + info = type; + } + + if ($(this).hasClass("green-tag")) { + openContextMenu(e, [ + { + className: "revoke-licence", + icon: "fas fa-times", + text: "Revoke License", + info: info, + status: status, + }, + ]); + } else if ($(this).hasClass("red-tag")) { + openContextMenu(e, [ + { + className: "give-licence", + icon: "fas fa-check", + text: "Give License", + info: info, + status: status, + }, + ]); + } + }); + + $(".contextmenu").on("click", ".revoke-licence", function () { + // $.post( + // `https://${GetParentResourceName()}/updateLicence`, + // JSON.stringify({ + // cid: $(".manage-profile-citizenid-input").val(), + // type: $(this).data("status"), + // status: "revoke", + // }) + // ); + + const Elem = $(this).data("status"); + $(".license-tag") + .filter(`[data-type="${Elem}"]`) + .removeClass("green-tag") + .addClass("red-tag"); + + onMouseDown(); + }); + + $(".contextmenu").on("click", ".give-licence", function () { + // $.post( + // `https://${GetParentResourceName()}/updateLicence`, + // JSON.stringify({ + // cid: $(".manage-profile-citizenid-input").val(), + // type: $(this).data("status"), + // status: "give", + // }) + // ); + + const Elem = $(this).data("status"); + $(".license-tag") + .filter(`[data-type="${Elem}"]`) + .removeClass("red-tag") + .addClass("green-tag"); + + onMouseDown(); + }); + + $(".profile-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".profile-search-input").css("display") == "none") { + $(".profile-search-input").slideDown(250); + $(".profile-search-input").css("display", "block"); + } else { + $(".profile-search-input").slideUp(250); + setTimeout(() => { + $(".profile-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#profile-search-input").keydown(async function (e) { + if (e.keyCode === 13 && canSearchForProfiles == true) { + let name = $("#profile-search-input").val(); + if (name != "") { + canSearchForProfiles = false; + $(".profile-items").empty(); + $(".profile-items").prepend( + `
        ` + ); + + let result = await $.post( + `https://${GetParentResourceName()}/searchProfiles`, + JSON.stringify({ + name: name, + }) + ); + + searchProfilesResults(result); + } + } + }); + + $(".incidents-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".incidents-search-input").css("display") == "none") { + $(".incidents-search-input").slideDown(250); + $(".incidents-search-input").css("display", "block"); + } else { + $(".incidents-search-input").slideUp(250); + setTimeout(() => { + $(".incidents-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#incidents-search-input").keydown(function (e) { + if (e.keyCode === 13 && canSearchForProfiles == true) { + let incident = $("#incidents-search-input").val(); + if (incident !== "") { + canSearchForProfiles = false; + $.post( + `https://${GetParentResourceName()}/searchIncidents`, + JSON.stringify({ + incident: incident, + }) + ); + $(".incidents-items").empty(); + $(".incidents-items").prepend( + `
        ` + ); + } + } + }); + + $("#dispatchmsg").keydown(function (e) { + const keyCode = e.which || e.keyCode; + if (keyCode === 13 && !e.shiftKey) { + e.preventDefault(); + const time = new Date(); + $.post( + `https://${GetParentResourceName()}/dispatchMessage`, + JSON.stringify({ + message: $(this).val(), + time: time.getTime(), + }) + ); + $(this).val(""); + } + }); + + $(".incidents-items").on("click", ".incidents-item", function () { + const id = $(this).data("id"); + $.post( + `https://${GetParentResourceName()}/getIncidentData`, + JSON.stringify({ + id: id, + }) + ); + }); + $(".manage-incidents-civilians-holder").on("click", ".manage-incidents-civilians", async function () { + const name = $(this).text(); + fidgetSpinner(".profile-page-container"); + currentTab = ".profile-page-container"; + $(".profile-search-input").slideDown(250); + $(".profile-search-input").css("display", "block"); + $("#profile-search-input:text").val(name); + canSearchForProfiles = false; + let result = await $.post( + `https://${GetParentResourceName()}/searchProfiles`, + JSON.stringify({ + name: name, + }) + ); + + searchProfilesResults(result); + } + ); + document.onkeyup = function (data) { + if (data.which == 27) { + let shouldClose = true; + + if ($(".respond-calls-container").css("display") == "block") { + shouldClose = false; + $(".respond-calls-container").fadeOut(500); + setTimeout(() => { + $(".close-all").css("filter", "none"); + }, 250); + } + + if ($(".gallery-image-enlarged").css("display") == "block") { + shouldClose = false; + $(".gallery-image-enlarged").fadeOut(150); + $(".gallery-image-enlarged").css("display", "none"); + $(".close-all").css("filter", "none"); + } + + if ($(".incidents-image-enlarged").css("display") == "block") { + shouldClose = false; + $(".incidents-image-enlarged").fadeOut(150); + $(".incidents-image-enlarged").css("display", "none"); + } + + if ( + $(".icidents-person-search-container").css("display") != "none" + ) { + shouldClose = false; + $(".icidents-person-search-container").fadeOut(250); + $(".close-all").css("filter", "none"); + } + + if ($(".incidents-charges-table").css("display") != "none") { + shouldClose = false; + $(".incidents-charges-table").slideUp(500); + $(".incidents-charges-table").fadeOut(500); + setTimeout(() => { + $(".close-all").css("filter", "none"); + }, 550); + } + + if ($(".dispatch-attached-units").css("display") != "none") { + shouldClose = false; + $(".dispatch-attached-units").slideUp(500); + $(".dispatch-attached-units").fadeOut(500); + setTimeout(() => { + $(".close-all").css("filter", "none"); + }, 550); + } + + if ($(".impound-form").css("display") != "none") { + shouldClose = false; + $(".impound-form").slideUp(250); + $(".impound-form").fadeOut(250); + setTimeout(() => { + $(".close-all").css("filter", "none"); + }, 550); + } + + if (shouldClose == true) { + $.post(`https://${GetParentResourceName()}/escape`, JSON.stringify({})); + } + } + }; + $(".manage-incidents-tags-add-btn").click(function () { + if ($(".tag-incident-input")[0]) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".tag-incident-input").remove(); + } else { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".manage-incidents-tags-holder").prepend( + `` + ); + } + }); + + $(".icidents-person-search-name-input").on("keydown", "", function (e) { + if (e.keyCode === 13) { + let name = $(".icidents-person-search-name-input").val(); + $.post( + `https://${GetParentResourceName()}/incidentSearchPerson`, + JSON.stringify({ + name: name, + }) + ); + } + }); + $(".manage-incidents-tags-holder").on( + "keydown", + ".tag-incident-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-incidents-tags-holder").prepend( + `
        ${$( + ".tag-incident-input" + ).text()}
        ` + ); + // Have it save instantly if it's an existing report. + if ($(".manage-incidents-tags-add-btn").hasClass("fa-minus")) { + $(".manage-incidents-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".tag-incident-input").remove(); + } + } + ); + + $(".manage-incidents-officers-add-btn").click(function () { + if ($(".officers-incident-input")[0]) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".officers-incident-input").remove(); + } else { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".manage-incidents-officers-holder").prepend( + `` + ); + } + }); + + $(".manage-incidents-officers-holder").on( + "keydown", + ".officers-incident-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-incidents-officers-holder").prepend( + `
        ${$( + ".officers-incident-input" + ).text()}
        ` + ); + // Have it save instantly if it's an existing report. + if ( + $(".manage-incidents-officers-add-btn").hasClass("fa-minus") + ) { + $(".manage-incidents-officers-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".officers-incident-input").remove(); + } + } + ); + + $(".manage-incidents-civilians-add-btn").click(function () { + if ($(".civilians-incident-input")[0]) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".civilians-incident-input").remove(); + } else { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".manage-incidents-civilians-holder").prepend( + `` + ); + } + }); + + $(".manage-incidents-civilians-holder").on( + "keydown", + ".civilians-incident-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-incidents-civilians-holder").prepend( + `
        ${$( + ".civilians-incident-input" + ).text()}
        ` + ); + // Have it save instantly if it's an existing report. + if ( + $(".manage-incidents-civilians-add-btn").hasClass( + "fa-minus" + ) + ) { + $(".manage-incidents-civilians-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".civilians-incident-input").remove(); + } + } + ); + + $(".manage-incidents-evidence-add-btn").click(function () { + if ($(".incidents-upload-input").css("display") == "none") { + $(".incidents-upload-input").slideDown(250); + $(".incidents-upload-input").css("display", "block"); + $(this).removeClass("fa-plus").addClass("fa-minus"); + } else { + $(".incidents-upload-input").slideUp(250); + setTimeout(() => { + $(".incidents-upload-input").css("display", "none"); + }, 250); + $(this).removeClass("fa-minus").addClass("fa-plus"); + } + }); + + $("#incidents-upload-input").keydown(function (e) { + if (e.keyCode === 13) { + let URL = $("#incidents-upload-input").val(); + let cid = $(".manage-profile-citizenid-input").val(); + if (URL !== "") { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".manage-incidents-evidence-holder").prepend( + `` + ); + $("#incidents-upload-input").val(""); + $(".incidents-upload-input").slideUp(250); + setTimeout(() => { + $(".incidents-upload-input").css("display", "none"); + }, 250); + $(".manage-incidents-evidence-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + } + }); + + $(".manage-incidents-evidence-holder").on( + "click", + ".incidents-img", + function () { + if ($(this).css("filter") == "none") { + $(this).css("filter", "blur(5px)"); + } else { + $(this).css("filter", "none"); + } + } + ); + + $(".manage-bolos-title-holder").on( + "click", + ".manage-bolos-new", + function () { + //if ($(".manage-bolos-editing-title").html() == 'You are currently creating a new BOLO') { + //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) + //} else { + var template = ""; + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + template = + "ICU Room #: [ # ]\n\nReport ID: [ Report ID ]\n\nTime Admitted: [ Date and Time Here ]\n\nSurgery: [Yes/No]\n\nInjuries/Ailments:\n - [ Enter List Of Injuries Here ]\n\n\nAdditional Attending:\n - [ List Any Other Staff Here ]\n\n\n🧑‍🤝‍🧑 Additional Emergency Contacts:\n - [ Name And Number ]\n\n\nNotes:\n[Additional Notes Here]"; + } + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".manage-bolos-input-title").val(""); + $(".manage-bolos-input-plate").val(""); + $(".manage-bolos-input-owner").val(""); + $(".manage-bolos-input-individual").val(""); + $(".manage-bolos-reports-content").val(template); + $(".manage-bolos-tags-holder").empty(); + $(".bolo-gallery-inner-container").empty(); + $(".manage-officers-tags-holder").empty(); + + if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { + $(".manage-bolos-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".bolo-gallery-add-btn").hasClass("fa-minus")) { + $(".bolo-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".officers-add-btn").hasClass("fa-minus")) { + $(".officers-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + if ($(".bolo-gallery-upload-input").css("display") == "block") { + $(".bolo-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".bolo-gallery-upload-input").css("display", "none"); + }, 250); + } + + canInputTag = true; + canInputBoloTag = true; + canInputBoloOfficerTag = true; + + $(".tag-bolo-input").remove(); + canInputBoloTag = true; + + //} + } + ); + + $(".manage-bolos-title-holder").on( + "click", + ".manage-bolos-save", + function () { + let existing = !( + $(".manage-bolos-editing-title").html() == + "You are currently creating a new BOLO" + ); + let id = $(".manage-bolos-editing-title").data("id"); + let title = $("#bolotitle").val(); + let plate = $("#boloplate").val(); + let owner = $("#boloowner").val(); + let individual = $("#boloindividual").val(); + let detail = $("#bolodetail").val(); + + let tags = new Array(); + let gallery = new Array(); + let officers = new Array(); + + $(".manage-bolos-tags-holder").each(function (index) { + if ($(this).text() != "") { + tags.push($(this).text()); + } + }); + + $(".bolo-gallery-inner-container") + .find("img") + .each(function () { + if ($(this).attr("src") != "") { + gallery.push($(this).attr("src")); + } + }); + + $(".manage-officers-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + officers.push($(this).text()); + } + }); + + let time = new Date(); + + $.post( + `https://${GetParentResourceName()}/newBolo`, + JSON.stringify({ + existing: existing, + id: id, + title: title, + plate: plate, + owner: owner, + individual: individual, + detail: detail, + tags: tags, + gallery: gallery, + officers: officers, + time: time.getTime(), + }) + ); + } + ); + + $(".manage-incidents-evidence-holder").on( + "contextmenu", + ".incidents-img", + function (e) { + let args = [ + { + className: "remove-image-incident", + icon: "fas fa-times", + text: "Remove Image", + info: $(this).attr("src"), + status: "", + }, + { + className: "expand-image", + icon: "fas fa-expand", + text: "Expand Image", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + ]; + openContextMenu(e, args); + } + ); + + $(".bolos-search-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".bolos-search-input").css("display") == "none") { + $(".bolos-search-input").slideDown(250); + $(".bolos-search-input").css("display", "block"); + } else { + $(".bolos-search-input").slideUp(250); + setTimeout(() => { + $(".bolos-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#bolos-search-input").keydown(function (e) { + if (e.keyCode === 13 && canSearchForProfiles == true) { + let searchVal = $("#bolos-search-input").val(); + if (searchVal !== "") { + canSearchForProfiles = false; + $.post( + `https://${GetParentResourceName()}/searchBolos`, + JSON.stringify({ + searchVal: searchVal, + }) + ); + $(".bolos-items").empty(); + $(".bolos-items").prepend(`
        `); + } + } + }); + + $(".bolos-search-refresh").click(function () { + if (canRefreshBolo == true) { + canRefreshBolo = false; + $(".bolos-search-refresh").empty(); + $(".bolos-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".bolos-search-refresh").empty(); + $(".bolos-search-refresh").html("Refresh"); + canRefreshBolo = true; + $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); + }, 1500); + } + }); + + $(".manage-bolos-tags-add-btn").click(function () { + if (canInputBoloTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".manage-bolos-tags-holder").prepend( + `` + ); + canInputBoloTag = false; + } else if (!canInputBoloTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".tag-bolo-input").remove(); + canInputBoloTag = true; + } + }); + + $(".manage-bolos-tags-holder").on( + "keydown", + ".tag-bolo-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-bolos-tags-holder").prepend( + `
        ${$(".tag-bolo-input").text()}
        ` + ); + // Have it save instantly if it's an existing report. + if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { + $(".manage-bolos-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".tag-bolo-input").remove(); + canInputBoloTag = true; + } + } + ); + + $(".bolo-gallery-add-btn").click(function () { + //if ($(".manage-profile-citizenid-input").val()) { + if ($(".bolo-gallery-upload-input").css("display") == "none") { + $(".bolo-gallery-upload-input").slideDown(250); + $(".bolo-gallery-upload-input").css("display", "block"); + $(this).removeClass("fa-plus").addClass("fa-minus"); + } else { + $(".bolo-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".bolo-gallery-upload-input").css("display", "none"); + }, 250); + $(this).removeClass("fa-minus").addClass("fa-plus"); + } + //} else { + // $(this).effect("shake", { times: 2, distance: 2 }, 500) + // } + }); + + $("#bolo-gallery-upload-input").keydown(function (e) { + if (e.keyCode === 13) { + let URL = $("#bolo-gallery-upload-input").val(); + let cid = $(".manage-profile-citizenid-input").val(); + if (URL !== "") { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".bolo-gallery-inner-container").prepend( + `` + ); + $("#bolo-gallery-upload-input").val(""); + $(".bolo-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".bolo-gallery-upload-input").css("display", "none"); + }, 250); + $(".bolo-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + } + }); + + $(".bolos-items").on("click", ".bolo-item", function () { + if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { + $(".manage-bolos-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".bolo-gallery-add-btn").hasClass("fa-minus")) { + $(".bolo-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".officers-add-btn").hasClass("fa-minus")) { + $(".officers-add-btn").removeClass("fa-minus").addClass("fa-plus"); + } + + if ($(".bolo-gallery-upload-input").css("display") == "block") { + $(".bolo-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".bolo-gallery-upload-input").css("display", "none"); + }, 250); + } + + canInputTag = true; + canInputBoloTag = true; + canInputBoloOfficerTag = true; + let id = $(this).data("id"); + $.post( + `https://${GetParentResourceName()}/getBoloData`, + JSON.stringify({ + id: id, + }) + ); + }); + + $(".contextmenu").on("click", ".bolo-delete", function () { + if ($(this).data("info") != 0) { + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + $(".bolos-items") + .find("[data-id='" + $(this).data("info") + "']") + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteICU`, + JSON.stringify({ + id: $(this).data("info"), + }) + ); + } + $(".bolos-items") + .find("[data-id='" + $(this).data("info") + "']") + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteBolo`, + JSON.stringify({ + id: $(this).data("info"), + }) + ); + } + }); + + $(".bolos-items").on("contextmenu", ".bolo-item", function (e) { + var args = ""; + args = [ + { + className: "bolo-delete", + icon: "fas fa-times", + text: "Delete Bolo", + info: $(this).data("id"), + status: "", + }, + ]; + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + args = [ + { + className: "bolo-delete", + icon: "fas fa-times", + text: "Delete Check-In", + info: $(this).data("id"), + status: "", + }, + ]; + } + openContextMenu(e, args); + }); + $(".incidents-ghost-holder").on( + "contextmenu", + ".associated-incidents-user-holder", + function (e) { + let args = [ + { + className: "add-charge", + icon: "fas fa-check", + text: "Modify Charges", + info: $(this).data("name"), + status: "", + }, + ]; + openContextMenu(e, args); + } + ); + $(".contextmenu").on("click", ".add-charge", function () { + let stupidasscid = $(this).data("info"); + $(".incidents-charges-table").slideDown(500); + $(".incidents-charges-table").fadeIn(500); + $("#current-charges-holder").data("cid", $(this).data("info")); + $("#current-charges-holder").html(""); + $(".associated-incidents-user-holder") + .children("div") + .each(function (index) { + if ( + $(".associated-incidents-user-holder") + .children() + .eq(index) + .data("id") == stupidasscid + ) { + const randomNum = Math.ceil( + Math.random() * 1000 + ).toString(); + $("#current-charges-holder").prepend( + `
        ${$( + ".associated-incidents-user-holder" + ) + .children() + .eq(index) + .html()}
        ` + ); + } + }); + setTimeout(() => { + $(".close-all").css("filter", "brightness(30%)"); + }, 250); + $.post(`https://${GetParentResourceName()}/getPenalCode`, JSON.stringify({})); + }); + + var shiftPressed = false; + $(document).keydown(function (event) { + shiftPressed = event.keyCode == 16; + }); + $(document).keyup(function (event) { + if (event.keyCode == 16) { + shiftPressed = false; + } + }); + + $(".offenses-main-container").on("mousedown",".offense-item",function (e) { + const cid = $("#current-charges-holder").data("cid"); + const newItem = $(this).find(".offense-item-offense").html(); + const Fine = +$(this).data("fine"); + const Sentence = +$(this).data("sentence"); + if (e.which == 1) { + let randomNum = Math.ceil(Math.random() * 1000).toString(); + $(`[data-name="${cid}"]`).prepend(`
        ${$(this).find(".offense-item-offense").html()}
        `); + $("#current-charges-holder").prepend(`
        ${$(this).find(".offense-item-offense").html()}
        `); + + const CurrRfine = $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(); + const NewFine = +CurrRfine + +Fine; + $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(NewFine); + + const CurrRsentence = $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(); + const NewSentence = +CurrRsentence + +Sentence; + $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(NewSentence); + + } else if (e.which == 3) { + $(".associated-incidents-user-holder").children("div").each(function (index) { + if ($(".associated-incidents-user-holder").children().eq(index).data("id") == cid) { + if ($(".associated-incidents-user-holder").children().eq(index).html() == newItem) { + const linkedId = $(".associated-incidents-user-holder").children().eq(index).data("link"); + //$(".current-charges-tag").filter(`[data-link="${linkedId}"]`).remove() + $(".white-tag").filter(`[data-link="${linkedId}"]`).remove(); + + var stop = false; + + $("#current-charges-holder").children("div").each(function (index) { + if (stop == false) { + if ($("#current-charges-holder").children().eq(index).html() == newItem) { + const linkedId = $("#current-charges-holder").children().eq(index).data("link"); + $(".current-charges-tag").filter(`[data-link="${linkedId}"]`).remove(); + stop = true; + } + } + }); + + const CurrRfine = $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(); + const NewFine = +CurrRfine - Fine; + $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(NewFine); + + const CurrRsentence = $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(); + const NewSentence = +CurrRsentence - +Sentence; + $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(NewSentence); + return false; + } + } + }); + } + } + ); + + var timeout; + $(".offenses-main-container").on("mouseenter",".offense-item",function (e) { + var descr = $(this).data("descr") + timeout = setTimeout(function() { + let args = [ + { + className: "incidents-remove-tag", + text: "Remove Tag", + info: descr, + status: "", + }, + ]; + openChargesContextMenu(e, args); + }, 500); + }); + + $(".offenses-main-container").on("mouseleave",".offense-item",function (e) { + clearTimeout(timeout) + hideChargesMenu(); + }); + + $(".bolo-gallery-inner-container").on("click", ".bolo-img", function () { + if ($(this).css("filter") == "none") { + $(this).css("filter", "blur(5px)"); + } else { + $(this).css("filter", "none"); + } + }); + $(".contextmenu").on("click", ".bolo-remove-image", function () { + $(".bolo-gallery-inner-container img") + .filter("[src='" + $(this).data("info") + "']") + .remove(); + }); + $(".bolo-gallery-inner-container").on( + "contextmenu", + ".bolo-img", + function (e) { + let args = [ + { + className: "bolo-remove-image", + icon: "fas fa-times", + text: "Remove Image", + info: $(this).attr("src"), + status: "", + }, + { + className: "expand-image", + icon: "fas fa-expand", + text: "Expand Image", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + ]; + openContextMenu(e, args); + } + ); + + $(".officers-add-btn").click(function () { + if (canInputBoloOfficerTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".manage-officers-tags-holder").prepend( + `` + ); + canInputBoloOfficerTag = false; + } else if (!canInputBoloOfficerTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".officer-tag-bolo-input").remove(); + canInputBoloOfficerTag = true; + } + }); + + $(".manage-officers-tags-holder").on( + "keydown", + ".officer-tag-bolo-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-officers-tags-holder").prepend( + `
        ${$( + ".officer-tag-bolo-input" + ).text()}
        ` + ); + // Have it save instantly if it's an existing report. + if ($(".officers-add-btn").hasClass("fa-minus")) { + canInputBoloOfficerTag = true; + $(".officers-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + canInputBoloOfficerTag = true; + $(".officer-tag-bolo-input").remove(); + } + } + ); + $(".incidents-ghost-holder").on( + "click", + ".associated-incidents-user-tag", + function () { + if ($(this).hasClass("red-tag")) { + $(this).removeClass("red-tag"); + $(this).addClass("green-tag"); + if ($(this).text() == "Associated") { + $(".associated-incidents-user-holder") + .filter(`[data-name="${$(this).data("id")}"]`) + .css("display", "none"); + $(".associated-incidents-fine-input") + .filter(`[data-id="${$(this).data("id")}"]`) + .css("display", "none"); + $(".manage-incidents-title-tag") + .filter(`[data-id="${$(this).data("id")}"]`) + .css("display", "none"); + $(".associated-incidents-sentence-input") + .filter(`[data-id="${$(this).data("id")}"]`) + .css("display", "none"); + } + } else { + $(this).removeClass("green-tag"); + $(this).addClass("red-tag"); + if ($(this).text() == "Associated") { + $(".associated-incidents-user-holder") + .filter(`[data-name="${$(this).data("id")}"]`) + .fadeIn(100); + $(".associated-incidents-fine-input") + .filter(`[data-id="${$(this).data("id")}"]`) + .fadeIn(100); + $(".manage-incidents-title-tag") + .filter(`[data-id="${$(this).data("id")}"]`) + .fadeIn(100); + $(".associated-incidents-sentence-input") + .filter(`[data-id="${$(this).data("id")}"]`) + .fadeIn(100); + } + } + } + ); + $(".contextmenu").on( + "click", + ".associated-incidents-remove-tag", + function () { + $( + `.associated-incidents-tag:contains(${$(this).data("info")})` + ).remove(); + $( + `.associated-incidents-user-title:contains(${$(this).data( + "info" + )})` + ) + .parent() + .remove(); + const incidentId = $(".manage-incidents-editing-title").data("id"); + if (incidentId != 0) { + $.post( + `https://${GetParentResourceName()}/removeIncidentCriminal`, + JSON.stringify({ + cid: $(this).data("status"), + incidentId: incidentId, + }) + ); + } + } + ); + $(".associated-incidents-tags-holder").on( + "contextmenu", + ".associated-incidents-tag", + function (e) { + let args = [ + { + className: "associated-incidents-remove-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: $(this).data("id"), + }, + ]; + openContextMenu(e, args); + } + ); + $(".icidents-person-search-holder").on( + "click", + ".icidents-person-search-item", + function () { + $(".icidents-person-search-container").fadeOut(250); + $(".close-all").css("filter", "none"); + $(".associated-incidents-tags-holder").prepend( + `
        ${$(this).data("name")}
        ` + ); + + $(".incidents-ghost-holder").prepend( + ` +
        +
        ${$(this).data( + "info" + )}
        +
        +
        Warrant
        +
        Guilty
        +
        Processed
        +
        Associated
        +
        +
        +
        +
        Recommended Fine
        +
        +
        Recommended Sentence
        +
        +
        Fine
        +
        +
        Sentence
        +
        +
        + ` + ); + } + ); + + $(".contextmenu").on("click", ".incidents-remove-tag", function () { + $(`.tag:contains(${$(this).data("info")})`).remove(); + }); + + $(".manage-incidents-tags-holder").on("contextmenu", ".tag", function (e) { + let args = [ + { + className: "incidents-remove-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: "", + }, + ]; + openContextMenu(e, args); + }); + + $(".contextmenu").on("click", ".incidents-remove-officer-tag", function () { + $( + `.manage-incidents-officers:contains(${$(this).data("info")})` + ).remove(); + }); + + $(".manage-incidents-officers-holder").on( + "contextmenu", + ".manage-incidents-officers", + function (e) { + let args = [ + { + className: "incidents-remove-officer-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: "", + }, + ]; + openContextMenu(e, args); + } + ); + + $(".contextmenu").on("click", ".incidents-remove-civ-tag", function () { + $( + `.manage-incidents-civilians:contains(${$(this).data("info")})` + ).remove(); + }); + + $(".manage-incidents-civilians-holder").on( + "contextmenu", + ".manage-incidents-civilians", + function (e) { + let args = [ + { + className: "incidents-remove-civ-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: "", + }, + ]; + openContextMenu(e, args); + } + ); + + $(".incidents-search-refresh").click(function () { + if (canRefreshIncidents == true) { + canRefreshIncidents = false; + $(".incidents-search-refresh").empty(); + $(".incidents-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".incidents-search-refresh").empty(); + $(".incidents-search-refresh").html("Refresh"); + canRefreshIncidents = true; + $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); + }, 1500); + } + }); + + $(".contextmenu").on("click", ".incidents-remove-normal-tag", function () { + $(`.tag:contains(${$(this).data("info")})`).remove(); + let cid = $(".manage-profile-citizenid-input").val(); + if (cid) { + $.post( + `https://${GetParentResourceName()}/removeProfileTag`, + JSON.stringify({ + cid: cid, + text: $(this).data("info"), + }) + ); + } + }); + $(".tags-holder").on("contextmenu", ".tag", function (e) { + let args = [ + { + className: "incidents-remove-normal-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: "", + }, + ]; + openContextMenu(e, args); + }); + $(".reports-search-title").click(function () { + if (canSearchReports == true) { + if ($(".reports-search-input").css("display") == "none") { + $(".reports-search-input").slideDown(250); + $(".reports-search-input").css("display", "block"); + } else { + $(".reports-search-input").slideUp(250); + setTimeout(() => { + $(".reports-search-input").css("display", "none"); + }, 250); + } + } + }); + $(".icidents-person-search-container").hover( + function () { + mouse_is_inside = true; + }, + function () { + mouse_is_inside = false; + } + ); + + $(".reports-search-refresh").click(function () { + if (canRefreshReports == true) { + canRefreshReports = false; + $(".reports-search-refresh").empty(); + $(".reports-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".reports-search-refresh").empty(); + $(".reports-search-refresh").html("Refresh"); + canRefreshReports = true; + $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); + }, 1500); + } + }); + + $(".dispatch-comms-refresh").click(function () { + $(".dispatch-comms-refresh").empty(); + $(".dispatch-comms-refresh").prepend( + `` + ); + setTimeout(() => { + $(".dispatch-comms-refresh").empty(); + $(".dispatch-comms-refresh").html("Refresh"); + canRefreshReports = true; + $.post(`https://${GetParentResourceName()}/refreshDispatchMsgs`, JSON.stringify({})); + }, 1500); + }); + + $(".reports-items").on("click", ".reports-item", function () { + if (currentTab != ".reports-page-container") { + fidgetSpinner(".reports-page-container"); + currentTab = ".reports-page-container"; + } + + if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { + $(".manage-reports-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".reports-gallery-add-btn").hasClass("fa-minus")) { + $(".reports-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".reports-officers-add-btn").hasClass("fa-minus")) { + $(".reports-officers-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + if ($(".reports-gallery-upload-input").css("display") == "block") { + $(".reports-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".reports-gallery-upload-input").css("display", "none"); + }, 250); + } + + canInputTag = true; + canInputReportTag = true; + canInputReportOfficerTag = true; + let id = $(this).data("id"); + $.post( + `https://${GetParentResourceName()}/getReportData`, + JSON.stringify({ + id: id, + }) + ); + }); + + $(".manage-reports-tags-add-btn").click(function () { + if (canInputReportTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".manage-reports-tags-holder").prepend( + `` + ); + canInputReportTag = false; + } else if (!canInputReportTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".tag-reports-input").remove(); + canInputReportTag = true; + } + }); + + $(".manage-reports-tags-holder").on( + "keydown", + ".tag-reports-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-reports-tags-holder").prepend( + `
        ${$(".tag-reports-input").text()}
        ` + ); + // Have it save instantly if it's an existing report. + if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { + $(".manage-reports-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".tag-reports-input").remove(); + canInputReportTag = true; + } + } + ); + + $(".reports-gallery-add-btn").click(function () { + //if ($(".manage-profile-citizenid-input").val()) { + if ($(".reports-gallery-upload-input").css("display") == "none") { + $(".reports-gallery-upload-input").slideDown(250); + $(".reports-gallery-upload-input").css("display", "block"); + $(this).removeClass("fa-plus").addClass("fa-minus"); + } else { + $(".reports-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".reports-gallery-upload-input").css("display", "none"); + }, 250); + $(this).removeClass("fa-minus").addClass("fa-plus"); + } + //} else { + // $(this).effect("shake", { times: 2, distance: 2 }, 500) + // } + }); + + $("#reports-gallery-upload-input").keydown(function (e) { + if (e.keyCode === 13) { + let URL = $("#reports-gallery-upload-input").val(); + let cid = $(".manage-profile-citizenid-input").val(); + if (URL !== "") { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".reports-gallery-inner-container").prepend( + `` + ); + $("#reports-gallery-upload-input").val(""); + $(".reports-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".reports-gallery-upload-input").css("display", "none"); + }, 250); + $(".reports-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + } + }); + + $(".reports-gallery-inner-container").on( + "click", + ".reports-img", + function () { + if ($(this).css("filter") == "none") { + $(this).css("filter", "blur(5px)"); + } else { + $(this).css("filter", "none"); + } + } + ); + $(".contextmenu").on("click", ".reports-remove-image", function () { + $(".reports-gallery-inner-container img") + .filter("[src='" + $(this).data("info") + "']") + .remove(); + }); + + $(".reports-gallery-inner-container").on( + "contextmenu", + ".reports-img", + function (e) { + let args = [ + { + className: "reports-remove-image", + icon: "fas fa-times", + text: "Remove Image", + info: $(this).attr("src"), + status: "", + }, + { + className: "expand-image", + icon: "fas fa-expand", + text: "Expand Image", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + ]; + openContextMenu(e, args); + } + ); + + $(".reports-officers-add-btn").click(function () { + if (canInputReportOfficerTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".reports-officers-tags-holder").prepend( + `` + ); + canInputReportOfficerTag = false; + } else if (!canInputReportOfficerTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".officer-tag-reports-input").remove(); + canInputReportOfficerTag = true; + } + }); + + $(".reports-officers-tags-holder").on( + "keydown", + ".officer-tag-reports-input", + function (e) { + if (e.keyCode === 13) { + $(".reports-officers-tags-holder").prepend( + `
        ${$( + ".officer-tag-reports-input" + ).text()}
        ` + ); + // Have it save instantly if it's an existing report. + if ($(".reports-officers-add-btn").hasClass("fa-minus")) { + canInputReportOfficerTag = true; + $(".reports-officers-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + canInputReportOfficerTag = true; + $(".officer-tag-reports-input").remove(); + } + } + ); + + $(".reports-civilians-add-btn").click(function () { + if (canInputReportCivilianTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".reports-civilians-tags-holder").prepend( + `` + ); + canInputReportCivilianTag = false; + } else if (!canInputReportCivilianTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".civilian-tag-reports-input").remove(); + canInputReportCivilianTag = true; + } + }); + + $(".reports-civilians-tags-holder").on( + "keydown", + ".civilian-tag-reports-input", + function (e) { + if (e.keyCode === 13) { + $(".reports-civilians-tags-holder").prepend( + `
        ${$( + ".civilian-tag-reports-input" + ).text()}
        ` + ); + // Have it save instantly if it's an existing report. + if ($(".reports-civilians-add-btn").hasClass("fa-minus")) { + canInputReportCivilianTag = true; + $(".reports-civilians-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + canInputReportCivilianTag = true; + $(".civilian-tag-reports-input").remove(); + } + } + ); + + $(".manage-reports-title-holder").on( + "click", + ".manage-reports-new", + function () { + //if ($(".manage-bolos-editing-title").html() == 'You are currently creating a new BOLO') { + //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) + //} else { + let template = ""; + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + template = + "Submitted to ICU?: [Yes/No]\n\nIncident Report:\n[ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]\n\n\nList of Injuries:\n- [ State what injury or injuries occurred ]\n\n\n💉 Surgical Report:\n[ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]\n\n\nAttending:\n- [ List Any Attending Here ]\n\n\nMedications Applied:\n- [ List Any Attending Here ]\n\n\nNotes:\n[ Additional Notes Here ]"; + } + $(".manage-reports-editing-title").html( + "You are currently creating a new report" + ); + $(".manage-reports-input-title").val(""); + $(".manage-reports-input-type").val(""); + $(".manage-reports-reports-content").val(template); + $(".manage-reports-tags-holder").empty(); + $(".reports-gallery-inner-container").empty(); + $(".reports-officers-tags-holder").empty(); + $(".reports-civilians-tags-holder").empty(); + + if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { + $(".manage-reports-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".reports-gallery-add-btn").hasClass("fa-minus")) { + $(".reports-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".officers-add-btn").hasClass("fa-minus")) { + $(".officers-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + if ($(".reports-gallery-upload-input").css("display") == "block") { + $(".reports-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".reports-gallery-upload-input").css("display", "none"); + }, 250); + } + + canInputTag = true; + canInputReportTag = true; + canInputReportOfficerTag = true; + + $(".tag-reports-input").remove(); + canInputReportTag = true; + + //} + } + ); + + $("#reports-search-input").keydown(function (e) { + if (e.keyCode === 13 && canSearchForReports == true) { + let name = $(this).val(); + if (name !== "") { + canSearchForReports = false; + $.post( + `https://${GetParentResourceName()}/searchReports`, + JSON.stringify({ + name: name, + }) + ); + $(".reports-items").empty(); + $(".reports-items").prepend( + `
        ` + ); + } + } + }); + + $(".manage-reports-title-holder").on( + "click", + ".manage-reports-save", + function () { + let existing = !( + $(".manage-reports-editing-title").html() == + "You are currently creating a new report" + ); + let id = $(".manage-reports-editing-title").data("id"); + let title = $("#reporttitle").val(); + let type = $("#reporttype").val(); + let details = $("#reportdetail").val(); + let tags = new Array(); + let gallery = new Array(); + let officers = new Array(); + let civilians = new Array(); + + $(".manage-reports-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + tags.push($(this).text()); + } + }); + + $(".reports-gallery-inner-container") + .find("img") + .each(function () { + if ($(this).attr("src") != "") { + gallery.push($(this).attr("src")); + } + }); + + $(".reports-officers-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + officers.push($(this).text()); + } + }); + + $(".reports-civilians-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + civilians.push($(this).text()); + } + }); + + let time = new Date(); + + $.post( + `https://${GetParentResourceName()}/newReport`, + JSON.stringify({ + existing: existing, + id: id, + title: title, + type: type, + details: details, + tags: tags, + gallery: gallery, + officers: officers, + civilians: civilians, + time: time.getTime(), + }) + ); + } + ); + + $(".dmv-search-title").click(function () { + if (canSearchForVehicles == true) { + if ($(".dmv-search-input").css("display") == "none") { + $(".dmv-search-input").slideDown(250); + $(".dmv-search-input").css("display", "block"); + } else { + $(".dmv-search-input").slideUp(250); + setTimeout(() => { + $(".dmv-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#dmv-search-input").keydown(async function (e) { + if (e.keyCode === 13 && canSearchForVehicles == true) { + let name = $("#dmv-search-input").val(); + if (name !== "") { + canSearchForVehicles = false; + $(".dmv-items").empty(); + $(".dmv-items").prepend(`
        `); + + let result = await $.post( + `https://${GetParentResourceName()}/searchVehicles`, + JSON.stringify({ + name: name, + }) + ); + if (result.length === 0) { + $(".dmv-items").html( + ` +
        + +
        +
        +
        No Vehicles Matching that search
        +
        +
        +
        +
        +
        + ` + ); + canSearchForVehicles = true; + return true; + } + $(".dmv-items").empty(); + + let vehicleHTML = ""; + + result.forEach((value) => { + let paint = value.color; + let impound = "red-tag"; + let bolo = "red-tag"; + let codefive = "red-tag"; + let stolen = "red-tag"; + + if (value.state == 'Impounded') { + impound = "green-tag"; + } + + if (value.bolo) { + bolo = "green-tag"; + } + + if (value.code) { + codefive = "green-tag"; + } + + if (value.stolen) { + stolen = "green-tag"; + } + + vehicleHTML += ` +
        + +
        +
        +
        ${value.model}
        +
        +
        ${value.colorName}
        +
        Impound
        +
        BOLO
        +
        Stolen
        +
        Code 5
        +
        +
        +
        +
        Plate: ${value.plate} · Owner: ${value.owner}
        +
        +
        +
        + `; + }); + + $(".dmv-items").html(vehicleHTML); + + canSearchForVehicles = true; + + } + } + }); + + $(".dmv-items").on("click", ".dmv-item", function () { + $.post( + `https://${GetParentResourceName()}/getVehicleData`, + JSON.stringify({ + plate: $(this).data("plate"), + }) + ); + }); + + $(".vehicle-information-title-holder").on( + "click", + ".vehicle-information-save", + function () { + if (canSaveVehicle) { + canSaveVehicle = false; + $(".vehicle-information-save").empty(); + $(".vehicle-information-save").prepend( + `` + ); + setTimeout(() => { + $(".vehicle-information-save").empty(); + $(".vehicle-information-save").html("Save"); + canSaveVehicle = true; + }, 750); + setTimeout(() => { + let dbid = $(".vehicle-information-title-holder").data("dbid"); + let plate = $(".vehicle-info-plate-input").val(); + let notes = $(".vehicle-info-content").val(); + let points = $("#vehiclePointsSlider").val(); + + let imageurl = $(".vehicle-info-image").attr("src"); + let newImageurl = $(".vehicle-info-imageurl-input").val(); + if (newImageurl.includes("base64")) { + imageurl = "img/not-found.webp"; + } else { + imageurl = newImageurl; + } + + let code5 = false; + let code5tag = $(".vehicle-tags").find(".code5-tag"); + if (code5tag.hasClass("green-tag")) { + code5 = true + } + + let stolen = false; + let stolentag = $(".vehicle-tags").find(".stolen-tag"); + if (stolentag.hasClass("green-tag")) { + stolen = true + } + + let impoundInfo = {} + impoundInfo.impoundActive = $(".vehicle-tags").find(".impound-tag").hasClass("green-tag") + impoundInfo.impoundChanged = impoundChanged + if (impoundChanged === true) { + if (impoundInfo.impoundActive === true) { + impoundInfo.plate = $(".impound-plate").val(); + impoundInfo.linkedreport = $(".impound-linkedreport").val(); + impoundInfo.fee = $(".impound-fee").val(); + impoundInfo.time = $(".impound-time").val(); + } + } + + $.post( + `https://${GetParentResourceName()}/saveVehicleInfo`, + JSON.stringify({ + dbid: dbid, + plate: plate, + imageurl: imageurl, + notes: notes, + stolen: stolen, + code5: code5, + impound: impoundInfo, + points: points, + }) + ); + + impoundChanged = false; + $(".vehicle-info-image").attr("src", newImageurl); + }, 250); + } + } + ); + + $(".contextmenu").on("click", ".mark-code-5", function () { + let tag = $(".vehicle-tags").find(".code5-tag"); + if (tag.hasClass("red-tag")) { + tag.removeClass("red-tag").addClass("green-tag"); + } + }); + + $(".contextmenu").on("click", ".remove-code-5", function () { + let tag = $(".vehicle-tags").find(".code5-tag"); + if (tag.hasClass("green-tag")) { + tag.removeClass("green-tag").addClass("red-tag"); + } + }); + + $(".vehicle-tags").on("contextmenu", ".code5-tag", function (e) { + let plate = $(".vehicle-info-plate-input").val(); + if (plate) { + let args = []; + if ($(this).hasClass("red-tag")) { + args = [ + { + className: "mark-code-5", + icon: "fas fa-check", + text: "Mark as Code 5", + info: plate, + status: "", + }, + ]; + } else { + args = [ + { + className: "remove-code-5", + icon: "fas fa-times", + text: "Remove Code 5 Status", + info: plate, + status: "", + }, + ]; + } + + openContextMenu(e, args); + } + }); + + $(".contextmenu").on("click", ".mark-stolen", function () { + let tag = $(".vehicle-tags").find(".stolen-tag"); + if (tag.hasClass("red-tag")) { + tag.removeClass("red-tag").addClass("green-tag"); + } + }); + + $(".contextmenu").on("click", ".remove-stolen", function () { + let tag = $(".vehicle-tags").find(".stolen-tag"); + if (tag.hasClass("green-tag")) { + tag.removeClass("green-tag").addClass("red-tag"); + } + }); + + $(".vehicle-tags").on("contextmenu", ".stolen-tag", function (e) { + let plate = $(".vehicle-info-plate-input").val(); + if (plate) { + let args = []; + if ($(this).hasClass("red-tag")) { + args = [ + { + className: "mark-stolen", + icon: "fas fa-check", + text: "Mark as Stolen", + info: plate, + status: "", + }, + ]; + } else { + args = [ + { + className: "remove-stolen", + icon: "fas fa-times", + text: "Remove Code 5 Status", + info: plate, + status: "", + }, + ]; + } + + openContextMenu(e, args); + } + }); + + $(".contextmenu").on("click", ".impound-vehicle", function () { + const plate = $(this).data("info"); + $(".impound-linkedreport").val("").removeAttr("disabled"); + $(".impound-fee").val("").removeAttr("disabled"); + $(".impound-time").val("").removeAttr("disabled"); + $(".impound-fee").css("color", "white"); + $(".impound-cancel").html("Cancel"); + $(".impound-submit").fadeIn(250); + $(".impound-form").slideDown(250); + $(".impound-form").fadeIn(250); + $(".impound-form").data("plate", plate); + $(".impound-plate").val(plate); + }); + + $(".impound-submit").click(function () { + const plate = $(".impound-plate").val(); + const linkedreport = $(".impound-linkedreport").val(); + const fee = $(".impound-fee").val(); + const time = $(".impound-time").val(); + + if (!plate || plate === "") { + $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); + setTimeout(() => { + $(".impound-form").css( + "border", + "1px solid rgb(168, 168, 168)" + ); + }, 500); + return; + } + + if (!linkedreport || linkedreport === "") { + $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); + setTimeout(() => { + $(".impound-form").css( + "border", + "1px solid rgb(168, 168, 168)" + ); + }, 500); + return; + } + + if (!fee || fee === "") { + $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); + setTimeout(() => { + $(".impound-form").css( + "border", + "1px solid rgb(168, 168, 168)" + ); + }, 500); + return; + } + + if (!time || time === "") { + $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); + setTimeout(() => { + $(".impound-form").css( + "border", + "1px solid rgb(168, 168, 168)" + ); + }, 500); + return; + } + + /* $.post( + `https://${GetParentResourceName()}/impoundVehicle`, + JSON.stringify({ + plate: plate, + linkedreport: linkedreport, + fee: fee, + time: time, + }) + ); */ + + //$(".impound-plate").val(""); + //$(".impound-linkedreport").val(""); + //$(".impound-fee").val(""); + //$(".impound-time").val(""); + //$(".impound-fee").css("color", "white"); + + $(".vehicle-tags").find(".impound-tag").addClass("green-tag").removeClass("red-tag"); + + $(".impound-form").slideUp(250); + $(".impound-form").fadeOut(250); + impoundChanged = true; + }); + + $(".impound-cancel").click(function () { + $(".impound-form").slideUp(250); + $(".impound-form").fadeOut(250); + + $(".impound-plate").val(""); + $(".impound-linkedreport").val(""); + $(".impound-fee").val(""); + $(".impound-time").val(""); + $(".impound-fee").css("color", "white"); + }); + + $(".contextmenu").on("click", ".remove-impound", function () { + const plate = $(this).data("info"); + /* $.post( + `https://${GetParentResourceName()}/removeImpound`, + JSON.stringify({ + plate: plate, + }) + ); */ + $(".impound-plate").val(""); + $(".impound-linkedreport").val(""); + $(".impound-fee").val(""); + $(".impound-time").val(""); + impoundChanged = true; + + $(".vehicle-tags") + .find(".impound-tag") + .addClass("red-tag") + .removeClass("green-tag"); + }); + + $(".contextmenu").on("click", ".status-impound", function () { + const plate = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/statusImpound`, + JSON.stringify({ + plate: plate, + }) + ); + }); + + $(".vehicle-tags").on("contextmenu", ".impound-tag", function (e) { + let plate = $(".vehicle-info-plate-input").val(); + if (plate) { + let args = []; + if ($(this).hasClass("red-tag")) { + args = [ + { + className: "impound-vehicle", + icon: "fas fa-check", + text: "State Impound", + info: plate, + status: "", + }, + ]; + } else { + args = [ + { + className: "remove-impound", + icon: "fas fa-times", + text: "Unimpound Vehicle", + info: plate, + status: "", + }, + { + className: "status-impound", + icon: "fas fa-info-circle", + text: "View Impound Status", + info: plate, + status: "", + }, + ]; + } + openContextMenu(e, args); + } + }); + + + $(".calls-search-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".calls-search-input").css("display") == "none") { + $(".calls-search-input").slideDown(250); + $(".calls-search-input").css("display", "block"); + } else { + $(".calls-search-input").slideUp(250); + setTimeout(() => { + $(".calls-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#calls-search-input").keydown(function (e) { + if (e.keyCode === 13) { + let searchCall = $("#calls-search-input").val(); + if (searchCall !== "") { + $.post( + `https://${GetParentResourceName()}/searchCalls`, + JSON.stringify({ + searchCall: searchCall, + }) + ); + $(".calls-items").empty(); + $(".calls-items").prepend(`
        `); + } + } + }); + + $(".weapons-search-title").click(function () { + if (canSearchForWeapons == true) { + if ($(".weapons-search-input").css("display") == "none") { + $(".weapons-search-input").slideDown(250); + $(".weapons-search-input").css("display", "block"); + } else { + $(".weapons-search-input").slideUp(250); + setTimeout(() => { + $(".weapons-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#weapons-search-input").keydown(async function (e) { + if (e.keyCode === 13 && canSearchForWeapons == true) { + let name = $("#weapons-search-input").val(); + if (name !== "") { + canSearchForWeapons = false; + $(".weapons-items").empty(); + $(".weapons-items").prepend(`
        `); + + let result = await $.post( + `https://${GetParentResourceName()}/searchWeapons`, + JSON.stringify({ + name: name, + }) + ); + if (result.length === 0) { + $(".weapons-items").html( + ` +
        + +
        +
        +
        No Weapons Matching that search
        +
        +
        +
        +
        +
        + ` + ); + canSearchForWeapons = true; + return true; + } + $(".weapons-items").empty(); + + let weaponHTML = ""; + + result.forEach((value) => { + weaponHTML += ` +
        + +
        +
        +
        ${value.weapModel} - Class ${value.weapClass}
        + +
        +
        +
        Serial Number: ${value.serial} · Owner: ${value.owner}
        +
        +
        +
        + `; + }); + + $(".weapons-items").html(weaponHTML); + + canSearchForWeapons = true; + } + } + }); + + $(".weapon-information-title-holder").on("click", ".weapon-information-new", function () { + $(".weapon-information-title-holder").data("dbid", 0); + $(".weapon-info-serial-input").val(""); + $(".weapon-info-owner-input").val(""); + $(".weapon-info-class-input").val(""); + $(".weapon-info-model-input").val(""); + $(".weapon-info-imageurl-input").val("img/not-found.webp"); + + canSaveWeapon = true; + } +); + + $(".weapon-information-title-holder").on("click", ".weapon-information-save", function () { + if (canSaveProfile == true) { + canSaveProfile = false; + $(".manage-profile-save").empty(); + $(".manage-profile-save").prepend( + `` + ); + setTimeout(() => { + $(".manage-profile-save").empty(); + $(".manage-profile-save").html("Save"); + canSaveProfile = true; + }, 750); + + setTimeout(() => { + let serial = $(".weapon-info-serial-input").val(); + let notes = $(".weapon-info-content").val(); + let owner = $(".weapon-info-owner-input").val(); + let weapClass = $(".weapon-info-class-input").val(); + let weapModel = $(".weapon-info-model-input").val(); + + let imageurl = $(".weapon-info-image").attr("src"); + let newImageurl = $(".weapon-info-imageurl-input").val(); + if (newImageurl.includes("base64")) { + imageurl = "img/not-found.webp"; + } else { + imageurl = newImageurl; + } + + $.post( + `https://${GetParentResourceName()}/saveWeaponInfo`, + JSON.stringify({ + serial: serial, + imageurl: imageurl, + notes: notes, + owner: owner, + weapClass: weapClass, + weapModel: weapModel, + }) + ); + + $(".weapon-info-image").attr("src", newImageurl); + }, 250); + } + } +); + + $(".weapons-items").on("click", ".weapons-item", function () { + $.post( + `https://${GetParentResourceName()}/getWeaponData`, + JSON.stringify({ + serial: $(this).data("serial"), + }) + ); + }); + + $(".contextmenu").on("click", ".view-profile", async function () { + const cid = $(this).data("info"); + fidgetSpinner(".profile-page-container"); + currentTab = ".profile-page-container"; + $(".profile-search-input").slideDown(250); + $(".profile-search-input").css("display", "block"); + $("#profile-search-input:text").val(cid.toString()); + canSearchForProfiles = false; + let result = await $.post( + `https://${GetParentResourceName()}/searchProfiles`, + JSON.stringify({ + name: cid, + }) + ); + + searchProfilesResults(result); + }); + + $(".contextmenu").on("click", ".view-incident", function () { + const incidentId = $(this).data("info"); + fidgetSpinner(".incidents-page-container"); + currentTab = ".incidents-page-container"; + setTimeout(() => { + $(".incidents-search-input").slideDown(250); + $(".incidents-search-input").css("display", "block"); + setTimeout(() => { + $("#incidents-search-input:text").val(incidentId.toString()); + canSearchForProfiles = false; + $.post( + `https://${GetParentResourceName()}/searchIncidents`, + JSON.stringify({ + incident: incidentId.toString(), + }) + ); + $(".incidents-items").empty(); + $(".incidents-items").prepend( + `
        ` + ); + setTimeout(() => { + $.post( + `https://${GetParentResourceName()}/getIncidentData`, + JSON.stringify({ + id: incidentId.toString(), + }) + ); + }, 250); + }, 250); + }, 250); + }); + + $(".warrants-items").on("contextmenu", ".warrants-item", function (e) { + //let information = $(this).html() + //if (information) { + args = [ + { + className: "view-profile", + icon: "far fa-eye", + text: "View Profile", + info: $(this).data("cid"), + status: "", + }, + { + className: "view-incident", + icon: "fas fa-search", + text: "View Incident", + info: $(this).data("id"), + status: "", + }, + ]; + openContextMenu(e, args); + //} + }); + + $(".contextmenu").on("click", ".toggle-duty", function () { + let info = $(this).data("info"); + let currentStatus = $(`[data-id="${info}"]`) + .find(".unit-status") + .html(); + if (currentStatus == "10-8") { + $(`[data-id="${info}"]`).find(".unit-status").html("10-7"); + $(`[data-id="${info}"]`) + .find(".unit-status") + .removeClass("green-status") + .addClass("yellow-status"); + $.post( + `https://${GetParentResourceName()}/toggleDuty`, + JSON.stringify({ + cid: info, + status: 0, + }) + ); + } else if (currentStatus == "10-7") { + $(`[data-id="${info}"]`).find(".unit-status").html("10-8"); + $(`[data-id="${info}"]`) + .find(".unit-status") + .removeClass("yellow-status") + .addClass("green-status"); + $.post( + `https://${GetParentResourceName()}/toggleDuty`, + JSON.stringify({ + cid: info, + status: 1, + }) + ); + } + }); + + $(".contextmenu").on("click", ".set-callsign", function () { + let info = $(this).data("info"); + $(".callsign-container").fadeIn(0); + $(".callsign-inner-container").slideDown(500); + $(".callsign-inner-container").fadeIn(500); + $(".callsign-container").data("id", info); + }); + + $(".contextmenu").on("click", ".set-radio", function () { + let info = $(this).data("info"); + $(".radio-container").fadeIn(0); + $(".radio-inner-container").slideDown(500); + $(".radio-inner-container").fadeIn(500); + $(".radio-container").data("id", info); + }); + + $(".contextmenu").on("click", ".set-waypoint", function () { + let info = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/setWaypointU`, + JSON.stringify({ + cid: info, + }) + ); + }); + + $(".active-unit-list").on("contextmenu", ".active-unit-item", function (e) { + let cid = $(this).data("id"); + if (cid) { + args = [ + { + className: "toggle-duty", + icon: "fas fa-thumbtack", + text: "Toggle Duty", + info: cid, + status: "", + }, + { + className: "set-callsign", + icon: "far fa-id-badge", + text: "Set Callsign", + info: cid, + status: "", + }, + { + className: "set-radio", + icon: "fas fa-broadcast-tower", + text: "Set Radio", + info: cid, + status: "", + }, + { + className: "set-waypoint", + icon: "fas fa-map-marker-alt", + text: "Set Waypoint", + info: cid, + status: "", + }, + ]; + openContextMenu(e, args); + } + }); + + $(".contextmenu").on("click", ".Set-Waypoint", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/setWaypoint`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + $(".contextmenu").on("click", ".call-attach", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/callAttach`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + $(".contextmenu").on("click", ".call-detach", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/callDetach`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + $(".contextmenu").on("click", ".remove-blip", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/removeCallBlip`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + $(".contextmenu").on("click", ".attached-units", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/attachedUnits`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + $("#respondcalls").keydown(function (e) { + const keyCode = e.which || e.keyCode; + if (keyCode === 13 && !e.shiftKey) { + const callid = $(".respond-calls-container").data("id"); + e.preventDefault(); + const time = new Date(); + $.post( + `https://${GetParentResourceName()}/sendCallResponse`, + JSON.stringify({ + message: $(this).val(), + time: time.getTime(), + callid: callid, + }) + ); + $(this).val(""); + } + }); + + $(".contextmenu").on("click", ".respond-call", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/getCallResponses`, + JSON.stringify({ + callid: callId, + }) + ); + /**$(".respond-calls").fadeIn(0) + $(".respond-calls-container").fadeIn(250) + $(".close-all").css("filter", "brightness(15%)"); + $("#respondcalls").val("")*/ + }); + + $('#vehiclePointsSlider').change(function(){ + //console.log(this.value); + var currentValue = $('#vehiclePointsSliderValue'); + currentValue.html(this.value); + }); + + + $(".active-calls-list").on( + "contextmenu", + ".active-calls-item", + function (e) { + const callId = $(this).data("id"); + const canRespond = $(this).data("canrespond"); + if (callId) { + if (canRespond == true) { + args = [ + { + className: "respond-call", + icon: "fas fa-reply", + text: "Respond to Call", + info: callId, + status: "", + }, + { + className: "attached-units", + icon: "fas fa-link", + text: "Attached Units", + info: callId, + status: "", + }, + { + className: "call-detach", + icon: "fas fa-sign-out-alt", + text: "Detach", + info: callId, + status: "", + }, + { + className: "call-attach", + icon: "fas fa-sign-in-alt", + text: "Respond", + info: callId, + status: "", + }, + { + className: "Set-Waypoint", + icon: "fas fa-map-marker-alt", + text: "Set Waypoint", + info: callId, + status: "", + }, + { + className: "remove-blip", + icon: "fa-solid fa-circle-minus", + text: "Remove Blip", + info: callId, + status: "", + }, + ]; + } else if (canRespond == false) { + args = [ + { + className: "attached-units", + icon: "fas fa-link", + text: "Attached Units", + info: callId, + status: "", + }, + { + className: "call-detach", + icon: "fas fa-sign-out-alt", + text: "Detach", + info: callId, + status: "", + }, + { + className: "call-attach", + icon: "fas fa-sign-in-alt", + text: "Respond", + info: callId, + status: "", + }, + { + className: "Set-Waypoint", + icon: "fas fa-map-marker-alt", + text: "Set Waypoint", + info: callId, + status: "", + }, + { + className: "remove-blip", + icon: "fa-solid fa-circle-minus", + text: "Remove Blip", + info: callId, + status: "", + }, + ]; + } + + openContextMenu(e, args); + } + } + ); + + $(".contextmenu").on("click", ".call-dispatch-detach", function () { + const cid = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/callDispatchDetach`, + JSON.stringify({ + callid: $(".dispatch-attached-units-container").attr("id"), + cid: cid, + }) + ); + $(".dispatch-attached-unit-item").filter(`[data-id="${cid}"]`).remove(); + }); + + $(".contextmenu").on("click", ".Set-Dispatch-Waypoint", function () { + const cid = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/setDispatchWaypoint`, + JSON.stringify({ + callid: $(".dispatch-attached-units-container").attr("id"), + cid: cid, + }) + ); + }); + + $(".dispatch-attached-units-holder").on( + "contextmenu", + ".dispatch-attached-unit-item", + function (e) { + const cid = $(this).data("id"); + if (cid) { + args = [ + { + className: "set-waypoint", + icon: "fas fa-map-marker-alt", + text: "Set Waypoint", + info: cid, + status: "", + }, + ]; + openContextMenu(e, args); + } + } + ); + + $(".contextmenu").on("click", ".dispatch-reply", function () { + const callsign = $(this).data("info"); + const currVal = $(".dispatch-input").val(); + if (currVal === "") { + $(".dispatch-input").val(callsign + " "); + } else { + $(".dispatch-input").val(currVal + " " + callsign + " "); + } + $(".dispatch-input").focus(); + }); + + $(".dispatch-items").on( + "contextmenu", + ".dispatch-item-message", + function (e) { + const Callsign = $(this).data("author"); + + var mySubString = Callsign.substring( + Callsign.indexOf("(") + 1, + Callsign.lastIndexOf(")") + ); + + args = [ + { + className: "dispatch-reply", + icon: "fas fa-reply", + text: "Reply", + info: mySubString, + status: "", + }, + ]; + openContextMenu(e, args); + } + ); + + $(".callsign-buttons").on("click", ".callsign-cancel", function () { + $(".callsign-inner-container").slideUp(500); + $(".callsign-inner-container").fadeOut(500); + setTimeout(() => { + $(".callsign-container").slideUp(500); + $(".callsign-container").fadeOut(500); + $(".callsign-input").val(""); + }, 500); + }); + + $(".callsign-buttons").on("click", ".callsign-submit", function () { + const callsign = $(".callsign-input").val(); + if (callsign.length > 2) { + let editingcallsign = $(".callsign-container").data("id"); + let name = $(`[data-id="${editingcallsign}"]`) + .find(".unit-name") + .html() + .replace(/\s*(?:\[[^\]]*\]|\([^)]*\))\s*/g, ""); + let newunitname = `(${callsign}) ${name}`; + $(`[data-id="${editingcallsign}"]`) + .find(".unit-name") + .html(newunitname); + $.post( + `https://${GetParentResourceName()}/setCallsign`, + JSON.stringify({ + cid: editingcallsign, + newcallsign: callsign, + }) + ); + + $(".callsign-inner-container").slideUp(500); + $(".callsign-inner-container").fadeOut(500); + setTimeout(() => { + $(".callsign-container").slideUp(500); + $(".callsign-container").fadeOut(500); + $(".callsign-input").val(""); + }, 500); + } + }); + + $(".radio-buttons").on("click", ".radio-cancel", function () { + $(".radio-inner-container").slideUp(500); + $(".radio-inner-container").fadeOut(500); + setTimeout(() => { + $(".radio-container").slideUp(500); + $(".radio-container").fadeOut(500); + $(".radio-input").val(""); + }, 500); + }); + + $(".radio-buttons").on("click", ".radio-submit", function () { + const radio = $(".radio-input").val(); + if (radio.length > 0) { + let editingradio = $(".radio-container").data("id"); + let newunitname = `${radio}`; + $(`[data-id="${editingradio}"]`) + .find(".unit-radio") + .html(newunitname); + $.post( + `https://${GetParentResourceName()}/setRadio`, + JSON.stringify({ + cid: editingradio, + newradio: radio, + }) + ); + + $(".radio-inner-container").slideUp(500); + $(".radio-inner-container").fadeOut(500); + setTimeout(() => { + $(".radio-container").slideUp(500); + $(".radio-container").fadeOut(500); + $(".radio-input").val(""); + }, 500); + } + }); + + $(".cams-items").click(function () { + var camId = this.id; + $.post( + `https://${GetParentResourceName()}/openCamera`, + JSON.stringify({ + cam: camId, + }) + ); + $.post(`https://${GetParentResourceName()}/escape`, JSON.stringify({})); + }) + + var draggedElement = 0; + var dragging = false; + + $(".active-unit-list").on("click", ".active-unit-item", function (e) { + if (dragging) { + $("#draggedItem").css("opacity", 0.0); + document.getElementById("draggedItem").innerHTML = ""; + dragging = false; + } else { + dragging = true; + draggedElement = $(this).data("id"); + let draggedItemHtml = $(this).html(); + document.getElementById("draggedItem").innerHTML = draggedItemHtml; + document.getElementById("draggedItem").style.left = "cursorX-50"; + document.getElementById("draggedItem").style.top = "cursorY-50"; + document.getElementById("draggedItem").style.opacity = "0.5"; + } + }); + + document.onmousemove = handleMouseMove; + + function handleMouseMove(event) { + let dot, eventDoc, doc, body, pageX, pageY; + event = event || window.event; // IE-ism + if (event.pageX == null && event.clientX != null) { + eventDoc = (event.target && event.target.ownerDocument) || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = + event.clientX + + ((doc && doc.scrollLeft) || (body && body.scrollLeft) || 0) - + ((doc && doc.clientLeft) || (body && body.clientLeft) || 0); + event.pageY = + event.clientY + + ((doc && doc.scrollTop) || (body && body.scrollTop) || 0) - + ((doc && doc.clientTop) || (body && body.clientTop) || 0); + } + + if (dragging) { + cursorX = event.pageX; + cursorY = event.pageY; + document.getElementById("draggedItem").style.left = + "" + cursorX - 50 + "px"; + document.getElementById("draggedItem").style.top = + "" + cursorY - 50 + "px"; + } + } + + $(".active-calls-list").on("click", ".active-calls-item", function (e) { + const callId = $(this).data("id"); + $("#draggedItem").css("opacity", 0.0); + document.getElementById("draggedItem").innerHTML = ""; + dragging = false; + if (callId && draggedElement) { + $.post( + `https://${GetParentResourceName()}/callDragAttach`, + JSON.stringify({ + callid: callId, + cid: draggedElement, + }) + ); + draggedElement = 0; + } + }); + + function JobColors(sentJob) { + if (sentJob) { + if (PoliceJobs[sentJob] !== undefined) { + document.documentElement.style.setProperty( + "--color-1", + "#1E3955" + ); + document.documentElement.style.setProperty( + "--color-2", + "#213F5F" + ); + document.documentElement.style.setProperty( + "--color-3", + "#2C537B" + ); + document.documentElement.style.setProperty( + "--color-4", + "#23405E" + ); + document.documentElement.style.setProperty( + "--color-5", + "#152638" + ); + document.documentElement.style.setProperty( + "--color-6", + "#121f2c" + ); + document.documentElement.style.setProperty( + "--color-7", + "rgb(28, 54, 82)" + ); + document.documentElement.style.setProperty( + "--color-8", + "#2554cc" + ); + document.documentElement.style.setProperty( + "--color-9", + "#6E707C" + ); + document.documentElement.style.setProperty( + "--color-10", + "#8f741b" + ); + $(".badge-logo").attr("src", "img/sasp_badge.webp"); + $(".header-title").html("SAN ANDREAS STATE POLICE"); + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (AmbulanceJobs[sentJob] !== undefined) { + $("#home-warrants-container").fadeOut(0); + $("#home-reports-container").fadeIn(0); + document.documentElement.style.setProperty( + "--color-1", + "#5F2121" + ); + document.documentElement.style.setProperty( + "--color-2", + "#7B2C2C" + ); + document.documentElement.style.setProperty( + "--color-3", + "#4A1C1C" + ); + document.documentElement.style.setProperty( + "--color-4", + "#5E2323" + ); + document.documentElement.style.setProperty( + "--color-5", + "#381515" + ); + document.documentElement.style.setProperty( + "--color-6", + "#2C1212" + ); + document.documentElement.style.setProperty( + "--color-7", + "#521C1C" + ); + document.documentElement.style.setProperty( + "--color-8", + "#CC2525" + ); + document.documentElement.style.setProperty( + "--color-9", + "#8A8D91" + ); + document.documentElement.style.setProperty( + "--color-10", + "#444444" + ); + $(".badge-logo").attr("src", "img/ems_badge.webp"); + $(".header-title").html("PILLBOX HILL MEDICAL CENTER"); + //$(".quote-span").html("The simplest explanation is almost always somebody screwed up."); + $(".bolo-nav-item").html("ICU"); + $(".bolos-search-title").html("ICU Check-ins"); + $("#bolos-search-input").attr( + "placeholder", + "Search Check-ins..." + ); + $(".manage-bolos-title").html("Manage ICU Check-in"); + $(".manage-bolos-editing-title").html( + "You are creating a new ICU Check-in" + ); + $(".boloplate-title").html("Estimated Recovery"); + $(".boloowner-title").html("Emergency Contact"); + $(".boloindividual-title").html("Patient"); + $("#boloplate").attr( + "placeholder", + "Enter recovery time here..." + ); + $("#bolodetail").attr( + "placeholder", + "Enter ICU Check-in details here..." + ); + $("#boloowner").attr( + "placeholder", + "Enter emergency contact here..." + ); + $("#boloindividual").attr( + "placeholder", + "Enter patient name and CID here..." + ); + $(".incidents-nav-item").hide(); + $(".dmv-nav-item").hide(); + $(".cams-nav-item").hide(); + $("#reports-officers-involved-tag-title").html("EMS Involved"); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (DojJobs[sentJob] !== undefined) { + document.documentElement.style.setProperty( + "--color-1", + "#553a1e" + ); + document.documentElement.style.setProperty( + "--color-2", + "#5f4321" + ); + document.documentElement.style.setProperty( + "--color-3", + "#7b552c" + ); + document.documentElement.style.setProperty( + "--color-4", + "#5e4123" + ); + document.documentElement.style.setProperty( + "--color-5", + "#382815" + ); + document.documentElement.style.setProperty( + "--color-6", + "#2c2312" + ); + document.documentElement.style.setProperty( + "--color-7", + "rgb(82, 60, 28)" + ); + document.documentElement.style.setProperty( + "--color-8", + "#cc9225" + ); + $(".badge-logo").attr("src", "img/court.webp"); + $(".header-title").html("DEPARTMENT OF JUSTICE"); + //$(".quote-span").html("Actually useless."); + //$(".dmv-nav-item").hide(); + $(".weapons-nav-item").show() + $(".bolo-nav-item").hide(); + $(".dispatch-title-ofsomesort").html("Message Board"); + $(".dispatch-comms-container").fadeOut(0); + $(".manage-profile-name-input-1").attr("readonly", false); + $(".manage-profile-name-input-2").attr("readonly", false); + $("#home-warrants-container").css("height", "98%"); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "none"); + $(".manage-profile-editing-title").css("display", "none"); + $(".manage-incidents-create").css("display", "none"); + $(".manage-incidents-title").css("margin-right", "auto"); + $(".manage-incidents-title").css("width", "95%"); + $(".manage-incidents-save").css("display", "none"); + $(".manage-incidents-editing-title").css("display", "none"); + $(".manage-reports-new").css("display", "none"); + $(".manage-reports-save").css("display", "none"); + $(".manage-reports-editing-title").css("display", "none"); + $(".vehicle-information-save").css("display", "none"); + $(".vehicle-information-title").css("margin-right", "auto").css("width", "95%"); + $(".manage-incidents-title ").css("margin-right", "auto") + $(".manage-reports-title").css("margin-right", "auto").css("width", "95%"); + } + } + } +{/*
        ID: ${value.id}
        */} + window.addEventListener("message", function (event) { + let eventData = event.data; + $(".dispatch-msg-notif").fadeIn(500); + if (eventData.type == "show") { + if (eventData.enable == true) { + rosterLink = eventData.rosterLink; + playerJob = eventData.job; + JobColors(playerJob); + $(".quote-span").html(randomizeQuote()); + if (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined) { + $(".manage-profile-licenses-container").removeClass("display_hidden"); + $(".manage-convictions-container").removeClass("display_hidden"); + $(".manage-profile-vehs-container").removeClass("display_hidden"); + $(".manage-profile-houses-container").removeClass("display_hidden"); + } + + /* if (PoliceJobs[playerJob] !== undefined || AmbulanceJobs[playerJob] !== undefined) { + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + } else if (DojJobs[playerJob] !== undefined) { + $(".manage-profile-save").css("display", "none"); + $(".manage-profile-editing-title").css("display", "none"); + $(".manage-incidents-create").css("display", "none"); + $(".manage-incidents-save").css("display", "none"); + $(".manage-incidents-editing-title").css("display", "none"); + $(".manage-reports-new").css("display", "none"); + $(".manage-reports-save").css("display", "none"); + $(".manage-reports-editing-title").css("display", "none"); + } */ + + $("body").fadeIn(0); + $(".close-all").css("filter", "none"); + $(".close-all").fadeOut(0); + if (!currentTab) { + currentTab = ".dashboard-page-container"; + } + $(currentTab).slideDown(250); + timeShit(); + } else { + $(".callsign-inner-container").fadeOut(0); + $(".callsign-container").fadeOut(0); + $(".radio-inner-container").fadeOut(0); + $(".radio-container").fadeOut(0); + $(".icidents-person-search-container").fadeOut(0); + $(".dispatch-attached-units").fadeOut(0); + $(".respond-calls").fadeOut(0); + $(".respond-calls-container").fadeOut(0); + $("body").slideUp(250); + $(".close-all").slideUp(250); + } + } else if (eventData.type == "data") { + $(".name-shit").html(eventData.name); + $(".header-location").html(" " + eventData.location); + MyName = eventData.fullname; + + $(".bulletin-items-continer").empty(); + $.each(eventData.bulletin, function (index, value) { + $( + ".bulletin-items-continer" + ).prepend(`
        +
        ${value.title}
        +
        ${value.desc}
        +
        +
        ${value.author + } - ${timeAgo(Number(value.time))}
        +
        +
        `); + }); + + let policeCount = 0; + let emsCount = 0; + let dojCount = 0; + let fireCount = 0; + + let activeUnits = eventData.activeUnits; + let cid = eventData.citizenid; + let onDutyOnly = eventData.ondutyonly; + $(".active-unit-list").html(' '); + let unitListHTML = ''; + + activeUnits = Object.values(activeUnits) + activeUnits.forEach((unit) => { + if (onDutyOnly && unit.duty == 0 && unit.cid != cid) { + return + } + let status = unit.duty == 1 ? "10-8" : '10-7'; + let statusColor = unit.duty == 1 ? "green-status" : 'yellow-status'; + let radioBack = unit.sig100 ? "#7b2c2c" : "var(--color-3)"; + let radio = unit.radio ? unit.radio : "0"; + let callSign = unit.callSign ? unit.callSign : "000"; + let activeInfoJob = `
        UNKNOWN
        `; + if (PoliceJobs[unit.unitType] !== undefined) { + policeCount++; + activeInfoJob = `
        LSPD
        `; + } else if (AmbulanceJobs[unit.unitType] !== undefined) { + activeInfoJob = `
        Ambulance
        ` + emsCount++; + /* } else if (DojJobs[unit.unitType] !== undefined) { + activeInfoJob = `
        FIRE
        ` + fireCount++; */ + } else if (DojJobs[unit.unitType] !== undefined) { + activeInfoJob = `
        DOJ
        ` + dojCount++; + } + + unitListHTML += ` +
        +
        ${status}
        + ${activeInfoJob} +
        (${callSign}) ${unit.firstName} ${unit.lastName}
        +
        ${radio}
        +
        + `; + }); + + $(".active-unit-list").html(unitListHTML) + + + $("#police-count").html(policeCount); + $("#ems-count").html(emsCount); + $("#doj-count").html(dojCount); + $("#fire-count").html(fireCount); + /* } else if (eventData.type == "bulletin") { + $(".bulletin-items-continer").empty(); + $.each(eventData.data, function (index, value) { + $( + ".bulletin-items-continer" + ).prepend(`
        +
        ${value.title}
        +
        ${value.desc}
        +
        +
        ID: ${value.id}
        +
        ${value.author + } - ${timeAgo(Number(value.time))}
        +
        +
        `); + }); */ + } else if (eventData.type == "newBulletin") { + const value = eventData.data; + $(".bulletin-items-continer") + .prepend(`
        +
        ${value.title}
        +
        ${value.info}
        +
        +
        ID: ${value.id}
        +
        ${value.author} - ${timeAgo( + Number(value.time) + )}
        +
        +
        `); + } else if (eventData.type == "deleteBulletin") { + $(".bulletin-items-continer") + .find("[data-id='" + eventData.data + "']") + .remove(); + } else if (eventData.type == "warrants") { + $(".warrants-items").empty(); + $.each(eventData.data, function (index, value) { + $('.warrants-items').prepend(`
        +
        +
        ${value.name}
        +
        +
        +
        Incident ID: ${value.linkedincident}
        +
        +
        `) + }) + } else if (eventData.type == "dispatchmessages") { + const table = eventData.data; + LastName = ""; + DispatchNum = 0; + $(".dispatch-items").empty(); + $.each(table, function (index, value) { + DispatchNum = DispatchNum + 1; + if (LastName == value.name) { + $(".dispatch-items").append(` +
        +
        ${value.message}
        +
        + `); + } else { + if (DispatchNum == 1) { + $(".dispatch-items") + .append(`
        + +
        +
        ${value.name + } ${timeAgo( + Number(value.time) + )}
        +
        ${value.message}
        +
        +
        `); + } else { + $(".dispatch-items") + .append(`
        + +
        +
        ${value.name + } ${timeAgo( + Number(value.time) + )}
        +
        ${value.message}
        +
        +
        `); + } + } + LastName = value.name; + $(".dispatch-items").scrollTop( + $(".dispatch-items")[0].scrollHeight + ); + }); + $(".dispatch-items").scrollTop( + $(".dispatch-items")[0].scrollHeight + ); + } else if (eventData.type == "dispatchmessage") { + const value = eventData.data; + DispatchNum = DispatchNum + 1; + const BodyDisplay = $("body").css("display"); + if (BodyDisplay == "block") { + if (LastName == value.name) { + $(".dispatch-items").append(` +
        +
        ${value.message}
        +
        + `); + } else { + if (DispatchNum == 1) { + $(".dispatch-items") + .append(`
        + +
        +
        ${value.name + } ${timeAgo( + Number(value.time) + )}
        +
        ${value.message}
        +
        +
        `); + } else { + $(".dispatch-items") + .append(`
        + +
        +
        ${value.name + } ${timeAgo( + Number(value.time) + )}
        +
        ${value.message}
        +
        +
        `); + } + } + LastName = value.name; + } else if (BodyDisplay == "none") { + $.post( + `https://${GetParentResourceName()}/dispatchNotif`, + JSON.stringify({ + data: value, + }) + ); + } + $(".dispatch-items").scrollTop( + $(".dispatch-items")[0].scrollHeight + ); + } else if (eventData.type == "call") { + ClearMap(); + const value = eventData.data; + DispatchMAP(value); + if (value && value.job.includes(playerJob)) { + const prio = value["priority"]; + let DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; + + if ( + value.dispatchCode == "911" || + value.dispatchCode == "311" + ) { + DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; + } + + if (value["time"]) { + DispatchItem += `
        ${timeAgo( + value.time + )}
        `; + } + + if (value["firstStreet"]) { + DispatchItem += `
        ${value.firstStreet}
        `; + } + + if (value["callsign"]) { + DispatchItem += `
        ${value.callsign}
        `; + } + + if (value["doorCount"]) { + DispatchItem += `
        ${value.doorCount}
        `; + } + + if (value["speed"]) { + DispatchItem += `
        ${value.speed}
        `; + } + + if (value["weapon"]) { + DispatchItem += `
        ${value.weapon}
        `; + } + + if (value["heading"]) { + DispatchItem += `
        ${value.heading}
        `; + } + + if (value["gender"]) { + let gender = "Male"; + if (value["gender"] == 0 || value["gender"] == 2) { + gender = "Female"; + } + DispatchItem += `
        ${gender}
        `; + } + + if (value["model"] && value["plate"]) { + DispatchItem += `
        ${value["model"]}${value["plate"]}
        `; + } else if (value["plate"]) { + DispatchItem += `
        ${value["plate"]}
        `; + } else if (value["model"]) { + DispatchItem += `
        ${value["model"]}
        `; + } + + if (value["firstColor"]) { + DispatchItem += `
        ${value["firstColor"]}
        `; + } + + if (value["automaticGunfire"] == true) { + DispatchItem += `
        Automatic Gunfire
        `; + } + + if (value["name"] && value["number"]) { + DispatchItem += `
        ${value["name"]}${value["number"]}
        `; + } else if (value["number"]) { + DispatchItem += `
        ${value["number"]}
        `; + } else if (value["name"]) { + DispatchItem += `
        ${value["name"]}
        `; + } + + if (value["information"]) { + DispatchItem += `
        ${value["information"]}
        `; + } + + DispatchItem += `
        `; + $(".active-calls-list").prepend( + $(DispatchItem).hide().fadeIn("slow") + ); + } + } else if (eventData.type == "attachedUnits") { + const table = eventData.data; + if (table) { + $(".dispatch-attached-units").fadeIn(0); + $(".dispatch-attached-units-container").fadeIn(250); + $(".close-all").css("filter", "brightness(15%)"); + $(".dispatch-attached-units-holder").empty(); + $.each(table, function (index, value) { + $( + ".dispatch-attached-units-holder" + ).prepend(`
        +
        ${value.job}
        +
        (${value.callsign}) ${value.fullname}
        +
        1
        +
        `); + }); + setTimeout(() => { + $(".dispatch-attached-units-container").attr( + "id", + eventData.callid + ); + }, 1000); + } + } else if (eventData.type == "sendCallResponse") { + if ($(".respond-calls-container").data("id") == eventData.callid) { + $(".respond-calls-responses").prepend( + `
        ${eventData["name"] + } responded "${eventData["message"]}" - ${timeAgo( + Number(eventData.time) + )}.
        ` + ); + } + } else if (eventData.type == "getCallResponses") { + const table = eventData.data; + $(".respond-calls").fadeIn(0); + $(".respond-calls-container").fadeIn(250); + $(".close-all").css("filter", "brightness(15%)"); + $("#respondcalls").val(""); + $(".respond-calls-responses").empty(); + setTimeout(() => { + $(".respond-calls-container").data("id", eventData.callid); + }, 1000); + $.each(table, function (index, value) { + $(".respond-calls-responses").prepend( + `
        ${value["name"] + } responded "${value["message"]}" - ${timeAgo( + Number(value.time) + )}.
        ` + ); + }); + } else if (eventData.type == "calls") { + const table = eventData.data; + $(".active-calls-list").empty(); + $.each(table, function (index, value) { + if (value && value.job.includes(playerJob)) { + const prio = value["priority"]; + let DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; + + if ( + value.dispatchCode == "911" || + value.dispatchCode == "311" + ) { + DispatchItem = `
        #${value.callId}
        ${value.dispatchCode}
        ${value.dispatchMessage}
        ${value.units.length}
        `; + } + + if (value["time"]) { + DispatchItem += `
        ${timeAgo( + value.time + )}
        `; + } + + if (value["firstStreet"]) { + DispatchItem += `
        ${value.firstStreet}
        `; + } + + if (value["heading"]) { + DispatchItem += `
        ${value.heading}
        `; + } + + if (value["weapon"]) { + DispatchItem += `
        ${value.weapon}
        `; + } + + if (value["gender"]) { + let gender = "Male"; + if (value["gender"] == 0 || value["gender"] == 2) { + gender = "Female"; + } + DispatchItem += `
        ${gender}
        `; + } + + if (value["model"] && value["plate"]) { + DispatchItem += `
        ${value["model"]}${value["plate"]}
        `; + } else if (value["plate"]) { + DispatchItem += `
        ${value["plate"]}
        `; + } else if (value["model"]) { + DispatchItem += `
        ${value["model"]}
        `; + } + + if (value["firstColor"]) { + DispatchItem += `
        ${value["firstColor"]}
        `; + } + + if (value["automaticGunfire"] == true) { + DispatchItem += `
        Automatic Gunfire
        `; + } + + if (value["name"] && value["number"]) { + DispatchItem += `
        ${value["name"]}${value["number"]}
        `; + } else if (value["number"]) { + DispatchItem += `
        ${value["number"]}
        `; + } else if (value["name"]) { + DispatchItem += `
        ${value["name"]}
        `; + } + + if (value["information"]) { + DispatchItem += `
        ${value["information"]}
        `; + } + + DispatchItem += `
        `; + $(".active-calls-list").prepend( + $(DispatchItem).hide().fadeIn("slow") + ); + } + }); + } else if (eventData.type == "incidents") { + let table = eventData.data; + canSearchForProfiles = true; + $(".incidents-items").empty(); + $.each(table, function (index, value) { + $(".incidents-items").append( + `
        +
        +
        ${value.title}
        +
        Incident Report
        +
        +
        +
        ID: ${value.id}
        +
        ${value.author + } - ${timeAgo(Number(value.time))}
        +
        +
        ` + ); + }); + } else if (eventData.type == "getPenalCode") { + const titles = eventData.titles; + const penalcode = eventData.penalcode; + $(".offenses-main-container").empty(); + $.each(titles, function (index, value) { + $(".offenses-main-container").append( + `
        +
        ${value}
        +
        +
        +
        + ` + ); + }); + $.each(penalcode, function (index, value) { + $.each(value, function (i, v) { + $(`#penal-${index}`).append(` +
        +
        +
        ${v.title}
        +
        ${v.class}
        +
        +
        +
        ${v.id}
        +
        ${v.months} Months - $${v.fine}
        +
        + `); + }); + }); + } else if (eventData.type == "incidentData") { + let table = eventData.data; + + $(".incidents-ghost-holder").html(""); + $(".associated-incidents-tags-holder").html(""); + + $(".manage-incidents-editing-title").html( + "You are currently editing incident " + table["id"] + ); + $(".manage-incidents-editing-title").data( + "id", + Number(table["id"]) + ); + + $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); + $(".manage-incidents-reports-content").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-officers-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-civilians-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-evidence-add-btn").css( + "pointer-events", + "auto" + ); + $(".associated-incidents-tags-add-btn").css( + "pointer-events", + "auto" + ); + + $("#manage-incidents-title-input").val(table["title"]); + $(".manage-incidents-reports-content").val(table["details"]); + + $(".manage-incidents-tags-holder").empty(); + $.each(table["tags"], function (index, value) { + $(".manage-incidents-tags-holder").append( + `
        ${value}
        ` + ); + }); + + $(".manage-incidents-officers-holder").empty(); + $.each(table["officersinvolved"], function (index, value) { + $(".manage-incidents-officers-holder").append( + `
        ${value}
        ` + ); + }); + + $(".manage-incidents-civilians-holder").empty(); + $.each(table["civsinvolved"], function (index, value) { + $(".manage-incidents-civilians-holder").append( + `
        ${value}
        ` + ); + }); + + $(".manage-incidents-evidence-holder").empty(); + $.each(table["evidence"], function (index, value) { + $(".manage-incidents-evidence-holder").append( + `` + ); + }); + + $(".manage-incidents-title-holder").empty(); + if (PoliceJobs[playerJob] !== undefined || AmbulanceJobs[playerJob] !== undefined) { + $(".manage-incidents-title-holder").prepend( + ` +
        Manage Incident
        +
        +
        + ` + ); + $(".manage-incidents-title").css("width", "66%"); + $(".manage-incidents-create").css("margin-right", "0px"); + } else if (DojJobs[playerJob] !== undefined) { + $(".manage-incidents-title-holder").prepend( + ` +
        Manage Incident
        + ` + ); + $(".manage-incidents-title").css("width", "95%"); + } + + let associateddata = eventData.convictions; + $.each(associateddata, function (index, value) { + $(".associated-incidents-tags-holder").prepend( + `
        ${value.name}
        ` + ); + + var warrantTag = "red-tag"; + var guiltyTag = "red-tag"; + var processedTag = "red-tag"; + var associatedTag = "red-tag"; + + if (value.warrant == 1) { + warrantTag = "green-tag"; + } + if (value.guilty == 1) { + guiltyTag = "green-tag"; + } + if (value.processed == 1) { + processedTag = "green-tag"; + } + if (value.associated == 1) { + associatedTag = "green-tag"; + } + + const cid = value.cid; + + if (value.associated == 1) { + $(".incidents-ghost-holder").prepend( + `
        +
        ${value.name} (#${value.cid})
        +
        +
        Warrant
        +
        Guilty
        +
        Processed
        +
        Associated
        +
        + + + + + + + + + +
        ` + ); + } else { + $(".incidents-ghost-holder").prepend( + `
        +
        ${value.name} (#${value.cid})
        +
        +
        Warrant
        +
        Guilty
        +
        Processed
        +
        Associated
        +
        +
        +
        +
        Recommended Fine
        +
        +
        Recommended Sentence
        +
        +
        Fine
        +
        +
        Sentence
        +
        +
        ` + ); + } + + $(".fine-amount") + .filter("[data-id='" + value.cid + "']") + .val(value.fine); + + $(".sentence-amount") + .filter("[data-id='" + value.cid + "']") + .val(value.sentence); + + $(".fine-recommended-amount") + .filter("[data-id='" + value.cid + "']") + .val(value.recfine); + + $(".sentence-recommended-amount") + .filter("[data-id='" + value.cid + "']") + .val(value.recsentence); + + const charges = value["charges"]; + for (var i = 0; i < charges.length; i++) { + const randomNum = Math.ceil( + Math.random() * 1000 + ).toString(); + $(`[data-name="${cid}"]`).prepend( + `
        ${charges[i]}
        ` + ); + } + }); + } else if (eventData.type == "incidentSearchPerson") { + let table = eventData.data; + $(".icidents-person-search-holder").empty(); + $.each(table, function (index, value) { + let name = value.firstname + " " + value.lastname; + $(".icidents-person-search-holder").prepend( + ` +
        + +
        +
        Citizen ID
        +
        ${value.id}
        +
        Name
        +
        ${name}
        +
        +
        + ` + ); + }); + } else if (eventData.type == "boloData") { + let table = eventData.data; + $(".manage-bolos-editing-title").html( + "You are currently editing BOLO " + table["id"] + ); + + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + $(".manage-bolos-editing-title").html( + "You are editing ICU Check-in " + table["id"] + ); + } + + $(".manage-bolos-editing-title").data("id", Number(table["id"])); + + $(".manage-bolos-input-title").val(table["title"]); + $(".manage-bolos-input-plate").val(table["plate"]); + $(".manage-bolos-input-owner").val(table["owner"]); + $(".manage-bolos-input-individual").val(table["individual"]); + + $(".manage-bolos-reports-content").val(table["detail"]); + + $(".manage-bolos-tags-holder").empty(); + $.each(table["tags"], function (index, value) { + $(".manage-bolos-tags-holder").prepend( + `
        ${value}
        ` + ); + }); + + $(".bolo-gallery-inner-container").empty(); + $.each(table["gallery"], function (index, value) { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".bolo-gallery-inner-container").prepend( + `` + ); + }); + + $(".manage-officers-tags-holder").empty(); + $.each(table["officersinvolved"], function (index, value) { + $(".manage-officers-tags-holder").prepend( + `
        ${value}
        ` + ); + }); + } else if (eventData.type == "bolos") { + let table = eventData.data; + var reportName = "General BOLO"; + canSearchForProfiles = true; + $(".bolos-items").empty(); + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + reportName = "ICU Check-in"; + } + $.each(table, function (index, value) { + $(".bolos-items").prepend( + `
        +
        +
        ${value.title}
        +
        ${reportName}
        +
        +
        +
        ID: ${value.id}
        +
        ${value.author + } - ${timeAgo(Number(value.time))}
        +
        +
        ` + ); + }); + } else if (eventData.type == "boloComplete") { + let id = eventData.data; + if (canRefreshBolo == true) { + canRefreshBolo = false; + $(".bolos-search-refresh").empty(); + $(".bolos-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".bolos-search-refresh").empty(); + $(".bolos-search-refresh").html("Refresh"); + canRefreshBolo = true; + $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); + }, 1500); + } + $(".manage-bolos-editing-title").html( + "You are currently editing BOLO " + id + ); + $(".manage-bolos-editing-title").data("id", Number(id)); + } else if (eventData.type == "reportComplete") { + let id = eventData.data; + if (canRefreshReports == true) { + canRefreshReports = false; + $(".reports-search-refresh").empty(); + $(".reports-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".reports-search-refresh").empty(); + $(".reports-search-refresh").html("Refresh"); + canRefreshReports = true; + $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); + }, 1500); + } + $(".manage-reports-editing-title").html( + "You are currently editing report " + id + ); + $(".manage-reports-editing-title").data("id", Number(id)); + } else if (eventData.type == "reports") { + let table = eventData.data; + canSearchForReports = true; + $(".reports-items").empty(); + $.each(table, function (index, value) { + $(".reports-items").append( + `
        +
        +
        ${value.title}
        +
        ${value.type + } Report
        +
        +
        +
        ID: ${value.id}
        +
        ${value.author + } - ${timeAgo(Number(value.time))}
        +
        +
        ` + ); + }); + } else if (eventData.type == "reportData") { + let table = eventData.data; + + $(".manage-reports-editing-title").html( + "You are currently editing report " + table["id"] + ); + + $(".manage-reports-editing-title").data("id", Number(table["id"])); + + $(".manage-reports-input-title").val(table["title"]); + $(".manage-reports-input-type").val(table["type"]); + $(".manage-reports-reports-content").val(table["details"]); + + $(".manage-reports-tags-holder").empty(); + $.each(table["tags"], function (index, value) { + $(".manage-reports-tags-holder").append( + `
        ${value}
        ` + ); + }); + + $(".reports-gallery-inner-container").empty(); + $.each(table["gallery"], function (index, value) { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".reports-gallery-inner-container").append( + `` + ); + }); + + $(".reports-officers-tags-holder").empty(); + $.each(table["officersinvolved"], function (index, value) { + $(".reports-officers-tags-holder").append( + `
        ${value}
        ` + ); + }); + } else if (eventData.type == "searchedVehicles") { + + } else if (eventData.type == "getVehicleData") { + impoundChanged = false; + let table = eventData.data; + + $(".vehicle-information-title-holder").data( + "dbid", + Number(table["dbid"]) + ); + + $(".vehicle-info-plate-input").val(table["plate"]); + $(".vehicle-info-owner-input").val(table["name"]); + $(".vehicle-info-class-input").val(table["class"]); + $(".vehicle-info-model-input").val(table["model"]); + $(".vehicle-info-imageurl-input").val(table["image"]); + let vehiclePoints = table["points"] != null ? table["points"] : 0; + $("#vehiclePointsSlider").val(vehiclePoints); + $("#vehiclePointsSliderValue").html(vehiclePoints); + + $(".vehicle-info-content").val(table["information"]); + + $(".vehicle-tags").empty(); + $(".vehicle-info-image").attr("src", table["image"]); + $(".vehicle-tags").prepend( + `
        ${table.colorName}
        ` + ); + + let impound = "red-tag"; + let bolo = "red-tag"; + let codefive = "red-tag"; + let stolen = "red-tag"; + + if (table.impound) { + impound = "green-tag"; + } + + if (table.bolo) { + bolo = "green-tag"; + } + + if (table.code) { + codefive = "green-tag"; + } + + if (table.stolen) { + stolen = "green-tag"; + } + + $(".vehicle-tags").append(`
        Impound
        `); + $(".vehicle-tags").append(`
        BOLO
        `); + $(".vehicle-tags").append(`
        Code 5
        `); + $(".vehicle-tags").append(`
        Stolen
        `); + $(".vehicle-info-imageurl-input").val(table["image"]); + } else if (eventData.type == "getWeaponData") { + impoundChanged = false; + let table = eventData.data; + + $(".weapon-information-title-holder").data( "dbid", table["id"] ); + + $(".weapon-info-serial-input").val(table["serial"]); + $(".weapon-info-owner-input").val(table["owner"]); + $(".weapon-info-class-input").val(table["weapClass"]); + $(".weapon-info-model-input").val(table["weapModel"]); + $(".weapon-info-imageurl-input").val(table["image"]); + + $(".weapon-info-content").val(table["information"]); + + $(".weapon-info-image").attr("src", table["image"]); + + $(".weapon-info-imageurl-input").val(table["image"]); + } else if (eventData.type == "updateVehicleDbId") { + $(".vehicle-information-title-holder").data("dbid", Number(eventData.data)); + } else if (eventData.type == "updateIncidentDbId") { + $(".manage-incidents-editing-title").data("id", Number(eventData.data)); + + $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); + $(".manage-incidents-reports-content").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-officers-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-civilians-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-evidence-add-btn").css( + "pointer-events", + "auto" + ); + $(".associated-incidents-tags-add-btn").css( + "pointer-events", + "auto" + ); + } else if (eventData.type == "callDetach") { + $(".active-calls-item") + .filter("[data-id='" + eventData.callid + "']") + .children() + .children() + .find(".call-radio") + .html(eventData.data); + } else if (eventData.type == "callAttach") { + $(".active-calls-item") + .filter("[data-id='" + eventData.callid + "']") + .children() + .children() + .find(".call-radio") + .html(eventData.data); + } else if (eventData.type == "getAllLogs") { + let table = eventData.data; + $(".stafflogs-container").empty(); + $.each(table, function (index, value) { + $(".stafflogs-container").append( + `

        • ${value.text + } (${timeAgo( + Number(value.time) + )})

        ` + ); + }); + } else if (eventData.type == "statusImpound") { + const table = eventData.data; + const plate = eventData.plate; + const linkedreport = table["linkedreport"]; + const fee = table["fee"]; + const time = table["time"] * 1000; + + let localDate = new Date(time); + const impoundDate = localDate.toLocaleDateString("en-US", { + timeZone: "UTC", + }); + const impoundTime = localDate.toLocaleTimeString("en-US", { + timeZone: "UTC", + }); + + $(".impound-plate").val(plate).attr("disabled", "disabled"); + $(".impound-linkedreport") + .val(linkedreport) + .attr("disabled", "disabled"); + $(".impound-fee") + .val("$" + fee) + .attr("disabled", "disabled"); + + if (table.paid === 1) { + $(".impound-fee").css("color", "green"); + } else { + $(".impound-fee").css("color", "red"); + } + + $(".impound-time") + .val(impoundDate + " - " + impoundTime) + .attr("disabled", "disabled"); + $(".impound-cancel").html("Close"); + $(".impound-submit").fadeOut(250); + $(".impound-form").slideDown(250); + $(".impound-form").fadeIn(250); + } else if (eventData.type == "greenImpound") { + $(".vehicle-tags") + .find(".impound-tag") + .addClass("green-tag") + .removeClass("red-tag"); + } else if (eventData.type == "redImpound") { + $(".vehicle-tags") + .find(".impound-tag") + .removeClass("green-tag") + .addClass("red-tag"); + } + }); +}); + +function fidgetSpinner(page) { + $(".close-all").fadeOut(0); + $(".container-load").fadeIn(0); + if (page == ".dashboard-page-container"){ + $.post(`https://${GetParentResourceName()}/getAllDashboardData`, JSON.stringify({})); + } + if (page == ".bolos-page-container") { + $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); + } + if (page == ".reports-page-container") { + $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); + } + if (page == ".stafflogs-page-container") { + $.post(`https://${GetParentResourceName()}/getAllLogs`, JSON.stringify({})); + } + if (page == ".incidents-page-container") { + $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); + } + setTimeout(() => { + $(".container-load").fadeOut(0); + $(page).fadeIn(0); + }, 1250); +} + +function timeShit() { + let localDate = new Date(); + const myTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone + date = localDate.toLocaleDateString("en-US", { + timeZone: myTimeZone, + }); + time = localDate.toLocaleTimeString("en-US", { + timeZone: myTimeZone, + }); + $(".date").html(date); + $(".time").html(time); +} + +setInterval(timeShit, 1000); + +function addTag(tagInput) { + $(".tags-holder").prepend(`
        ${tagInput}
        `); + + $.post( + `https://${GetParentResourceName()}/newTag`, + JSON.stringify({ + id: $(".manage-profile-citizenid-input").val(), + tag: tagInput, + }) + ); +} + +// Context menu + +var menu = document.querySelector(".contextmenu"); + +function showMenu(x, y) { + $(".contextmenu").css("left", x + "px"); + $(".contextmenu").css("top", y + "px"); + $(".contextmenu").addClass("contextmenu-show"); +} + +function showChargesMenu(x, y) { + $(".ccontextmenu").css("left", x + "px"); + $(".ccontextmenu").css("top", y + "px"); + $(".ccontextmenu").addClass("ccontextmenu-show"); +} + +function hideMenu() { + $(".contextmenu").removeClass("contextmenu-show"); +} + +function hideChargesMenu() { + $(".ccontextmenu").removeClass("ccontextmenu-show"); +} + +function onMouseDown(e) { + hideMenu(); + hideChargesMenu(); + document.removeEventListener("mouseup", onMouseDown); +} + +function openContextMenu(e, args) { + e.preventDefault(); + showMenu(e.pageX, e.pageY); + $(".contextmenu").empty(); + $.each(args, function (index, value) { + if (value.status !== "blur(5px)") { + $(".contextmenu").prepend( + ` +
      • + + + ${value.text} + +
      • + ` + ); + } + }); + document.addEventListener("mouseup", onMouseDown); +} + +function openChargesContextMenu(e, args) { + e.preventDefault(); + showChargesMenu(e.pageX, e.pageY); + $(".ccontextmenu").empty(); + $.each(args, function (index, value) { + if (value.status !== "blur(5px)") { + $(".ccontextmenu").prepend( + ` +
      • + ${value.info} +
      • + ` + ); + } + }); + document.addEventListener("mouseup", onMouseDown); +} + +function expandImage(url) { + $(".close-all").css("filter", "brightness(35%)"); + $(".gallery-image-enlarged").fadeIn(150); + $(".gallery-image-enlarged").css("display", "block"); + $(".gallery-image-enlarged").attr("src", url); +} + +function copyImageSource(url) { + const el = document.createElement('textarea'); + el.value = url; + document.body.appendChild(el); + el.select(); + document.execCommand('copy'); + document.body.removeChild(el); +} + +function removeImage(url) { + let cid = $(".manage-profile-citizenid-input").val(); + $(".gallery-inner-container img") + .filter("[src='" + url + "']") + .remove(); +} + +function hideIcidentsMenu() { + if ( + $(".icidents-person-search-container").css("display") != "none" && + !mouse_is_inside + ) { + $(".icidents-person-search-container").fadeOut(250); + $(".close-all").css("filter", "none"); + } +} + +function onMouseDownIcidents(e) { + hideIcidentsMenu(); + document.removeEventListener("mouseup", onMouseDownIcidents); +} + +function titleCase(str) { + return str + .split(' ') + .map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase()) + .join(' '); +} + +function searchProfilesResults(result) { + canSearchForProfiles = true; + $(".profile-items").empty(); + + if (result.length < 1) { + $(".profile-items").html( + ` +
        + +
        +
        +
        No Users Matching that search
        +
        +
        +
        +
        +
        + ` + ); + return true; + } + + let profileHTML = ""; + + result.forEach((value) => { + let charinfo = value.charinfo; + let metadata = value.licences; + + if (typeof value.charinfo == "string") { + charinfo = JSON.parse(charinfo); + } + + if (typeof value.metadata == "string") { + metadata = JSON.parse(metadata); + } + + let name = charinfo.firstname + " " + charinfo.lastname; + let warrant = "red-tag"; + let convictions = "red-tag"; + + let licences = ""; + let licArr = Object.entries(value.licences); + + if (licArr.length == 0 || licArr.length == undefined) { + var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; + licArr = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); + } + + if (licArr.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { + for (const [lic, hasLic] of licArr) { + let tagColour = + hasLic == true ? "green-tag" : "red-tag"; + licences += `${titleCase(lic)}`; + } + } + + if (value.warrant == true) { + warrant = "green-tag"; + } + + if (value.convictions < 5) { + convictions = "green-tag"; + } else if ( + value.convictions > 4 && + value.convictions < 15 + ) { + convictions = "orange-tag"; + } + + if (value.pp == '') { + value.pp = 'img/not-found.webp' + } + + profileHTML += ` +
        + +
        +
        +
        ${name}
        +
        + ${licences} +
        +
        +
        +
        ID: ${value.citizenid}
          +
        +
        +
        + `; + }); + + $(".profile-items").html(profileHTML); +} + +window.addEventListener("load", function () { + document + .getElementById("offenses-search") + .addEventListener("keyup", function () { + var search = this.value.toLowerCase(); + if (search.length > 1) { + $.each($(".offense-item"), function (i, d) { + const Name = $(this) + .find(".offense-item-offense") + .html() + .toLowerCase(); + const Number = $(this) + .find(".offense-item-id") + .html() + .toLowerCase(); + if (Name.includes(search)) { + $(this).show(); + } else if (Number.includes(search)) { + $(this).show(); + } else { + $(this).hide(); + } + }); + } else { + $.each($(".offense-item"), function (i, d) { + $(this).show(); + }); + } + }); }); \ No newline at end of file diff --git a/ui/dashboard.html b/ui/dashboard.html index 9a23eac5..ed352ed3 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -1,933 +1,1108 @@ - - - - - - - - Project Sloth MDT - - - - - - - - - - - - - - - - -
          -
            -
            -
            - - - -
            -
            -
            Attached Units
            -
            -
            -
            -
            - - - - - -
            - - - -
            -
            - -
            -
            -
            - - - -
            - -
            -
            -
            -
            Dispatch
            -
            Refresh
            -
            -
            - -
            - -
            -
            Warrants
            -
            - -
            -
            -
            - -
            -
            -
            Quote of the Day
            -
            The DOJ is not the enemy, but is clearly not an ally
            -
            -
            -
            -
            Bulletin Board
            -
            -
            -
            -
            -
            -
            -
            Dispatch
            -
            -
            Active Units
            -
            0
            -
            0
            -
            0
            -
            0
            -
            -
            -
            -
            Recent Calls
            -
            -
            -
            - -
            -
            -
            -
            -
            -
            -
            - - -
            - -
            -
            Profiles
            -
            -
            -
            -
            -
            -
            Manage Profile
            -
            -
            You are currently editing ...
            -
            Save
            -
            -
            - -
            -
            Citizen ID
            -
            -
            -
            Forename
            -
            -
            -
            Surname
            -
            -
            -
            DOB
            -
            -
            -
            Profession
            -
            -
            -
            Apartment
            -
            -
            -
            Profile Image URL
            -
            -
            -
            -
            - - -
            -
            -
            -
            Licenses
            -
            -
            -
            -
            Vehicles
            -
            -
            -
            -
            -
            Tags
            -
            -
            -
            -
            -
            -
            Properties
            -
            -
            - - - - -
            -
            Known Convictions
            -
            -
            - -
            -
            -
            -
            - -
            - -
            -
            -
            Incidents
            -
            Refresh
            -
            -
            -
            -
            -
            -
            -
            -
            -
            Manage Incident
            -
            -
            - -
            -
            You are currently creating a new Incident
            -
            Title
            -
            - -
            -
            -
            Tags
            -
            -
            -
            -
            -
            -
            -
            -
            Officers Involved
            -
            -
            -
            - -
            -
            -
            -
            -
            Civilians Involved
            -
            -
            -
            - -
            -
            -
            -
            -
            Evidence
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            Associated
            -
            -
            -
            Criminals Involved
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            -
            - -
            - -
            - -
            -
            Reports
            -
            Refresh
            -
            -
            -
            -
            -
            -
            -
            -
            Manage Report
            -
            New
            -
            Save
            -
            -
            You are currently creating a new report
            -
            Title
            -
            - - -
            - -
            Type
            -
            - - -
            - -
            -
            -
            -
            Tags
            -
            -
            -
            -
            - -
            -
            -
            Officers Involved
            -
            -
            -
            -
            -
            -
            -
            Civilians Involved
            -
            -
            -
            -
            -
            - -
            -
            -
            - -
            - -
            - -
            -
            Bolos
            -
            Refresh
            -
            -
            -
            -
            -
            -
            -
            -
            Manage Bolo
            -
            New
            -
            Save
            -
            -
            You are currently creating a new BOLO
            -
            Title
            -
            - - -
            - -
            Plate
            -
            - -
            Owner
            -
            - -
            Individual
            -
            - - -
            - -
            -
            -
            -
            Tags
            -
            -
            -
            -
            - -
            -
            -
            Officers Involved
            -
            -
            -
            -
            -
            - -
            -
            -
            - -
            - -
            - -
            -
            -
            -
            - -
            - -
            -
            Vehicles
            -
            -
            - -
            -
            -
            -
            -
            Vehicle Information
            -
            Save
            -
            -
            - -
            -
            Registration Plate
            -
            -
            -
            Owner
            -
            -
            -
            Class
            -
            -
            -
            Make/Model
            -
            -
            -
            Image URL
            -
            -
            -
            Vehicle Points: 0
            -
            -
            -
            -
            -
            Known Information
            -
            -
            -
            Paint
            -
            Impound
            -
            BOLO
            -
            Code 5
            -
            Stolen
            -
            -
            -
            - -
            -
            -
            -
            - -
            - -
            -
            Weapons
            -
            -
            - -
            -
            -
            -
            -
            Weapon Information
            -
            New
            -
            Save
            -
            -
            - -
            -
            Serial Number
            -
            -
            -
            Registered To
            -
            -
            -
            Model
            -
            -
            -
            Class
            -
            -
            -
            Image URL
            -
            -
            -
            -
            - -
            -
            -
            -
            - -
            - -
            -
            -
            -
            - -
            - -
            -
            - -
            Pacific Bank CAM 1
            -
            Pacific Bank CAM 2
            -
            Pacific Bank CAM 3
            -
            Limited Ltd Grove St.
            -
            Rob's Liqour Prosperity St.
            -
            Rob's Liqour San Andreas Ave.
            -
            Limited Ltd Ginger St.
            -
            24/7 Supermarkt Innocence Blvd.
            -
            Rob's Liqour El Rancho Blvd.
            -
            Limited Ltd West Mirror Drive
            -
            24/7 Supermarkt Clinton Ave
            -
            Limited Ltd Banham Canyon Dr
            -
            Rob's Liqour Great Ocean Hwy
            -
            24/7 Supermarkt Ineseno Road
            -
            24/7 Supermarkt Barbareno Rd.
            -
            24/7 Supermarkt Route 68
            -
            Rob's Liqour Route 68
            -
            24/7 Supermarkt Senora Fwy CAM 1
            -
            24/7 Supermarkt Alhambra Dr.
            -
            24/7 Supermarkt Senora Fwy CAM 2
            -
            Fleeca Bank Hawick Ave CAM 1
            -
            Fleeca Bank Hawick Ave CAM 2
            -
            Fleeca Bank Legion Square
            -
            Fleeca Bank Del Perro Blvd
            -
            Fleeca Bank Great Ocean Hwy
            -
            Paleto Bank
            -
            Del Vecchio
            Liquor Paleto Bay
            -
            Don's Country Store Paleto Bay CAM 1
            -
            Don's Country Store Paleto Bay CAM 2
            -
            Don's Country Store Paleto Bay CAM 3
            -
            Vangelico Jewelery CAM 1
            -
            Vangelico Jewelery CAM 2
            -
            Vangelico Jewelery CAM 3
            -
            Vangelico Jewelery CAM 4
            -
            -
            -
            -
            -
            - -
            - -
            -
            Dispatch Calls
            -
            - -
            -
            -
            - -
            -
            -
            -
            - -
            -
            -
            Dispatch Map
            -
            - -
            - -
            -
            -
            - - - - - - - + + + + + + + + Project Sloth MDT + + + + + + + + + + + + + + + + +
              +
                +
                +
                + + + +
                +
                +
                Attached Units
                +
                +
                +
                +
                + + + + + +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                +
                + +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                +
                +
                +
                Dispatch
                +
                Refresh
                +
                +
                + +
                + +
                +
                Warrants
                +
                + +
                +
                +
                + +
                +
                +
                Quote of the Day
                +
                The DOJ is not the enemy, but is clearly not an ally
                +
                +
                +
                +
                Bulletin Board
                +
                +
                +
                +
                +
                +
                +
                Dispatch
                +
                +
                Active Units
                +
                0
                +
                0
                +
                0
                +
                0
                +
                +
                +
                +
                Recent Calls
                +
                +
                +
                + +
                +
                +
                +
                +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                +
                Profiles
                +
                +
                +
                +
                +
                +
                Manage Profile
                +
                +
                You are currently editing ...
                +
                Save
                +
                +
                + +
                +
                Citizen ID
                +
                +
                +
                Forename
                +
                +
                +
                Surname
                +
                +
                +
                DOB
                +
                +
                +
                Profession
                +
                +
                +
                Apartment
                +
                +
                +
                Profile Image URL
                +
                +
                +
                +
                + + +
                +
                +
                +
                Licenses
                +
                +
                +
                +
                Vehicles
                +
                +
                +
                +
                +
                Tags
                +
                +
                +
                +
                +
                +
                Properties
                +
                +
                + + + + +
                +
                Known Convictions
                +
                +
                + +
                +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                +
                +
                Incidents
                +
                Refresh
                +
                +
                +
                +
                +
                +
                +
                +
                +
                Manage Incident
                +
                +
                + +
                +
                You are currently creating a new Incident
                +
                Title
                +
                + +
                +
                +
                Tags
                +
                +
                +
                +
                +
                +
                +
                +
                Officers Involved
                +
                +
                +
                + +
                +
                +
                +
                +
                Civilians Involved
                +
                +
                +
                + +
                +
                +
                +
                +
                Evidence
                +
                +
                +
                +
                +
                +
                +
                +
                +
                +
                Associated
                +
                +
                +
                Criminals Involved
                +
                +
                +
                +
                +
                +
                +
                +
                +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                + +
                +
                Reports
                +
                Refresh
                +
                +
                +
                +
                +
                +
                +
                +
                Manage Report
                +
                New
                +
                Save
                +
                +
                You are currently creating a new report
                +
                Title
                +
                + + +
                + +
                Type
                +
                + + +
                + +
                +
                +
                +
                Tags
                +
                +
                +
                +
                + +
                +
                +
                Officers Involved
                +
                +
                +
                +
                +
                +
                +
                Civilians Involved
                +
                +
                +
                +
                +
                + +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                + +
                +
                Bolos
                +
                Refresh
                +
                +
                +
                +
                +
                +
                +
                +
                Manage Bolo
                +
                New
                +
                Save
                +
                +
                You are currently creating a new BOLO
                +
                Title
                +
                + + +
                + +
                Plate
                +
                + +
                Owner
                +
                + +
                Individual
                +
                + + +
                + +
                +
                +
                +
                Tags
                +
                +
                +
                +
                + +
                +
                +
                Officers Involved
                +
                +
                +
                +
                +
                + +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                + +
                +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                +
                Vehicles
                +
                +
                + +
                +
                +
                +
                +
                Vehicle Information
                +
                Save
                +
                +
                + +
                +
                Registration Plate
                +
                +
                +
                Owner
                +
                +
                +
                Class
                +
                +
                +
                Make/Model
                +
                +
                +
                Image URL
                +
                +
                +
                Vehicle Points: 0
                +
                +
                +
                +
                +
                Known Information
                +
                +
                +
                Paint
                +
                Impound
                +
                BOLO
                +
                Code 5
                +
                Stolen
                +
                +
                +
                + +
                +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                +
                Weapons
                +
                +
                + +
                +
                +
                +
                +
                Weapon Information
                +
                New
                +
                Save
                +
                +
                + +
                +
                Serial Number
                +
                +
                +
                Registered To
                +
                +
                +
                Model
                +
                +
                +
                Class
                +
                +
                +
                Image URL
                +
                +
                +
                +
                + +
                +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                +
                + +
                Pacific Bank CAM 1
                +
                Pacific Bank CAM 2
                +
                Pacific Bank CAM 3
                +
                Limited Ltd Grove St.
                +
                Rob's Liqour Prosperity St.
                +
                Rob's Liqour San Andreas Ave.
                +
                Limited Ltd Ginger St.
                +
                24/7 Supermarkt Innocence Blvd.
                +
                Rob's Liqour El Rancho Blvd.
                +
                Limited Ltd West Mirror Drive
                +
                24/7 Supermarkt Clinton Ave
                +
                Limited Ltd Banham Canyon Dr
                +
                Rob's Liqour Great Ocean Hwy
                +
                24/7 Supermarkt Ineseno Road
                +
                24/7 Supermarkt Barbareno Rd.
                +
                24/7 Supermarkt Route 68
                +
                Rob's Liqour Route 68
                +
                24/7 Supermarkt Senora Fwy CAM 1
                +
                24/7 Supermarkt Alhambra Dr.
                +
                24/7 Supermarkt Senora Fwy CAM 2
                +
                Fleeca Bank Hawick Ave CAM 1
                +
                Fleeca Bank Hawick Ave CAM 2
                +
                Fleeca Bank Legion Square
                +
                Fleeca Bank Del Perro Blvd
                +
                Fleeca Bank Great Ocean Hwy
                +
                Paleto Bank
                +
                Del Vecchio
                Liquor Paleto Bay
                +
                Don's Country Store Paleto Bay CAM 1
                +
                Don's Country Store Paleto Bay CAM 2
                +
                Don's Country Store Paleto Bay CAM 3
                +
                Vangelico Jewelery CAM 1
                +
                Vangelico Jewelery CAM 2
                +
                Vangelico Jewelery CAM 3
                +
                Vangelico Jewelery CAM 4
                +
                +
                +
                +
                +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                +
                Dispatch Calls
                +
                + +
                +
                +
                + +
                +
                +
                +
                + +
                +
                +
                Dispatch Map
                +
                + +
                + +
                +
                +
                + + + + + + + diff --git a/ui/style.css b/ui/style.css index d0358be5..7f621b9e 100644 --- a/ui/style.css +++ b/ui/style.css @@ -1,6753 +1,6607 @@ -@import url('https://fonts.googleapis.com/css?family=Montserrat'); - -:root { - --color-1: #1E3955; - --color-2: #213F5F; - --color-3: #2C537B; - --color-4: #23405E; - --color-5: #152638; - --color-6: #121f2c; - --color-7: rgb(28, 54, 82); - --color-8: #2554cc; - --color-9: #6E707C; - --color-10: #8f741b; -} - -body { - font-family: 'Montserrat', sans-serif; - overflow: hidden; - display: none; -} - -textarea { - font-family: 'Montserrat', sans-serif; -} - -::-webkit-scrollbar { - width: 0px; -} - -input::-webkit-outer-spin-button, -input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; -} - -.dashboard-page-container { - /* background-color: rgb(40, 40, 40); */ - background-color: rgb(40, 40, 40); - - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.badge-logo { - margin-left: 1vh -} - -.profile-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.incidents-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.bolos-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.reports-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.penalcode-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.dmv-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.weapons-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.stafflogs-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; - overflow: auto -} - -.container-load { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} - -.header { - height: 7vh; - background-color: var(--color-1); - - width: 86.5%; - position: absolute; - - display: flex; - align-items: center; - user-select: none; -} - - - -.main-container { - - width: 100%; - height: 93.5%; - position: absolute; - display: flex; - bottom: 0; -} - -.nav-menu { - - - min-width: 22.5vh; - height: 100%; - display: flex; - flex-direction: row; - user-select: none; - margin-left: 10px; - height: 5vh; - - width: 86.5%; - position: absolute; - - display: flex; - align-items: center; - user-select: none; - - -} - -.nav-item { - margin-top: 10px; - padding: 10px; - color: rgb(138, 138, 138); - font-size: 18px; - font-weight: bolder; - margin-left: 10px; -} - -.nav-item:hover { - color: rgb(255, 255, 255); - /* background-color: var(--color-3); */ -} - -.active-nav { - color: rgb(255, 255, 255); - /* background-color: var(--color-3); */ -} - -.warrants-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-bottom: 10px; -} - -.warrants-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.fa-search { - font-size: 15px; - font-weight: normal; -} - -.warrants-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 55vh; -} - -.warrants-item { - background-color: var(--color-5); - width: 100%; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; -} - -.warrants-item:hover { - background-color: var(--color-3); -} - -.warrant-image { - width: 9vh; - height: 9vh; - margin-left: 5px; - margin-top: auto; - margin-bottom: auto; -} - -.warrant-title { - font-size: 16px; - font-weight: lighter; - color: white; - margin-top: 5px; -} - -.warrant-item-info { - color: #cccccc; - font-size: 12px; -} - -.warrant-bottom-info { - display: flex; - margin-top: 1vh; - margin-bottom: 0.75vh; - width: 100%; -} - -.warrant-id { - color: white; - font-size: 12px; -} - -.warrant-expiry-date { - color: white; - font-size: 12px; - margin: auto; - margin-right: 10px; -} - -.quotes-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - width: 50vh; - height: 75px; - margin-top: 10px; - margin-left: 10px; - display: flex; - align-items: center; - user-select: none; -} - -.quote-title { - font-size: 14px; - background-color: var(--color-4); - padding: 5px; - margin: 10px 0px 10px 10px; - text-align: center; - color: white; - font-weight: bolder; - width: 85px; - /* height: 30px; */ - text-shadow: black 1px 1px; -} - -.quote { - margin-right: 10px; - margin-left: 10px; - /* margin-bottom: 25px; */ - width: 100%; - background-color: var(--color-5); - height: 30px; - padding: 10px; - text-align: center; - display: flex; - font-style: italic; -} - -.quote-span { - margin: auto; - color: white; - font-size: 16px; -} - -.bulletin-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 95.5%; - width: 50vh; - margin-top: 10px; - margin-bottom: 10px; - margin-left: 10px; - user-select: none; - overflow: hidden; -} - -.map-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 83.5%; - align-items: center; - user-select: none; -} - -.map-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 45.5%; - width: 50vh; - margin-top: 10px; - margin-bottom: 8px; - margin-left: 10px; - user-select: none; - overflow: hidden; -} - -.map-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.map-add-btn:hover { - background-color: var(--color-3); -} - -.map-page-container { - /* background-color: rgb(40, 40, 40); */ - background-color: rgb(40, 40, 40); - - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; -} -.map-item { - position: absolute; - - width: 98%; - height: 80%; - - top: 56%; - left: 50%; - - transform: translateX(-50%) translateY(-50%); - - opacity: 1; - overflow: hidden; -} - -.smallmap-item { - position: absolute; - - width: 96%; - height: 75%; - - top: 56%; - left: 50%; - - transform: translateX(-50%) translateY(-50%); - - opacity: 1; - overflow: hidden; -} - - -.dash-map-img { - position: absolute; - - top: -200%; - left: 20%; - - width: 100%; - height: 100%; - - transform: rotatez(90deg) scale(8); -} -/* .dispatch-comms-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 45.5%; - width: 50vh; - margin-top: 1vh; - margin-left: 10px; -} */ - -.bulletin-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 83.5%; - align-items: center; - user-select: none; -} - -.bulletin-items-continer { - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - overflow: auto; - height: 100%; - display: flex; - flex-direction: column; -} - -.bulletin-item { - background-color: var(--color-5); - width: 45vh; - /* min-height: 7.7vh; */ - /* height: 7.7vh; */ - padding: 10px; - display: flex; - flex-direction: column; - margin-bottom: 10px; -} - -.bulletin-item:hover { - background-color: var(--color-3); -} - -.bulletin-item-title { - color: white; - margin-left: 5px; - font-size: 20px; - text-align: left; -} - -span.bulletin-item-title { - outline: none; - border: none; -} - -span.bulletin-item-title[contenteditable]:empty::before { - content: 'Enter Title'; -} - -.bulletin-item-info { - color: #cccccc; - font-size: 15px; - margin-left: 5px; - margin-top: 10px; - text-align: left; - padding-bottom: 0.8vh; - overflow-wrap: break-word; -} - -span.bulletin-item-info { - outline: none; - border: none; -} - -span.bulletin-item-info[contenteditable]:empty::before { - content: 'Enter Bulletin Information'; -} - -.bulletin-bottom-info { - display: flex; - margin-left: 5px; - margin-bottom: 0px; - color: white; - font-size: 12px; - height: 100%; -} - -.bulletin-date { - margin: auto; - margin-right: 5px; - margin-bottom: 0px; -} - -.bulletin-id { - margin: auto; - margin-left: 0px; - margin-bottom: 0px; -} - -.dispatch-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 73.0vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; - margin-bottom: 10px; -} - -.dispatch-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.active-unit-title { - background-color: var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 2px; - margin-left: 10px; - margin-left: 13px; - width: 57.5%; - align-items: center; - user-select: none; -} - -.active-unit-count { - background-color: var(--color-3); - color: white; - font-weight: bolder; - font-size: 14px; - padding-top: 6px; - padding-bottom: 6px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 3px; - margin-left: 3px; - width: 8%; - align-items: center; - user-select: none; - border-radius: 5px; -} - -.calls-title { - background-color: var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 2px; - margin-left: 10px; - margin-left: 13px; - width: 95%; - align-items: center; - user-select: none; -} - -.calls-search-title { - background-color: var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 2px; - margin-left: 10px; - margin-left: 13px; - width: 95%; - align-items: center; - user-select: none; -} - -.calls-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#calls-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#calls-search-input::placeholder { - color: white; -} - -#police-count { - background-color: #093095; -} - -#ems-count { - background-color: #950909; -} - -#doj-count { - background-color: #525252; -} - -#doc-count { - background-color: #7b25cc; -} - -#pa-count { - background-color: #008080; -} - -.active-unit-list { - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - overflow: auto; - height: 35vh; - display: flex; - flex-direction: column; - width: 95%; -} - -.active-unit-item { - padding-top: 7.5px; - padding-bottom: 7.5px; - padding-right: 10px; - padding-left: 10px; - /* height: 3vh; */ - background-color: var(--color-5); - display: flex; - align-items: center; - margin-bottom: 5px; -} - - -#draggedItem { - position: absolute; - z-index: 80; - -webkit-transition: opacity 0.2s ease; - -moz-transition: opacity 0.2s ease; - -ms-transition: opacity 0.2s ease; - transition: opacity 0.2s ease; - opacity: 0; - pointer-events: none; - - padding: 10px; - height: 3vh; - background-color: var(--color-5); - display: flex; - align-items: center; - margin-bottom: 5px; - width: 45vh; -} - -.unit-status { - width: fit-content; - padding: 5px; - padding-left: 15px; - padding-right: 15px; - color: white; - font-size: 12px; - font-weight: bolder; - margin: auto; - margin-left: 5px; - margin-right: 0px; - background-color: #0B9509; - border-radius: 10px; -} - -.green-status { - background-color: #099517; -} - -.yellow-status { - background-color: #958F09; -} - -.unit-job { - width: fit-content; - padding: 5px; - padding-left: 15px; - padding-right: 15px; - color: white; - font-size: 12px; - font-weight: bolder; - margin: auto; - margin-left: 5px; - margin-right: 0px; - background-color: #093095; - border-radius: 10px; -} - -.unit-police { - background-color: #093095; -} - -.unit-ems { - background-color: #950909; -} - -.unit-doc { - background-color: #7b25cc; -} - -.unit-pa { - background-color: #008080; -} - -.unit-name { - margin: auto; - margin-left: 10px; - margin-right: 0px; - font-size: 12px; - font-weight: bolder; - color: white; -} - -.unit-radio { - margin: auto; - margin-right: 5px; - font-size: 12px; - font-weight: bolder; - color: white; - background-color: var(--color-3); - padding: 5px; - padding-left: 12.5px; - padding-right: 12.5px; - border-radius: 5px; -} - -.active-calls-list { - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - overflow: auto; - height: 100%; - display: flex; - flex-direction: column; - width: 95%; -} - -.active-calls-item { - height: fit-content; - background-color: var(--color-5); - display: flex; - align-items: center; - margin-bottom: 5px; - border: 1px solid rgb(32, 32, 32); -} - -.active-call-inner-container { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} - -.red-call { - background-color: #381515; -} - -.call-item-top { - height: 50%; - width: 100%; - display: flex; - align-items: center; - margin: auto; - margin-top: .5vh; -} - -.call-number { - background-color: #950909; - color: white; - font-size: 15px; - font-weight: bolder; - padding: 2.5px; - padding-left: 10px; - padding-right: 10px; - border-radius: 10px; - width: fit-content; - margin: auto; - margin-left: .75vh; - margin-right: 0; -} - -.call-code { - background-color: #097C95; - color: white; - font-size: 15px; - font-weight: bolder; - padding: 2.5px; - padding-left: 10px; - padding-right: 10px; - border-radius: 10px; - width: fit-content; - margin: auto; - margin-left: 5px; - margin-right: 0; -} - -.call-title { - color: white; - font-size: 20px; - font-weight: bolder; - padding: 2.5px; - padding-left: 0px; - padding-right: 0px; - border-radius: 10px; - width: fit-content; - margin: auto; - margin-left: 5px; - margin-right: 0; -} - -.call-radio { - margin: auto; - margin-left: auto; - margin-right: .5vh; - font-size: 15px; - font-weight: bolder; - color: white; - background-color: var(--color-3); - padding: 5px; - padding-left: 12.5px; - padding-right: 12.5px; - border-radius: 5px; -} - -.call-item-bottom { - height: fit-content; - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - margin: auto; - margin-top: 0vh; - margin-left: .75vh; - padding-bottom: .75vh; -} - -.call-bottom-info { - color: white; - font-size: 15px; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - margin-left: 0.3vh; - overflow:wrap; - white-space:normal; -} - -.dispatch-line { - background-color: rgba(128, 128, 128, 0.1); - height: 0.05vh; - width: 100%; - margin-top: 0.1vh; - margin-bottom: 0.1vh -} - -.call-bottom-info > .far { - margin-right: .1vh; -} - -.call-bottom-information { - margin-top: 0.5vh; -} - -.call-victim { - color: white; - font-size: 15px; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - margin-left: 0px; -} - -a { - text-decoration: none; -} - -.profile-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - - - -.profile-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.profile-title:hover { - background-color: var(--color-3); -} - -.profile-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#profile-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#profile-search-input::placeholder { - color: white; -} - -.profile-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.profile-item { - background-color: var(--color-5); - width: 100%; - height: 9vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - -} - -.profile-item:hover { - background-color: var(--color-3); -} - -.profile-image { - width: 7vh; - height: 7vh; - margin-left: 10px; - margin-top: auto; - margin-bottom: auto; - object-fit: cover; -} - -.profile-item-title { - font-size: 16px; - font-weight: lighter; - color: white; - padding-top: 2px; -} - -.profile-tags { - display: flex; - overflow-x: auto; - width: 100%; - margin-top: 10px; - margin-bottom: 5px; -} - -.profile-tag { - margin: auto; - margin-left: 0px; - margin-right: 6px; - padding: 4px; - padding-left: 7px; - padding-right: 7px; - border-radius: 10px; - color: white; - font-size: 12px; - font-weight: bolder; - background-color: #956E09; -} - -.profile-bottom-info { - display: flex; - margin: auto; - width: 100%; -} - -.profile-id { - color: white; - font-size: 13px; -} - -.manage-profile-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -.manage-profile-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-profile-editing-title { - background-color: var(--color-3); - color: white; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 80%; - align-items: center; - user-select: none; - display: block; -} - -.manage-profile-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 10px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-profile-save:hover { - background-color: #1caa28; -} - -.manage-profile-info-container { - display: flex; - flex-direction: row; - width: 95%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; -} - -.manage-profile-pic { - width: 45%; - object-fit: cover; -} - -.manage-profile-info-inner-container { - display: flex; - flex-direction: column; - width: 55%; -} - -.manage-profile-citizenid { - color: white; - margin-left: 10px; - font-size: 14px; - user-select: none; -} - -.manage-profile-citizenid-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.manage-cid-pic { - color: white; - font-size: 16px; - margin-left: 10px -} - -.line { - background-color: var(--color-3); - height: 2px; - margin-left: 10px; - margin-bottom: 10px; -} - -.manage-profile-name { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-name-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.manage-profile-dob { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-dob-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.manage-profile-job { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-job-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.manage-profile-url { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-url-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 21.75vh; -} - -.manage-profile-info { - width: 92.5%; - margin: auto; - margin-top: 10px; - margin-bottom: 15px; - border: none; - outline: none; - height: 100%; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.manage-profile-fingerprint { - width: 92.5%; - margin: auto; - margin-top: 10px; - margin-bottom: 15px; - border: none; - outline: none; - height: 8%; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; - line-height: 1 -} - -.manage-profile-right-container { - display: flex; - flex-direction: column; - height: 95.7%; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 15px; -} - -.manage-profile-licenses-container { - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - height: 15%; -} - -.license-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.licenses-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.license-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: rgb(255, 255, 255); - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; -} - -.manage-profile-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - margin-top: 10px; - min-height: 100px; - max-height: 200px; - overflow: scroll; -} - -.tags-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 84%; - align-items: center; - user-select: none; -} - -.tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.tags-add-btn:hover { - background-color: var(--color-3); -} - -.tags-holder { - overflow: auto; - margin: auto; - margin-top: 5px; - width: 95%; - user-select: none; -} - -.tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -span.tag-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.tag-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.manage-profile-vehs-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - margin-top: 10px; - max-height: 150px; - overflow: scroll; -} - -.vehs-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.vehs-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.veh-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; -} - -.manage-profile-houses-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - margin-top: 10px; - max-height: 150px; - overflow: scroll; -} - -.houses-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.houses-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.houses-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: bolder; - background-color: white; - user-select: none; -} - -.manage-profile-gallery-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - margin-top: 10px; - height: 18vh; - overflow: scroll; -} - -.gallery-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 84%; - align-items: center; - user-select: none; -} - -.gallery-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.gallery-add-btn:hover { - background-color: var(--color-3); -} - -.gallery-inner-container { - overflow: auto; - white-space: nowrap; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.gallery-img { - width: 10vh; - filter: blur(5px); - object-fit: cover; -} - -.manage-convictions-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - margin-top: 10px; - max-height: 200px; - overflow: scroll; -} - -.convictions-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - -} - -.convictions-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.loader { - position: absolute; - left: 45%; - top: 45%; - z-index: 1; - width: 100px; - height: 100px; - border: 10px solid var(--color-1); - border-radius: 50%; - border-top: 10px solid var(--color-3); - -webkit-animation: spin 5s linear infinite; - animation: spin 5s linear infinite; -} - -.profile-loader { - margin-top: 5vh; - margin-left: auto; - margin-right: auto; - z-index: 1; - width: 120px; - height: 120px; - border: 12px solid var(--color-4); - border-radius: 50%; - border-top: 12px solid var(--color-3); - -webkit-animation: spin 2s linear infinite; - animation: spin 2s linear infinite; -} - -@-webkit-keyframes spin { - 0% { -webkit-transform: rotate(0deg); } - 100% { -webkit-transform: rotate(360deg); } -} - -@keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } -} - -.gallery-image-enlarged { - width: 40vh; - position: absolute; - top: 20%; - left: 25%; - display: none; - z-index: 999; -} - -/* Context Menu */ - -.contextmenu { - position: absolute; - width: fit-content; - padding: 2px; - margin: 0; - border: 1px solid var(--color-3); - background: var(--color-5); - z-index: 100; - border-radius: 3px; - box-shadow: 1px 1px 4px rgba(0,0,0,.2); - opacity: 0; - transform: translate(0, 15px) scale(.95); - transition: transform 0.1s ease-out, opacity 0.1s ease-out; - pointer-events: none; -} - -.contextmenu-item { - display: block; - position: relative; - margin: 0; - padding: 0; - white-space: nowrap; -} - -.contextmenu-btn { - display: block; - color: white; - font-size: 13px; - cursor: pointer; - border: 1px solid transparent; - white-space: nowrap; - padding: 6px 8px; - border-radius: 3px; -} - -.contextmenu-btn { - outline: 0 none; - text-decoration: none; -} - -.contextmenu-text { - margin-left: 5px; -} - -.contextmenu-btn .fa { - position: absolute; - left: 8px; - top: 50%; - transform: translateY(-50%); -} - -.contextmenu-item-disabled { - opacity: .5; - pointer-events: none; -} - -.contextmenu-item-disabled .contextmenu-btn { - cursor: default; -} - -.contextmenu-item-submenu::after { - content: ""; - position: absolute; - right: 6px; - top: 50%; - transform: translateY(-50%); - border: 5px solid transparent; - border-left-color: #808080; -} - -.contextmenu-item-submenu:hover::after { - border-left-color: #fff; -} - -.contextmenu-show, -.contextmenu-item:hover > .contextmenu { - opacity: 1; - transform: translate(0, 0) scale(1); - pointer-events: auto; -} - -.contextmenu-item:hover > .contextmenu { - transition-delay: 300ms; -} - -.revoke-licence:hover { - background-color: #950909; -} - -.give-licence:hover { - background-color: #099517; -} - -.remove-image:hover { - background-color: #950909; -} - -.expand-image:hover { - background-color: #099517; -} - -.copy-image-link:hover { - background-color: #099517; -} - -.gallery-upload-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#gallery-upload-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#gallery-upload-input::placeholder { - color: white; -} - -.penalcode-embed { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 86.5%; - width: 75%; - margin: auto; - overflow: hidden; -} - -.penalcode-embed iframe { - height: 86.5%; - width: 88%; - margin: auto; - border: none; - outline: none; -} - -.incidents-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -.incidents-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.incidents-title:hover { - background-color: var(--color-3); -} - -.incidents-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#incidents-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#incidents-search-input::placeholder { - color: white; -} - -.incidents-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.incidents-item { - background-color: var(--color-5); - width: 100%; - height: 5.5vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - flex-direction: column; -} - -.incidents-item:hover { - background-color: var(--color-3); -} - -.incidents-top-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; -} - -.incidents-item-title { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - max-width: 25vh; - margin-top: 5px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.incedent-report-name { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-top: 5px; -} - -.incidents-bottom-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; - padding-top: 5px; -} - -.incedent-report-id { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-bottom: 5px; -} - -.incedent-report-time-ago { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-bottom: 5px; -} - -.manage-incidents-container { - background-color: var(--color-1); - display: flex; - flex-direction: column; - height: 72.7vh; - max-height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - overflow: auto; -} - -.manage-incidents-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: auto; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.manage-incidents-title:hover { - background-color: var(--color-3); -} - -.manage-incidents-create { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 5px; - padding-bottom: 5px; - align-items: center; - background-color: var(--color-4); - margin: auto; - margin-left: 5px; - margin-top: 10px; - /* margin-right: 0px; */ - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-incidents-create:hover { - background-color: var(--color-3); -} - -.manage-incidents-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 5px; - padding-bottom: 5px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-incidents-save:hover { - background-color: #1caa28; -} - -.manage-incidents-title-tag { - font-size: 16px; - font-weight: lighter; - color: white; - width: 95%; - margin: auto; - text-align: left; - margin-top: 10px; - margin-bottom: 0px; -} - -.manage-incidents-title-input { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-incidents-title-input input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-incidents-reports-content { - width: 91%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - border: none; - outline: none; - min-height: 30vh; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; - pointer-events: none; -} - -.manage-incidents-tags-container { - display: flex; - flex-direction: column; - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.manage-incidents-tags-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-incidents-tags-add-btn:hover { - background-color: var(--color-3); -} - -.manage-incidents-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.manage-incidents-tags-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 5px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-incidents-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.manage-incidents-officers-container { - display: flex; - flex-direction: column; - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.manage-incidents-officers-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-incidents-officers-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.manage-incidents-officers-add-btn:hover { - background-color: var(--color-3); -} - -.manage-incidents-officers-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 5px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-incidents-officers { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.manage-incidents-civilians-container { - display: flex; - flex-direction: column; - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.manage-incidents-civilians-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-incidents-civilians-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.manage-incidents-civilians-add-btn:hover { - background-color: var(--color-3); -} - -.manage-incidents-civilians-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 5px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-incidents-civilians { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.manage-incidents-evidence-container { - display: flex; - flex-direction: column; - border: 2px solid rgb(32, 32, 32); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.manage-incidents-evidence-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-incidents-evidence-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.manage-incidents-evidence-add-btn:hover { - background-color: var(--color-3); -} - -.manage-incidents-evidence-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-incidents-evidence { - width: 10vh; - filter: blur(5px); -} - -span.tag-incident-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.tag-incident-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.officers-incident-input[contenteditable]:empty::before { - content: '(XXX) Officer Name'; -} - -.officers-incident-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.civilians-incident-input[contenteditable]:empty::before { - content: 'Civilian Name'; -} - -.civilians-incident-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.associated-incidents-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; -} - -.associated-incidents-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.associated-incidents-title:hover { - background-color: var(--color-3); -} - -.associated-incidents-tags-container { - display: flex; - flex-direction: column; - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.associated-incidents-tags-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.associated-incidents-tags-add-btn:hover { - background-color: var(--color-3); -} - -.associated-incidents-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.associated-incidents-tags-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.associated-incidents-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.incidents-upload-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#incidents-upload-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#incidents-upload-input::placeholder { - color: white; -} - -.incidents-img { - width: 10vh; - filter: blur(5px); - object-fit: cover; -} - -.bulletin-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.bulletin-add-btn:hover { - background-color: var(--color-3); -} - -.associated-incidents-user-container { - display: flex; - flex-direction: column; - border: 2px solid rgb(32, 32, 32); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.associated-incidents-user-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.associated-incidents-user-tags-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - min-height: 3.5vh; - max-height: 14vh; - user-select: none; - display: flex; - background-color: var(--color-5); -} - -.associated-incidents-user-tag { - text-decoration: none; - margin-top: auto; - margin-bottom: auto; - margin-left: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: white; - font-size: 12px; - font-weight: 600; - background-color: black; - user-select: none; - width: fit-content; -} - -.associated-incidents-user-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - min-height: 3.5vh; - max-height: 37vh; - user-select: none; -} - -.associated-incidents-user { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.associated-incidents-fine-input { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.associated-incidents-fine-input input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.associated-incidents-sentence-input { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 15px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.associated-incidents-sentence-input input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.icidents-person-search { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin-top: 32.5vh; -} - -.icidents-person-search-container { - background-color: var(--color-5); - width: 95vh; - height: 45vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9998; - display: none; -} - -.icidents-person-search-title { - background-color: var(--color-4); - color: white; - font-size: 20px; - font-weight: bolder; - text-align: center; - padding-top: 15px; - padding-bottom: 15px; - width: 95%; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - user-select: none; -} - -.icidents-person-search-name-title { - width: 95%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - color: white; - font-size: 15px; - text-align: left; - user-select: none; -} - -.icidents-person-search-name-input { - background-color: rgba(0, 0, 0, 0); - border: none; - outline: none; - color: white; - width: 100%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - text-align: left; - padding-bottom: 2.5px; -} - -.icidents-person-search-holder { - overflow: auto; - height: 30vh; - width: 95%; - margin: auto; - margin-top: 15px; - margin-bottom: 15px; -} - -.icidents-person-search-item { - width: 100%; - height: 12.5vh; - display: flex; - flex-direction: row; -} - -.icidents-person-search-item:hover { - background-color: var(--color-3); -} - -.icidents-person-search-item-pfp { - width: 11vh; - height: 11vh; - margin-top: auto; - margin-bottom: auto; - margin-left: 10px; -} - -.icidents-person-search-item-right { - display: flex; - flex-direction: column; - width: 100%; - margin-top: auto; - margin-bottom: auto; - margin-right: 10px; - margin-left: 10px; - height: 11vh; -} - -.icidents-person-search-item-right-cid-title { - width: 100%; - margin: auto; - margin-top: 0px; - margin-bottom: 0px; - color: white; - font-size: 16px; - text-align: left; - user-select: none; -} - -.icidents-person-search-item-right-cid-input { - width: 100%; - margin: auto; - margin-top: 5px; - margin-bottom: auto; - color: white; - font-size: 16px; - text-align: left; - padding-bottom: 2.5px; - border-bottom: 2px solid var(--color-3); - user-select: none; -} - -.icidents-person-search-item-right-name-title { - width: 100%; - margin: auto; - margin-top: auto; - margin-bottom: 0px; - color: white; - font-size: 16px; - text-align: left; - user-select: none; -} - -.icidents-person-search-item-right-name-input { - width: 100%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - color: white; - font-size: 16px; - text-align: left; - padding-bottom: 2.5px; - border-bottom: 2px solid var(--color-3); -} - -.bolos-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -.bolos-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.bolos-title:hover { - background-color: var(--color-3); -} - -.bolos-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#bolos-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#bolos-search-input::placeholder { - color: white; -} - -.bolos-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.bolos-item { - background-color: var(--color-5); - width: 100%; - height: 5.5vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - flex-direction: column; -} - -.manage-bolos-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - max-height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - overflow: auto; -} - -.manage-bolos-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - margin-left: 10px; - width: 66%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.manage-bolos-title-tag { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 84%; - align-items: center; - user-select: none; -} - -.manage-bolos-title:hover { - background-color: var(--color-3); -} - - - -.manage-bolos-create { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 5px; - padding-bottom: 5px; - align-items: center; - background-color: var(--color-4); - margin: auto; - margin-left: 5px; - margin-top: 10px; - /* margin-right: 0px; */ - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.manage-bolos-create:hover { - background-color: var(--color-3); -} - -.manage-bolos-input-tag { - font-size: 16px; - font-weight: lighter; - color: white; - width: 95%; - margin: auto; - text-align: left; - margin-top: 10px; - margin-bottom: 0px; -} - -.manage-bolos-input-title { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-bolos-input-title input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-bolos-input-plate { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-bolos-input-plate input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-bolos-input-owner { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-bolos-input-owner input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-bolos-input-individual { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-bolos-input-individual input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-bolos-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 0px; - margin-top: 10px; - margin-right: 13px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.manage-bolos-save:hover { - background-color: #1caa28; -} - -.manage-bolos-new { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #8f1b1b; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.manage-bolos-new:hover { - background-color: #aa1c1c; -} - -.manage-bolos-reports-content { - width: 91%; - margin: auto; - margin-top: 15px; - margin-bottom: 15px; - border: none; - outline: none; - height: 100%; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.manage-bolos-right-container { - display: flex; - flex-direction: column; - height: 95.7%; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 15px; -} - -.manage-bolos-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - max-height: 150px; - overflow: scroll; -} - -.manage-bolos-gallery-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - margin-top: 10px; - height: 18vh; - overflow: scroll; -} - -.manage-bolos-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-officers-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.officers-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.officers-add-btn:hover { - background-color: var(--color-3); -} - -.manage-officers-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - max-height: 150px; - margin-top: 10px; - overflow: scroll; -} - -.bolo-item { - background-color: var(--color-5); - width: 100%; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - flex-direction: column; -} - -.bolo-item:hover { - background-color: var(--color-3); -} - -.bolo-top-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; -} - -.bolo-item-title { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-top: 5px; -} - -.bolo-report-name { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-top: 5px; -} - -.bolo-bottom-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; - margin-top: 5px -} - -.bolo-report-id { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-bottom: 5px; -} - -.bolo-report-time-ago { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-bottom: 5px; -} - -.bolos-search-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.bolos-search-refresh:hover { - background-color: #aa891c; -} - -.bolos-search-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.bolos-search-title:hover { - background-color: var(--color-3); -} - -.manage-bolos-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.manage-bolos-tags-add-btn:hover { - background-color: var(--color-3); -} - -span.tag-bolo-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.tag-bolo-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.officer-tag-bolo-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.officer-tag-bolo-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.bolo-gallery-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.bolo-gallery-add-btn:hover { - background-color: var(--color-3); -} - -.bolo-gallery-upload-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#bolo-gallery-upload-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#bolo-gallery-upload-input::placeholder { - color: white; -} - -.bolo-img { - width: 10vh; - filter: blur(5px); - object-fit: cover; -} - -.bolo-gallery-inner-container { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-bolos-editing-title { - background-color: var(--color-3); - color: white; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - margin-left: 10px; - width: 95%; - align-items: center; - user-select: none; -} - -.reports-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -#home-reports-container { - height: 50%; -} - -#home-warrants-container { - height: 50%; -} - -.dispatch-comms-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 45.5%; - width: 50vh; - margin-top: 1vh; - margin-left: 10px; -} - -.reports-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.reports-title:hover { - background-color: var(--color-3); -} - -.reports-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#reports-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#reports-search-input::placeholder { - color: white; -} - -.reports-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.dispatch-item { - height: auto; - padding: auto; - margin-top: 1vh; -} - -.dispatch-item:hover { - background-color: var(--color-7); -} - -.dispatch-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 94%; - height: 100%; -} - -.dispatch-message-profilepic { - width: 2.8vh; - height: 2.8vh; - object-fit: cover; - float: left; - border-radius: 50%; -} - -.dispatch-item-info { - float:left; - font-size: 14px; - font-weight: bold; - padding-left: 0.75vh; - color: var(--color-8); -} - -.dispatch-info-job-lspd { - color: #2554cc; -} - -.dispatch-info-job-bcso { - color: #cc7e25; -} - -.dispatch-info-job-sast { - color: #2589cc; -} - -.dispatch-info-job-sasp { - color: #2589cc; -} - -.dispatch-info-job-doc { - color: #7b25cc; -} - -.dispatch-info-job-sapr { - color: #5acc25; -} - -.dispatch-info-job-pa { - color: #008080; -} - -.dispatch-info-job-ambulance { - color: #cc2525; -} - -.dispatch-info-job-doj { - color: #FFEAB9; -} - -.active-info-job-lspd { - background-color: #2554cc; -} - -.active-info-job-bcso { - background-color: #cc7e25; -} - -.active-info-job-sast { - background-color: #2589cc; -} - -.active-info-job-sasp { - background-color: #2589cc; -} - -.active-info-job-doc { - background-color: #7b25cc; -} - -.active-info-job-sapr { - background-color: #5acc25; -} - -.active-info-job-pa { - background-color: #008080; -} - -.active-info-job-ambulance { - background-color: #cc2525; -} - -.active-info-job-doj { - background-color: #525252; -} - -.active-info-job-unk { - background-color: #6E707C; -} - -.dispatch-item-message { - float:left; - font-size: 14px; - font-weight: lighter; - color: white; - width: 100%; - overflow:wrap; - white-space:normal; - padding-left: 0.80vh; - padding-top: 0.2vh; -} - -.dispatch-item-msg { - padding-left: 2.8vh; - padding-bottom: 0vh; -} - -.dispatch-item-msg:hover { - background-color: var(--color-7); -} - -.dispatch-item-grid { - display:grid; -} - -.dispatch-input { - min-width: 90%; - max-width: 90%; - min-height: 0.1vh; - margin-left: 1.1vh; - margin-bottom: 1vh; - border: none; - padding: 12px 20px; - background-color: var(--color-7); - color: #bebec2; -} - -.dispatch-input:focus { - outline:none!important; -} - -.reports-search-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.reports-search-refresh:hover { - background-color: #aa891c; -} - -.dispatch-comms-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.dispatch-comms-refresh:hover { - background-color: #aa891c; -} - -.reports-search-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.reports-search-title:hover { - background-color: var(--color-3); -} - -.manage-reports-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - max-height: 72.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - overflow: auto; -} - -.manage-reports-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: auto; - margin-left: 10px; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.manage-reports-title-tag { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 84%; - align-items: center; - user-select: none; -} - -.manage-reports-title:hover { - background-color: var(--color-3); -} - - - -.manage-reports-create { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 5px; - padding-bottom: 5px; - align-items: center; - background-color: var(--color-4); - margin: auto; - margin-left: 5px; - margin-top: 10px; - /* margin-right: 0px; */ - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.manage-reports-create:hover { - background-color: var(--color-3); -} - -.manage-reports-input-tag { - font-size: 16px; - font-weight: lighter; - color: white; - width: 95%; - margin: auto; - text-align: left; - margin-top: 10px; - margin-bottom: 0px; -} - -.manage-reports-input-title { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-reports-input-title input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-reports-input-type { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-reports-input-type input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-reports-input-owner { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-reports-input-owner input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-reports-input-individual { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-reports-input-individual input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-reports-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 0px; - margin-top: 10px; - margin-right: 13px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-reports-save:hover { - background-color: #1caa28; -} - -.manage-reports-new { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #8f1b1b; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-reports-new:hover { - background-color: #aa1c1c; -} - -.incidents-remove-normal-tag:hover { - background-color: #aa1c1c; -} - -.incidents-remove-normal-civ:hover { - background-color: #aa1c1c; -} - -.incidents-remove-tag:hover { - background-color: #aa1c1c; -} - -.incidents-remove-officer-tag:hover { - background-color: #aa1c1c; -} - -.manage-reports-editing-title { - background-color: var(--color-3); - color: white; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - margin-left: 10px; - width: 95%; - align-items: center; - user-select: none; - display: block; -} - -.manage-reports-reports-content { - width: 91%; - margin: auto; - margin-top: 15px; - margin-bottom: 15px; - border: none; - outline: none; - height: 100%; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.manage-reports-right-container { - display: flex; - flex-direction: column; - height: 95.7%; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 15px; -} - -.manage-reports-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - max-height: 150px; - overflow: scroll; -} - -.manage-reports-gallery-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - margin-top: 10px; - height: 18vh; - overflow: scroll; -} - -.manage-reports-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.reports-officers-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.reports-officers-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.reports-officers-add-btn:hover { - background-color: var(--color-3); -} - -.reports-officers-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - max-height: 150px; - margin-top: 10px; - overflow: scroll; -} - -.reports-gallery-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.reports-gallery-add-btn:hover { - background-color: var(--color-3); -} - -.reports-gallery-upload-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#reports-gallery-upload-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#reports-gallery-upload-input::placeholder { - color: white; -} - -.reports-img { - width: 10vh; - filter: blur(5px); - object-fit: cover; -} - -.reports-gallery-inner-container { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-reports-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.manage-reports-tags-add-btn:hover { - background-color: var(--color-3); -} - -.reports-civilians-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid rgb(32, 32, 32); - max-height: 150px; - margin-top: 10px; - overflow: scroll; -} - -.reports-civilians-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.reports-civilians-add-btn:hover { - background-color: var(--color-3); -} - -.reports-civilians-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.reports-item { - background-color: var(--color-5); - width: 100%; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - flex-direction: column; -} - -.reports-item:hover { - background-color: var(--color-3); -} - -.reports-top-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; -} - -.reports-item-title { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-top: 5px; - max-width: 25vh; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.reports-report-name { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-top: 5px -} - -.reports-bottom-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; - margin-top: 5px; -} - -.reports-report-id { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-bottom: 5px; -} - -.reports-report-time-ago { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-bottom: 5px; -} - -span.tag-reports-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.tag-reports-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.officer-tag-reports-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.officer-tag-reports-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.civilian-tag-reports-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.civilian-tag-reports-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.dmv-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50%; - margin-top: 10px; - margin-left: 10px; -} - -.dmv-search-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.dmv-search-refresh:hover { - background-color: #aa891c; -} - -.dmv-search-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.dmv-search-title:hover { - background-color: var(--color-3); -} - -.dmv-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#dmv-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#dmv-search-input::placeholder { - color: white; -} - -.dmv-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.vehicle-information-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50%; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; -} - -.vehicle-information-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.vehicle-information-save:hover { - background-color: #1caa28; -} - -.add-charge:hover { - background-color: #1caa28; -} - -.vehicle-information-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 81%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.dmv-item { - background-color: var(--color-5); - width: 100%; - height: 9vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - -} - -.dmv-item:hover { - background-color: var(--color-3); -} - -.dmv-image { - width: 7vh; - height: 7vh; - margin-left: 10px; - margin-top: auto; - margin-bottom: auto; - object-fit: cover; -} - -.dmv-item-title { - font-size: 16px; - font-weight: lighter; - color: white; - padding-top: 2px; -} - -.dmv-tags { - display: flex; - overflow-x: auto; - width: 98%; - margin-top: 10px; - margin-bottom: 5px; -} - -.dmv-tag { - margin: auto; - margin-left: 0px; - margin-right: 6px; - padding: 4px; - padding-left: 7px; - padding-right: 7px; - border-radius: 10px; - color: white; - font-size: 12px; - font-weight: bolder; - background-color: #956E09; -} - -.dmv-bottom-info { - display: flex; - margin: auto; - width: 100%; -} - -.dmv-id { - color: white; - font-size: 13px; -} - -.vehicle-info-stuff { - display: flex; - flex-direction: row; - width: 95%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; -} - -.vehicle-info-image { - width: 444px; - height: 269px; - object-fit: cover; -} - -.vehicle-info-inner-container { - display: flex; - flex-direction: column; - width: 55%; -} - -.vehicle-info-plate { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-plate-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.vehicle-info-owner { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-owner-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.vehicle-info-class { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-class-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.vehicle-info-model { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-model-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.vehicle-info-imageurl { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-imageurl-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.vehicle-info-icon { - color: white; - font-size: 16px; - margin-left: 10px -} - -.vehicle-info-line { - background-color: var(--color-3); - height: 2px; - margin-left: 10px; - margin-bottom: 10px; -} - -.vehicle-info-tags-container { - display: flex; - flex-direction: column; - border: 2px solid rgb(32, 32, 32); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - height: fit-content; - align-items: center; - user-select: none; -} - -.vehicle-info-tags-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.vehicle-info-tags-add-btn:hover { - background-color: var(--color-3); -} - -.vehicle-info-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; -} - -.vehicle-info-tags-holder { - overflow: auto; - margin: auto; - margin-top: 7px; - margin-bottom: 7px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.vehicle-info-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.vehicle-info-content { - width: 93%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - border: none; - outline: none; - min-height: 26.9vh; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.vehicle-tags { - display: flex; - overflow-x: auto; - width: 98%; - margin-top: 5px; - margin-bottom: 5px; -} - -.vehicle-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: white; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.stafflogs-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 100%; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; - overflow: auto; -} - -.stafflogs-container > p { - color: white; - font-size: 1.3vh; - padding-left: 1vh; -} - -/* Vehicle Colors :( so long lol */ - -.black-color { - background-color: #0e0e0e; - color: white; -} - -.darksilver-color { - background-color: #333333; - color: white; -} - -.silver-color { - background-color: #333333; - color: white; -} - -.bluesilver-color { background-color: #c4d4e0; } - -.matteblack-color { - background-color: #141414; - color: white; -} - -.gray-color { - background-color: #808080; - color: white; -} - -.lightgray-color { background-color: #D3D3D3; } -.utilgunmetal-color { background-color: #39434d; } -.red-color { background-color: #c00e1a; } -.torinored-color { background-color: #da1918; } -.formulared-color { background-color: #b6111b; } -.blazered-color { background-color: #a51e23; } -.gracefulred-color { background-color: #7b1a22; } -.garnetred-color { background-color: #8e1b1f; } -.desertred-color { background-color: #6f1818; } -.cabernetred-color { background-color: #49111d; } -.candyred-color { background-color: #b60f25; } -.orange-color { background-color: #f78616; } -.gold-color { background-color: #c2944f; } -.mattedarkred-color { background-color: #732021; } -.matteyellow-color { background-color: #ffc91f; color: black } -.brightred-color { background-color: #de0f18; } -.darkgreen-color { background-color: #132428; } -.racingreen-color { background-color: #122e2b; } -.seagreen-color { background-color: #12383c; } -.olivegreen-color { background-color: #31423f; } -.green-color { background-color: #155c2d; } -.gasolinebluegreen-color { background-color: #1b6770; } -.mattelimegreen-color { background-color: #66b81f; } -.seawash-color { background-color: #65867f; } -.midnightblue-color { background-color: #222e46; } -.darkblue-color { background-color: #233155; } -.saxonyblue-color { background-color: #304c7e; } -.blue-color { background-color: #345df3; } -.diamondblue-color { background-color: #d6e7f1; } -.brightblue-color { background-color: #0b9cf1; } -.purpleblue-color { background-color: #2f2d52; } -.ultrablue-color { background-color: #2354a1; } -.lightningblue-color { background-color: #2446a8; } -.mattedarkblue-color { background-color: #1f2852; } -.matteblue-color { background-color: #253aa7; } -.yellow-color { background-color: #fbe212; color: black } -.bronze-color { background-color: #916532; } -.lime-color { background-color: #98d223; } -.champagne-color { background-color: #9b8c78; } -.beige-color { background-color: #F5F5DC; } -.darkivory-color { background-color: #473f2b; } -.brown-color { background-color: #3a2a1b; } -.lightbrown-color { background-color: #b5a079; } -.beechwood-color { background-color: #a4965f; } -.chocoorange-color { background-color: #752b19; } -.cream-color { background-color: #f7edd5; } -.white-color { background-color: #f0f0f0; color: black } -.steel-color { background-color: #6a747c; } -.blacksteel-color { background-color: #354158; } -.aluminium-color { background-color: #9ba0a8; } -.chrome-color { background-color: #5870a1; } -.wornwhite-color { background-color: #eae6de; color: black } -.offwhite-color { background-color: #dfddd0; color: black } -.lightorange-color { background-color: #f9a458; } -.pink-color { background-color: #f21f99; } -.blackblue-color { background-color: #0a0c17; } -.blackpurple-color { background-color: #0c0d18; } -.blackred-color { background-color: #0e0d14; } -.darkpurple-color { background-color: #621276; } -.olivedrab-color { background-color: #696748; } -.tan-color { background-color: #c3b492; } - -.reports-remove-image:hover { - background-color: #950909; -} - -.bolo-remove-image:hover { - background-color: #950909; -} - -.bolo-delete:hover { - background-color: #950909; -} - -.remove-bulletin:hover { - background-color: #950909; -} - -.search-vehicle:hover { - background-color: #956E09; -} - -.mark-code-5:hover { - background-color: #0B9509; -} - -.remove-code-5:hover { - background-color: #950909; -} - -.mark-stolen:hover { - background-color: #0B9509; -} - -.remove-stolen:hover { - background-color: #950909; -} - -.toggle-duty:hover { - background-color: #956E09; -} - -.set-callsign:hover { - background-color: #0B9509; -} - -.set-radio:hover { - background-color: #09956b; -} - -.incidents-ghost-holder { - overflow: auto; - max-height: 80vh; - margin-top: 10px; - margin-bottom: 10px; -} - -.incidents-charges-table { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin: auto; - margin-top: -25vh; -} - -.incidents-charges-table-container { - background-color: var(--color-5); - width: 155vh; - height: 85vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9998; - user-select: none; -} - -.incidents-charges-title-container { - width: 95%; - height: 11vh; - background-color: var(--color-4); - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - display: flex; - flex-direction: column; - border: 2px solid var(--color-4); -} - -.incidents-charges-title { - color: white; - margin: auto; - text-align: center; - align-items: center; - font-size: 22px; - font-weight: bolder; - margin-top: 1vh; -} - -.incidents-charges-title span { - color: #B4A684; - font-size: 19px; -} - -.incidents-charges-title-description { - color: white; - margin: auto; - background-color: var(--color-5); - text-align: left; - font-size: 17px; - padding: .5vh; - width: 97%; - margin-bottom: 1.5vh; -} - -.manage-incidents-editing-title { - background-color: var(--color-3); - color: white; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - margin-left: 10px; - width: 95%; - align-items: center; - user-select: none; -} - - -.current-charges-container { - width: 95%; - border: 2px solid var(--color-4); - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - display: flex; -} - -.current-charges-inner-container { - background-color: var(--color-4); - width: 35vh; - height: fit-content; - margin: auto; - margin-left: 1vh; - margin-right: 0vh; - text-align: center; - display: flex; -} - -.current-charges-title { - color: white; - font-size: 19px; - font-weight: bolder; - padding: .25vh; - padding-left: 6vh; - padding-right: 6vh; - margin: auto; -} - -#current-charges-holder { - display: flex; - margin: auto; - width: 110vh; - margin-left: 1vh; - margin-right: 1vh; - overflow: hidden; -} - -.current-charges-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - padding: 5px; - padding-left: 7px; - padding-right: 7px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - background-color: white; - color: black; - white-space: nowrap; -} - -.offenses-title-container { - width: fit-content; - height: fit-content; - background-color: var(--color-4); - margin-left: 3.75vh; - margin-top: 1.5vh; - margin-bottom: 0vh; - display: flex; - border: 2px solid var(--color-4); -} - -.offenses-title { - color: white; - padding: .7vh; - padding-right: 3vh; - font-weight: bolder; - font-size: 1.4vh; -} - -.offenses-prepend-holder { - width: 95%; - background-color: var(--color-4); - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - border: 2px solid var(--color-4); - display: grid; - grid-template-columns: auto auto auto auto; - grid-template-rows: auto auto auto auto; - row-gap: 0vh; - overflow: auto; -} - -.offense-item { - background-color: #0B9509; - border: 1.5px solid black; - height: 5.0vh; - margin: .5vh; - flex-direction: column; - color: white; - display: inline-block; - overflow: auto; - transition: all 0.15s ease-in-out; -} - -.offense-item:hover { - transform: scale(1.02); - transition: all 0.15s ease-in-out; -} - -.offense-item-offense { - margin: auto; - margin-left: .5vh; - margin-top: .5vh; - color: white; - font-size: 1.2vh; - font-weight: bold; -} - -.offfense-item-name { - margin: auto; - margin-right: .5vh; - margin-top: .5vh; - color: white; - font-size: 1.2vh; - font-weight: bold; -} - -.offense-item-id { - margin: auto; - margin-left: .5vh; - margin-bottom: .5vh; - color: white; - font-size: 1.2vh; - font-weight: bold; -} - -.offfense-item-months { - margin: auto; - margin-right: .5vh; - margin-bottom: .5vh; - color: white; - font-size: 1.2vh; - font-weight: bold; -} - -.offenses-main-container { - overflow: auto; - margin: auto; - margin-top: 1vh; - margin-bottom: 1vh; - width: 100%; -} - -.callsign-container { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin-top: 40.5vh; -} - -.radio-container { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin-top: 40.5vh; -} - -.radio-inner-container { - background-color: var(--color-5); - width: 30vh; - height: 17.5vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9998; - border: .45vh solid white; -} - -.radio-title { - color: white; - font-size: 2vh; - font-weight: bold; - margin: auto; - margin-top: 2vh; - margin-bottom: 0vh; -} - -.radio-input { - width: 20vh; - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - background-color: var(--color-6); - border: none; - outline: none; - font-size: 2vh; - color: white; - text-align: center; - padding: 1vh; -} - -.radio-buttons { - width: 20vh; - margin: auto; - margin-top: 1.5vh; - display: flex; - flex-direction: row; -} - -.radio-cancel { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #D77A0D; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.radio-cancel:hover { - background-color: #f18f1e; -} - -.radio-submit { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #0B9509; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.radio-submit:hover { - background-color: #15ac12; -} - -.callsign-inner-container { - background-color: var(--color-5); - width: 30vh; - height: 17.5vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9998; - border: .45vh solid white; -} - -.callsign-title { - color: white; - font-size: 2vh; - font-weight: bold; - margin: auto; - margin-top: 2vh; - margin-bottom: 0vh; -} - -.callsign-input { - width: 20vh; - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - background-color: var(--color-6); - border: none; - outline: none; - font-size: 2vh; - color: white; - text-align: center; - padding: 1vh; -} - -.callsign-buttons { - width: 20vh; - margin: auto; - margin-top: 1.5vh; - display: flex; - flex-direction: row; -} - -.callsign-cancel { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #D77A0D; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.callsign-cancel:hover { - background-color: #f18f1e; -} - -.callsign-submit { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #0B9509; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.callsign-submit:hover { - background-color: #15ac12; -} - - -/* Keep At Bottom */ - -.red-tag { - background-color: #950909; -} - -.orange-tag { - background-color: #956E09; -} - -.green-tag { - background-color: #0B9509; -} - -.white-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 6px; - padding: 7px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - background-color: white; - color: black; -} - -.orange-penal-code { - background-color: #D77A0D; -} - -.green-penal-code { - background-color: #0B9509; -} - -.red-penal-code { - background-color: #950909; -} - -.header-pin { - padding-right: 5px; -} - -.priority-1 { - background-color: #bb0404; -} - -.priority-2 { - background-color: #ce7808; -} - -.call-bottom-info > span { - padding-right: 0.5vh; -} - -.call-attach:hover { - background-color: #1caa28; -} - -.Set-Waypoint:hover { - background-color: #f18f1e; -} - -.call-detach:hover { - background-color: #950909; -} - -.remove-blip:hover { - background-color: #950909; -} - -.dispatch-attached-units { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} - -.active-unit-item:hover { - background-color: var(--color-3); -} - -.active-calls-item:hover { - background-color: var(--color-3); -} - -.dispatch-attached-units-container { - background-color: var(--color-1); - width: 92vh; - height: 46vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 1; - border: 2px solid #FFFFFF; - display: none; - margin-top: 32.5vh; -} - -.dispatch-attached-units-title { - background-color: var(--color-4); - color: white; - font-size: 20px; - font-weight: bolder; - text-align: center; - padding-top: 15px; - padding-bottom: 15px; - width: 95%; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - user-select: none; -} - -.dispatch-attached-units-holder { - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - overflow: auto; - height: 37.8vh; - display: flex; - flex-direction: column; - width: 95%; -} - -.dispatch-attached-unit-item { - padding: 10px; - height: 3vh; - background-color: var(--color-5); - display: flex; - align-items: center; - margin-bottom: 5px; -} - -.attached-units:hover { - background-color: rgb(156, 156, 156); -} - -.Set-Dispatch-Waypoint:hover { - background-color: #f18f1e; -} - -.call-dispatch-detach:hover { - background-color: #950909; -} - -.incidents-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.incidents-title:hover { - background-color: var(--color-3); -} - -.incidents-search-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.incidents-search-refresh:hover { - background-color: #aa891c; -} - -.respond-calls { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin-top: 32.5vh; -} - -.respond-calls-container { - background-color: var(--color-5); - width: 70vh; - min-height: 30vh; - max-height: 40vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9998; - overflow: auto; - -} - -.respond-calls-title { - background-color: var(--color-4); - color: white; - font-size: 20px; - font-weight: bolder; - text-align: center; - padding-top: 15px; - padding-bottom: 15px; - width: 95%; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - user-select: none; -} - -.respond-calls-input { - width: 92.5%; - margin-top: 10px; - margin-bottom: 10px; - outline: solid 3px #1B3047; - margin-left: 27px; - min-height: 21.5vh; - max-height: 21.5vh; - border: none; - padding: 10px 10px; - background-color: transparent; - color: #dadada; - resize: none; - font-size: 16px; -} - -.respond-calls-input:focus { - outline: solid 3px #1B3047; -} - -.respond-calls-responses { - width: 95%; - margin-left: 1.7vh -} - -.respond-calls-response { - color: #dadada; - margin-top: 0.5vh; - padding: 0.5vh; - background-color: rgba(32, 32, 32, 0.5); - color: #FFFFFF; -} - -.offenses-search-area { - width: 95%; - border: 2px solid var(--color-4); - height: 3vh; - margin: 1.5vh auto 0vh; - display: flex; -} - -.offenses-search { - background: transparent; - border: none; - outline: none; - font-size: 1.2vh; - color: rgb(255, 255, 255); - font-family: Roboto, sans-serif; - font-style: normal; - font-weight: normal; - margin-left: 1vh; - padding-top: 10px; - padding-bottom: 10px; -} - -.impound-form { - display: flex; - flex-direction: column; - - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - - width: 750px; - height: 375px; - background: var(--color-5); - border: 1px solid white; -} - -.impound-form > form { - position: absolute; - left: 10%; - width: 73%; - height: 100%; -} - -.impound-form > form > input { - border: none; - outline: none; - font-size: 24px; - color: white; - - background: transparent; - border: 1px solid rgb(168, 168, 168); - - width: 100%; - height: 13.5%; - - margin-top: 20px; - padding-left: 10%; -} - -.impound-form > form > i { - position: absolute; - color: white; - font-size: 24px; - margin-top: 37.5px; - margin-left: 12.6px; -} - -.impound-buttons { - position: absolute; - margin: auto; - display: flex; - flex-direction: row; - bottom: 6%; - left: 10%; -} - -.impound-cancel { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #D77A0D; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.impound-cancel:hover { - background-color: #f18f1e; -} - -.impound-submit { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #0B9509; - border-radius: 1vh; - margin: auto; - user-select: none; - margin-left: 10px; -} - -.impound-submit:hover { - background-color: #15ac12; -} - -.status-impound:hover { - background-color: #ac8312; -} - -.remove-impound:hover { - background-color: #ac1212; -} - -.impound-vehicle:hover { - background-color: #12ac1f; -} - -.impound-fee { - color: white; -} - -.dispatch-reply:hover { - background-color: var(--color-1); -} -.display_hidden{ - display: none; -} - -.cams-page-container { - background-color: rgb(40, 40, 40); - border-radius: 15px; - position: absolute; - width: 80.5%; - height: 80.5%; - border: 10px solid rgb(22, 22, 22); - left: 10.0%; - top: 10.0%; - display: none; - overflow: auto -} - -.cams-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 100%; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; - overflow: auto; -} - -.cams-item { - display: grid; - grid-template-columns: 1fr 1fr 1fr 1fr 1fr; - grid-auto-flow: row; - gap: 15px 15px; - overflow: auto; - margin-bottom: 10px; - - -} - -.cams-items { - background-color: var(--color-5); - height: auto; - padding: 10px; - text-align: center; - margin: 10px; - color: white; - font-size: 20px; - color: white; - overflow: visible; - -} - -.cams-image { - height:125px; - width: auto; - margin: 10px; - -} - -.cams-items:hover { - background-color: var(--color-3); -} - -.weapons-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50%; - margin-top: 10px; - margin-left: 10px; -} - -.weapons-search-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.weapons-search-title:hover { - background-color: var(--color-3); -} - -.weapons-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#weapons-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#weapons-search-input::placeholder { - color: white; -} - -.weapons-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.weapon-information-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 50%; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; -} - -.weapon-information-new { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #8f1b1b; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.weapon-information-new:hover { - background-color: #aa1c1c; -} - -.weapon-information-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.weapon-information-save:hover { - background-color: #1caa28; -} - -.weapon-information-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 81%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.weapon-info-stuff { - display: flex; - flex-direction: row; - width: 95%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; -} - -.weapon-info-image { - width: 444px; - height: 269px; - object-fit: cover; -} - -.weapon-info-imageurl { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.weapon-info-imageurl-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.weapon-info-inner-container { - display: flex; - flex-direction: column; - width: 55%; -} - -.weapon-info-serial { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.weapon-info-serial-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.weapon-info-icon { - color: white; - font-size: 16px; - margin-left: 10px -} - -.weapon-info-line { - background-color: var(--color-3); - height: 2px; - margin-left: 10px; - margin-bottom: 10px; -} - -.weapon-info-model { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.weapon-info-model-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.weapon-info-owner { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.weapon-info-owner-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.weapon-info-class { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.weapon-info-class-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 80%; -} - -.weapon-info-imageurl { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.weapon-info-imageurl-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.weapon-info-content { - width: 93%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - border: none; - outline: none; - min-height: 30.9vh; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.weapons-item-title { - font-size: 16px; - font-weight: lighter; - color: white; - padding-top: 2px; -} - -.weapons-image { - width: 7vh; - height: 7vh; - margin-left: 10px; - margin-top: auto; - margin-bottom: auto; - object-fit: cover; -} - -.weapons-item-title { - font-size: 16px; - font-weight: lighter; - color: white; - padding-top: 2px; -} - -.weapons-bottom-info { - display: flex; - margin: auto; - width: 100%; -} - -.weapons-id { - color: white; - font-size: 13px; -} - -.weapons-item { - background-color: var(--color-5); - width: 100%; - height: 9vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - -} - -.weapons-item:hover { - background-color: var(--color-3); -} - -.weapons-image { - width: 7vh; - height: 7vh; - margin-left: 10px; - margin-top: auto; - margin-bottom: auto; - object-fit: cover; -} - -.weapons-item-title { - font-size: 16px; - font-weight: lighter; - color: white; - padding-top: 2px; -} - -.vehicle-info-points { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; - margin-top: 5px; -} - -input[type="range"].vehicle-info-points-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 80%; -} - -input[type="range"].vehicle-info-points-input::-moz-range-thumb { - box-shadow: none; - border: 2px solid grey; - height: 16px; - width: 16px; - border-radius: 16px; - background: white; -} - -input[type="range"].vehicle-info-points-input::-moz-range-track { - width: 100%; - height: 2px; - box-shadow: none; - background: var(--color-8); - border-radius: 0px; - border: 0px; -} - -.manage-profile-apartment { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-apartment-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -/* Charges Hover */ - -.ccontextmenu { - position: absolute; - width: fit-content; - padding: 2px; - margin: 0; - border: 1px solid var(--color-3); - background: var(--color-5); - z-index: 100; - border-radius: 3px; - box-shadow: 1px 1px 4px rgba(0,0,0,.2); - opacity: 0; - transform: translate(0, 15px) scale(.95); - transition: transform 0.1s ease-out, opacity 0.1s ease-out; - pointer-events: none; -} - -.ccontextmenu-item { - display: block; - position: relative; - margin: 0; - padding: 0; - /* white-space: nowrap; */ - max-width: 34ch; - word-wrap:break-word; -} - -.ccontextmenu-text { - display: block; - color: white; - font-size: 13px; - cursor: pointer; - border: 1px solid transparent; - /* white-space: nowrap; */ - padding: 6px 8px; - border-radius: 3px; - max-width: 34ch; - word-wrap:break-word; -} - -.ccontextmenu-text { - outline: 0 none; - text-decoration: none; -} - -.ccontextmenu-text .fa { - position: absolute; - left: 8px; - top: 50%; - transform: translateY(-50%); -} - -.ccontextmenu-item-disabled { - opacity: .5; - pointer-events: none; -} - -.ccontextmenu-item-disabled .ccontextmenu-text { - cursor: default; -} - -.ccontextmenu-item-submenu::after { - content: ""; - position: absolute; - right: 6px; - top: 50%; - transform: translateY(-50%); - border: 5px solid transparent; - border-left-color: #808080; -} - -.ccontextmenu-item-submenu:hover::after { - border-left-color: #fff; -} - -.ccontextmenu-show, -.ccontextmenu-item:hover > .ccontextmenu { - opacity: 1; - transform: translate(0, 0) scale(1); - pointer-events: auto; - z-index: 9999; -} - - - - -.calls-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 30%; - margin-top: 10px; - margin-left: 10px; -} - -.calls-search-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.calls-search-title:hover { - background-color: var(--color-3); -} - -.map-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 72.7vh; - width: 70%; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; -} - -.map-new { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #8f1b1b; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.map-new:hover { - background-color: #aa1c1c; -} - -.map-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.map-save:hover { - background-color: #1caa28; -} - - -.map-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 98%; - align-items: center; - user-select: none; -} - -.map-item { - border: 2px solid rgb(32, 32, 32); - position: absolute; - - width: 66%; - height: 88%; - - left: 65%; - top: 52.5%; - - margin-bottom: 15px; - - -} - -.smallmap-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.smallmap-container { - background-color: var(--color-1); - border: 2px solid rgb(32, 32, 32); - display: flex; - flex-direction: column; - height: 37.6vh; - width: 50vh; - margin-top: 3px; - margin-left: 10px; -} - -.leaflet-marker-pane { - z-index: 600; -} - -.leaflet-tooltip-pane { - z-index: 650; -} - -.leaflet-tooltip-right { - margin-left: 6px; +@import url('https://fonts.googleapis.com/css?family=Montserrat'); + +:root { + --color-1: #1E3955; + --color-2: #213F5F; + --color-3: #2C537B; + --color-4: #23405E; + --color-5: #152638; + --color-6: #121f2c; + --color-7: rgb(28, 54, 82); + --color-8: #2554cc; + --color-9: #6E707C; + --color-10: #8f741b; +} + +body { + font-family: 'Montserrat', sans-serif; + overflow: hidden; + display: none; +} + +textarea { + font-family: 'Montserrat', sans-serif; +} + +::-webkit-scrollbar { + width: 0px; +} + +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +.dashboard-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.badge-logo { + margin-left: 1vh +} + +.profile-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.incidents-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.bolos-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.reports-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.penalcode-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.dmv-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.weapons-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.stafflogs-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; + overflow: auto +} + +.container-load { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.header { + height: 7vh; + background-color: var(--color-1); + border: 5px solid #393B39; + border-top-right-radius: 50px; + border-bottom-right-radius: 50px; + width: 96.5%; + position: absolute; + top: 5.5vh; + display: flex; + align-items: center; + user-select: none; +} + +.header-left { + display: flex; + flex-direction: column; + text-align: left; + margin-left: 10px; + margin-right: 0px; +} + +.header-middle { + background-color: var(--color-2); + border-radius: 15px; + width: fit-content; + height: fit-content; + padding: 10px; + padding-left: 20px; + padding-right: 20px; + display: flex; + flex-direction: column; + text-align: center; + color: white; + margin: auto; + font-size: 20px; +} + +.header-right { + display: flex; + flex-direction: column; + text-align: right; + margin: auto; + margin-right: 35px; + margin-left: 0px; +} + +.main-container { + border-top: 5px solid var(--color-3); + width: 100%; + height: 79.5%; + position: absolute; + display: flex; + bottom: 0; +} + +.nav-menu { + background-color: var(--color-1); + border-right: 5px solid var(--color-3); + min-width: 22.5vh; + height: 100%; + display: flex; + flex-direction: column; + user-select: none; + border-bottom-left-radius: 15px; +} + +.nav-item { + background-color: var(--color-4); + margin-top: 10px; + padding: 10px; + color: white; + font-size: 18px; + font-weight: bolder; +} + +.nav-item:hover { + background-color: var(--color-3); +} + +.active-nav { + background-color: var(--color-3); +} + +.warrants-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +.warrants-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.fa-search { + font-size: 15px; + font-weight: normal; +} + +.warrants-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 55vh; +} + +.warrants-item { + background-color: var(--color-5); + width: 100%; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; +} + +.warrants-item:hover { + background-color: var(--color-3); +} + +.warrant-image { + width: 9vh; + height: 9vh; + margin-left: 5px; + margin-top: auto; + margin-bottom: auto; +} + +.warrant-title { + font-size: 16px; + font-weight: lighter; + color: white; + margin-top: 5px; +} + +.warrant-item-info { + color: #cccccc; + font-size: 12px; +} + +.warrant-bottom-info { + display: flex; + margin-top: 1vh; + margin-bottom: 0.75vh; + width: 100%; +} + +.warrant-id { + color: white; + font-size: 12px; +} + +.warrant-expiry-date { + color: white; + font-size: 12px; + margin: auto; + margin-right: 10px; +} + +.quotes-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + width: 50vh; + height: 75px; + margin-top: 10px; + margin-left: 10px; + display: flex; + align-items: center; + user-select: none; +} + +.quote-title { + font-size: 14px; + background-color: var(--color-4); + padding: 5px; + margin: 10px 0px 10px 10px; + text-align: center; + color: white; + font-weight: bolder; + width: 85px; + /* height: 30px; */ + text-shadow: black 1px 1px; +} + +.quote { + margin-right: 10px; + margin-left: 10px; + /* margin-bottom: 25px; */ + width: 100%; + background-color: var(--color-5); + height: 30px; + padding: 10px; + text-align: center; + display: flex; + font-style: italic; +} + +.quote-span { + margin: auto; + color: white; + font-size: 16px; +} + +.bulletin-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 100%; + width: 50vh; + margin-top: 10px; + margin-bottom: 8px; + margin-left: 10px; + user-select: none; + overflow: hidden; +} + +.bulletin-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 83.5%; + align-items: center; + user-select: none; +} + +.bulletin-items-continer { + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + overflow: auto; + height: 100%; + display: flex; + flex-direction: column; +} + +.bulletin-item { + background-color: var(--color-5); + width: 45vh; + /* min-height: 7.7vh; */ + /* height: 7.7vh; */ + padding: 10px; + display: flex; + flex-direction: column; + margin-bottom: 10px; +} + +.bulletin-item:hover { + background-color: var(--color-3); +} + +.bulletin-item-title { + color: white; + margin-left: 5px; + font-size: 20px; + text-align: left; +} + +span.bulletin-item-title { + outline: none; + border: none; +} + +span.bulletin-item-title[contenteditable]:empty::before { + content: 'Enter Title'; +} + +.bulletin-item-info { + color: #cccccc; + font-size: 15px; + margin-left: 5px; + margin-top: 10px; + text-align: left; + padding-bottom: 0.8vh; + overflow-wrap: break-word; +} + +span.bulletin-item-info { + outline: none; + border: none; +} + +span.bulletin-item-info[contenteditable]:empty::before { + content: 'Enter Bulletin Information'; +} + +.bulletin-bottom-info { + display: flex; + margin-left: 5px; + margin-bottom: 0px; + color: white; + font-size: 12px; + height: 100%; +} + +.bulletin-date { + margin: auto; + margin-right: 5px; + margin-bottom: 0px; +} + +.bulletin-id { + margin: auto; + margin-left: 0px; + margin-bottom: 0px; +} + +.dispatch-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 15px; +} + +.dispatch-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.active-unit-title { + background-color: var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 2px; + margin-left: 10px; + margin-left: 13px; + width: 57.5%; + align-items: center; + user-select: none; +} + +.active-unit-count { + background-color: var(--color-3); + color: white; + font-weight: bolder; + font-size: 14px; + padding-top: 6px; + padding-bottom: 6px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 3px; + margin-left: 3px; + width: 8%; + align-items: center; + user-select: none; + border-radius: 5px; +} + +.calls-title { + background-color: var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 2px; + margin-left: 10px; + margin-left: 13px; + width: 95%; + align-items: center; + user-select: none; +} + +#police-count { + background-color: #093095; +} + +#ems-count { + background-color: #950909; +} + +#doj-count { + background-color: #525252; +} + +#doc-count { + background-color: #7b25cc; +} + +#pa-count { + background-color: #008080; +} + +.active-unit-list { + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + overflow: auto; + height: 35vh; + display: flex; + flex-direction: column; + width: 95%; +} + +.active-unit-item { + padding-top: 7.5px; + padding-bottom: 7.5px; + padding-right: 10px; + padding-left: 10px; + /* height: 3vh; */ + background-color: var(--color-5); + display: flex; + align-items: center; + margin-bottom: 5px; +} + +#draggedItem { + position: absolute; + z-index: 80; + -webkit-transition: opacity 0.2s ease; + -moz-transition: opacity 0.2s ease; + -ms-transition: opacity 0.2s ease; + transition: opacity 0.2s ease; + opacity: 0; + pointer-events: none; + + padding: 10px; + height: 3vh; + background-color: var(--color-5); + display: flex; + align-items: center; + margin-bottom: 5px; + width: 45vh; +} + +.unit-status { + width: fit-content; + padding: 5px; + padding-left: 15px; + padding-right: 15px; + color: white; + font-size: 12px; + font-weight: bolder; + margin: auto; + margin-left: 5px; + margin-right: 0px; + background-color: #0B9509; + border-radius: 10px; +} + +.green-status { + background-color: #099517; +} + +.yellow-status { + background-color: #958F09; +} + +.unit-job { + width: fit-content; + padding: 5px; + padding-left: 15px; + padding-right: 15px; + color: white; + font-size: 12px; + font-weight: bolder; + margin: auto; + margin-left: 5px; + margin-right: 0px; + background-color: #093095; + border-radius: 10px; +} + +.unit-police { + background-color: #093095; +} + +.unit-ems { + background-color: #950909; +} + +.unit-doc { + background-color: #7b25cc; +} + +.unit-pa { + background-color: #008080; +} + +.unit-name { + margin: auto; + margin-left: 10px; + margin-right: 0px; + font-size: 12px; + font-weight: bolder; + color: white; +} + +.unit-radio { + margin: auto; + margin-right: 5px; + font-size: 12px; + font-weight: bolder; + color: white; + background-color: var(--color-3); + padding: 5px; + padding-left: 12.5px; + padding-right: 12.5px; + border-radius: 5px; +} + +.active-calls-list { + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + overflow: auto; + height: 100%; + display: flex; + flex-direction: column; + width: 95%; +} + +.active-calls-item { + height: fit-content; + background-color: var(--color-5); + display: flex; + align-items: center; + margin-bottom: 5px; +} + +.active-call-inner-container { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} + +.red-call { + background-color: #381515; +} + +.call-item-top { + height: 50%; + width: 100%; + display: flex; + align-items: center; + margin: auto; + margin-top: .5vh; +} + +.call-number { + background-color: #950909; + color: white; + font-size: 15px; + font-weight: bolder; + padding: 2.5px; + padding-left: 10px; + padding-right: 10px; + border-radius: 10px; + width: fit-content; + margin: auto; + margin-left: .75vh; + margin-right: 0; +} + +.call-code { + background-color: #097C95; + color: white; + font-size: 15px; + font-weight: bolder; + padding: 2.5px; + padding-left: 10px; + padding-right: 10px; + border-radius: 10px; + width: fit-content; + margin: auto; + margin-left: 5px; + margin-right: 0; +} + +.call-title { + color: white; + font-size: 20px; + font-weight: bolder; + padding: 2.5px; + padding-left: 0px; + padding-right: 0px; + border-radius: 10px; + width: fit-content; + margin: auto; + margin-left: 5px; + margin-right: 0; +} + +.call-radio { + margin: auto; + margin-left: auto; + margin-right: .5vh; + font-size: 15px; + font-weight: bolder; + color: white; + background-color: var(--color-3); + padding: 5px; + padding-left: 12.5px; + padding-right: 12.5px; + border-radius: 5px; +} + +.call-item-bottom { + height: fit-content; + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + margin: auto; + margin-top: 0vh; + margin-left: .75vh; + padding-bottom: .75vh; +} + +.call-bottom-info { + color: white; + font-size: 15px; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + margin-left: 0.3vh; + overflow:wrap; + white-space:normal; +} + +.dispatch-line { + background-color: rgba(128, 128, 128, 0.1); + height: 0.05vh; + width: 100%; + margin-top: 0.1vh; + margin-bottom: 0.1vh +} + +.call-bottom-info > .far { + margin-right: .1vh; +} + +.call-bottom-information { + margin-top: 0.5vh; +} + +.call-victim { + color: white; + font-size: 15px; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + margin-left: 0px; +} + +a { + text-decoration: none; +} + +.profile-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + + + +.profile-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.profile-title:hover { + background-color: var(--color-3); +} + +.profile-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#profile-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#profile-search-input::placeholder { + color: white; +} + +.profile-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.profile-item { + background-color: var(--color-5); + width: 100%; + height: 9vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + +} + +.profile-item:hover { + background-color: var(--color-3); +} + +.profile-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.profile-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.profile-tags { + display: flex; + overflow-x: auto; + width: 100%; + margin-top: 10px; + margin-bottom: 5px; +} + +.profile-tag { + margin: auto; + margin-left: 0px; + margin-right: 6px; + padding: 4px; + padding-left: 7px; + padding-right: 7px; + border-radius: 10px; + color: white; + font-size: 12px; + font-weight: bolder; + background-color: #956E09; +} + +.profile-bottom-info { + display: flex; + margin: auto; + width: 100%; +} + +.profile-id { + color: white; + font-size: 13px; +} + +.manage-profile-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +.manage-profile-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-profile-editing-title { + background-color: var(--color-3); + color: white; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 80%; + align-items: center; + user-select: none; + display: block; +} + +.manage-profile-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 10px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-profile-save:hover { + background-color: #1caa28; +} + +.manage-profile-info-container { + display: flex; + flex-direction: row; + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; +} + +.manage-profile-pic { + width: 45%; + object-fit: cover; +} + +.manage-profile-info-inner-container { + display: flex; + flex-direction: column; + width: 55%; +} + +.manage-profile-citizenid { + color: white; + margin-left: 10px; + font-size: 14px; + user-select: none; +} + +.manage-profile-citizenid-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-cid-pic { + color: white; + font-size: 16px; + margin-left: 10px +} + +.line { + background-color: var(--color-3); + height: 2px; + margin-left: 10px; + margin-bottom: 10px; +} + +.manage-profile-name { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-name-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-profile-dob { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-dob-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-profile-job { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-job-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-profile-url { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-url-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 21.75vh; +} + +.manage-profile-info { + width: 92.5%; + margin: auto; + margin-top: 10px; + margin-bottom: 15px; + border: none; + outline: none; + height: 100%; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.manage-profile-fingerprint { + width: 92.5%; + margin: auto; + margin-top: 10px; + margin-bottom: 15px; + border: none; + outline: none; + height: 8%; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; + line-height: 1 +} + +.manage-profile-right-container { + display: flex; + flex-direction: column; + height: 95.7%; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 15px; +} + +.manage-profile-licenses-container { + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + height: 15%; +} + +.license-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.licenses-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + user-select: none; +} + +.license-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: rgb(255, 255, 255); + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; +} + +.manage-profile-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + min-height: 100px; + max-height: 200px; + overflow: scroll; +} + +.tags-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 84%; + align-items: center; + user-select: none; +} + +.tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.tags-add-btn:hover { + background-color: var(--color-3); +} + +.tags-holder { + overflow: auto; + margin: auto; + margin-top: 5px; + width: 95%; + user-select: none; +} + +.tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +span.tag-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.tag-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.manage-profile-vehs-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + max-height: 150px; + overflow: scroll; +} + +.vehs-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.vehs-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + user-select: none; +} + +.veh-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; +} + +.manage-profile-houses-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + max-height: 150px; + overflow: scroll; +} + +.houses-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.houses-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + user-select: none; +} + +.houses-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: bolder; + background-color: white; + user-select: none; +} + +.manage-profile-gallery-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + height: 18vh; + overflow: scroll; +} + +.gallery-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 84%; + align-items: center; + user-select: none; +} + +.gallery-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.gallery-add-btn:hover { + background-color: var(--color-3); +} + +.gallery-inner-container { + overflow: auto; + white-space: nowrap; + margin: auto; + margin-top: 10px; + width: 95%; + user-select: none; +} + +.gallery-img { + width: 10vh; + filter: blur(5px); + object-fit: cover; +} + +.manage-convictions-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + max-height: 200px; + overflow: scroll; +} + +.convictions-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + +} + +.convictions-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + user-select: none; +} + +.loader { + position: absolute; + left: 50%; + top: 50%; + z-index: 1; + width: 120px; + height: 120px; + border: 12px solid var(--color-1); + border-radius: 50%; + border-top: 12px solid var(--color-3); + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; +} + +.profile-loader { + margin-top: 5vh; + margin-left: auto; + margin-right: auto; + z-index: 1; + width: 120px; + height: 120px; + border: 12px solid var(--color-4); + border-radius: 50%; + border-top: 12px solid var(--color-3); + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; +} + +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); } +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +.gallery-image-enlarged { + width: 40vh; + position: absolute; + top: 20%; + left: 25%; + display: none; + z-index: 999; +} + +/* Context Menu */ + +.contextmenu { + position: absolute; + width: fit-content; + padding: 2px; + margin: 0; + border: 1px solid var(--color-3); + background: var(--color-5); + z-index: 100; + border-radius: 3px; + box-shadow: 1px 1px 4px rgba(0,0,0,.2); + opacity: 0; + transform: translate(0, 15px) scale(.95); + transition: transform 0.1s ease-out, opacity 0.1s ease-out; + pointer-events: none; +} + +.contextmenu-item { + display: block; + position: relative; + margin: 0; + padding: 0; + white-space: nowrap; +} + +.contextmenu-btn { + display: block; + color: white; + font-size: 13px; + cursor: pointer; + border: 1px solid transparent; + white-space: nowrap; + padding: 6px 8px; + border-radius: 3px; +} + +.contextmenu-btn { + outline: 0 none; + text-decoration: none; +} + +.contextmenu-text { + margin-left: 5px; +} + +.contextmenu-btn .fa { + position: absolute; + left: 8px; + top: 50%; + transform: translateY(-50%); +} + +.contextmenu-item-disabled { + opacity: .5; + pointer-events: none; +} + +.contextmenu-item-disabled .contextmenu-btn { + cursor: default; +} + +.contextmenu-item-submenu::after { + content: ""; + position: absolute; + right: 6px; + top: 50%; + transform: translateY(-50%); + border: 5px solid transparent; + border-left-color: #808080; +} + +.contextmenu-item-submenu:hover::after { + border-left-color: #fff; +} + +.contextmenu-show, +.contextmenu-item:hover > .contextmenu { + opacity: 1; + transform: translate(0, 0) scale(1); + pointer-events: auto; +} + +.contextmenu-item:hover > .contextmenu { + transition-delay: 300ms; +} + +.revoke-licence:hover { + background-color: #950909; +} + +.give-licence:hover { + background-color: #099517; +} + +.remove-image:hover { + background-color: #950909; +} + +.expand-image:hover { + background-color: #099517; +} + +.copy-image-link:hover { + background-color: #099517; +} + +.gallery-upload-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#gallery-upload-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#gallery-upload-input::placeholder { + color: white; +} + +.penalcode-embed { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 96.5%; + width: 85%; + margin: auto; + overflow: hidden; +} + +.penalcode-embed iframe { + height: 96.5%; + width: 98%; + margin: auto; + border: none; + outline: none; +} + +.incidents-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +.incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.incidents-title:hover { + background-color: var(--color-3); +} + +.incidents-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#incidents-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#incidents-search-input::placeholder { + color: white; +} + +.incidents-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.incidents-item { + background-color: var(--color-5); + width: 100%; + height: 5.5vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + flex-direction: column; +} + +.incidents-item:hover { + background-color: var(--color-3); +} + +.incidents-top-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; +} + +.incidents-item-title { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + max-width: 25vh; + margin-top: 5px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.incedent-report-name { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-top: 5px; +} + +.incidents-bottom-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; + padding-top: 5px; +} + +.incedent-report-id { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-bottom: 5px; +} + +.incedent-report-time-ago { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-bottom: 5px; +} + +.manage-incidents-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + max-height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + overflow: auto; +} + +.manage-incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: auto; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.manage-incidents-title:hover { + background-color: var(--color-3); +} + +.manage-incidents-create { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 5px; + padding-bottom: 5px; + align-items: center; + background-color: var(--color-4); + margin: auto; + margin-left: 5px; + margin-top: 10px; + /* margin-right: 0px; */ + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-incidents-create:hover { + background-color: var(--color-3); +} + +.manage-incidents-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 5px; + padding-bottom: 5px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-incidents-save:hover { + background-color: #1caa28; +} + +.manage-incidents-title-tag { + font-size: 16px; + font-weight: lighter; + color: white; + width: 95%; + margin: auto; + text-align: left; + margin-top: 10px; + margin-bottom: 0px; +} + +.manage-incidents-title-input { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-incidents-title-input input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-incidents-reports-content { + width: 91%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + border: none; + outline: none; + min-height: 30vh; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; + pointer-events: none; +} + +.manage-incidents-tags-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.manage-incidents-tags-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-incidents-tags-add-btn:hover { + background-color: var(--color-3); +} + +.manage-incidents-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.manage-incidents-tags-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 5px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-incidents-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.manage-incidents-officers-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.manage-incidents-officers-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-incidents-officers-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.manage-incidents-officers-add-btn:hover { + background-color: var(--color-3); +} + +.manage-incidents-officers-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 5px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-incidents-officers { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.manage-incidents-civilians-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.manage-incidents-civilians-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-incidents-civilians-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.manage-incidents-civilians-add-btn:hover { + background-color: var(--color-3); +} + +.manage-incidents-civilians-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 5px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-incidents-civilians { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.manage-incidents-evidence-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.manage-incidents-evidence-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-incidents-evidence-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.manage-incidents-evidence-add-btn:hover { + background-color: var(--color-3); +} + +.manage-incidents-evidence-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-incidents-evidence { + width: 10vh; + filter: blur(5px); +} + +span.tag-incident-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.tag-incident-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +span.officers-incident-input[contenteditable]:empty::before { + content: '(XXX) Officer Name'; +} + +.officers-incident-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +span.civilians-incident-input[contenteditable]:empty::before { + content: 'Civilian Name'; +} + +.civilians-incident-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.associated-incidents-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.associated-incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.associated-incidents-title:hover { + background-color: var(--color-3); +} + +.associated-incidents-tags-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.associated-incidents-tags-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.associated-incidents-tags-add-btn:hover { + background-color: var(--color-3); +} + +.associated-incidents-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.associated-incidents-tags-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.associated-incidents-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.incidents-upload-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#incidents-upload-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#incidents-upload-input::placeholder { + color: white; +} + +.incidents-img { + width: 10vh; + filter: blur(5px); + object-fit: cover; +} + +.bulletin-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.bulletin-add-btn:hover { + background-color: var(--color-3); +} + +.associated-incidents-user-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.associated-incidents-user-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.associated-incidents-user-tags-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + min-height: 3.5vh; + max-height: 14vh; + user-select: none; + display: flex; + background-color: var(--color-5); +} + +.associated-incidents-user-tag { + text-decoration: none; + margin-top: auto; + margin-bottom: auto; + margin-left: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: white; + font-size: 12px; + font-weight: 600; + background-color: black; + user-select: none; + width: fit-content; +} + +.associated-incidents-user-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + min-height: 3.5vh; + max-height: 37vh; + user-select: none; +} + +.associated-incidents-user { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.associated-incidents-fine-input { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.associated-incidents-fine-input input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.associated-incidents-sentence-input { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 15px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.associated-incidents-sentence-input input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.icidents-person-search { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin-top: 32.5vh; +} + +.icidents-person-search-container { + background-color: var(--color-5); + width: 95vh; + height: 45vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + display: none; +} + +.icidents-person-search-title { + background-color: var(--color-4); + color: white; + font-size: 20px; + font-weight: bolder; + text-align: center; + padding-top: 15px; + padding-bottom: 15px; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + user-select: none; +} + +.icidents-person-search-name-title { + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + color: white; + font-size: 15px; + text-align: left; + user-select: none; +} + +.icidents-person-search-name-input { + background-color: rgba(0, 0, 0, 0); + border: none; + outline: none; + color: white; + width: 100%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + text-align: left; + padding-bottom: 2.5px; +} + +.icidents-person-search-holder { + overflow: auto; + height: 30vh; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 15px; +} + +.icidents-person-search-item { + width: 100%; + height: 12.5vh; + display: flex; + flex-direction: row; +} + +.icidents-person-search-item:hover { + background-color: var(--color-3); +} + +.icidents-person-search-item-pfp { + width: 11vh; + height: 11vh; + margin-top: auto; + margin-bottom: auto; + margin-left: 10px; +} + +.icidents-person-search-item-right { + display: flex; + flex-direction: column; + width: 100%; + margin-top: auto; + margin-bottom: auto; + margin-right: 10px; + margin-left: 10px; + height: 11vh; +} + +.icidents-person-search-item-right-cid-title { + width: 100%; + margin: auto; + margin-top: 0px; + margin-bottom: 0px; + color: white; + font-size: 16px; + text-align: left; + user-select: none; +} + +.icidents-person-search-item-right-cid-input { + width: 100%; + margin: auto; + margin-top: 5px; + margin-bottom: auto; + color: white; + font-size: 16px; + text-align: left; + padding-bottom: 2.5px; + border-bottom: 2px solid var(--color-3); + user-select: none; +} + +.icidents-person-search-item-right-name-title { + width: 100%; + margin: auto; + margin-top: auto; + margin-bottom: 0px; + color: white; + font-size: 16px; + text-align: left; + user-select: none; +} + +.icidents-person-search-item-right-name-input { + width: 100%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + color: white; + font-size: 16px; + text-align: left; + padding-bottom: 2.5px; + border-bottom: 2px solid var(--color-3); +} + +.bolos-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +.bolos-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.bolos-title:hover { + background-color: var(--color-3); +} + +.bolos-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#bolos-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#bolos-search-input::placeholder { + color: white; +} + +.bolos-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.bolos-item { + background-color: var(--color-5); + width: 100%; + height: 5.5vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + flex-direction: column; +} + +.manage-bolos-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + max-height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + overflow: auto; +} + +.manage-bolos-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 10px; + width: 66%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.manage-bolos-title-tag { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 84%; + align-items: center; + user-select: none; +} + +.manage-bolos-title:hover { + background-color: var(--color-3); +} + + + +.manage-bolos-create { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 5px; + padding-bottom: 5px; + align-items: center; + background-color: var(--color-4); + margin: auto; + margin-left: 5px; + margin-top: 10px; + /* margin-right: 0px; */ + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.manage-bolos-create:hover { + background-color: var(--color-3); +} + +.manage-bolos-input-tag { + font-size: 16px; + font-weight: lighter; + color: white; + width: 95%; + margin: auto; + text-align: left; + margin-top: 10px; + margin-bottom: 0px; +} + +.manage-bolos-input-title { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-bolos-input-title input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-bolos-input-plate { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-bolos-input-plate input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-bolos-input-owner { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-bolos-input-owner input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-bolos-input-individual { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-bolos-input-individual input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-bolos-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 0px; + margin-top: 10px; + margin-right: 13px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.manage-bolos-save:hover { + background-color: #1caa28; +} + +.manage-bolos-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.manage-bolos-new:hover { + background-color: #aa1c1c; +} + +.manage-bolos-reports-content { + width: 91%; + margin: auto; + margin-top: 15px; + margin-bottom: 15px; + border: none; + outline: none; + height: 100%; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.manage-bolos-right-container { + display: flex; + flex-direction: column; + height: 95.7%; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 15px; +} + +.manage-bolos-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + overflow: scroll; +} + +.manage-bolos-gallery-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + height: 18vh; + overflow: scroll; +} + +.manage-bolos-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-officers-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.officers-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.officers-add-btn:hover { + background-color: var(--color-3); +} + +.manage-officers-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + margin-top: 10px; + overflow: scroll; +} + +.bolo-item { + background-color: var(--color-5); + width: 100%; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + flex-direction: column; +} + +.bolo-item:hover { + background-color: var(--color-3); +} + +.bolo-top-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; +} + +.bolo-item-title { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-top: 5px; +} + +.bolo-report-name { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-top: 5px; +} + +.bolo-bottom-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; + margin-top: 5px +} + +.bolo-report-id { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-bottom: 5px; +} + +.bolo-report-time-ago { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-bottom: 5px; +} + +.bolos-search-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.bolos-search-refresh:hover { + background-color: #aa891c; +} + +.bolos-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.bolos-search-title:hover { + background-color: var(--color-3); +} + +.manage-bolos-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.manage-bolos-tags-add-btn:hover { + background-color: var(--color-3); +} + +span.tag-bolo-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.tag-bolo-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +span.officer-tag-bolo-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.officer-tag-bolo-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.bolo-gallery-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.bolo-gallery-add-btn:hover { + background-color: var(--color-3); +} + +.bolo-gallery-upload-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#bolo-gallery-upload-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#bolo-gallery-upload-input::placeholder { + color: white; +} + +.bolo-img { + width: 10vh; + filter: blur(5px); + object-fit: cover; +} + +.bolo-gallery-inner-container { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-bolos-editing-title { + background-color: var(--color-3); + color: white; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 10px; + width: 95%; + align-items: center; + user-select: none; +} + +.reports-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +#home-reports-container { + height: 50%; +} + +#home-warrants-container { + height: 50%; +} + +.dispatch-comms-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 45.5%; + width: 50vh; + margin-top: 1vh; + margin-left: 10px; +} + +.reports-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.reports-title:hover { + background-color: var(--color-3); +} + +.reports-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#reports-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#reports-search-input::placeholder { + color: white; +} + +.reports-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.dispatch-item { + height: auto; + padding: auto; + margin-top: 1vh; +} + +.dispatch-item:hover { + background-color: var(--color-7); +} + +.dispatch-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 94%; + height: 100%; +} + +.dispatch-message-profilepic { + width: 2.8vh; + height: 2.8vh; + object-fit: cover; + float: left; + border-radius: 50%; +} + +.dispatch-item-info { + float:left; + font-size: 14px; + font-weight: bold; + padding-left: 0.75vh; + color: var(--color-8); +} + +.dispatch-info-job-lspd { + color: #2554cc; +} + +.dispatch-info-job-bcso { + color: #cc7e25; +} + +.dispatch-info-job-sast { + color: #2589cc; +} + +.dispatch-info-job-sasp { + color: #2589cc; +} + +.dispatch-info-job-doc { + color: #7b25cc; +} + +.dispatch-info-job-sapr { + color: #5acc25; +} + +.dispatch-info-job-pa { + color: #008080; +} + +.dispatch-info-job-ambulance { + color: #cc2525; +} + +.dispatch-info-job-doj { + color: #FFEAB9; +} + +.active-info-job-lspd { + background-color: #2554cc; +} + +.active-info-job-bcso { + background-color: #cc7e25; +} + +.active-info-job-sast { + background-color: #2589cc; +} + +.active-info-job-sasp { + background-color: #2589cc; +} + +.active-info-job-doc { + background-color: #7b25cc; +} + +.active-info-job-sapr { + background-color: #5acc25; +} + +.active-info-job-pa { + background-color: #008080; +} + +.active-info-job-ambulance { + background-color: #cc2525; +} + +.active-info-job-doj { + background-color: #525252; +} + +.active-info-job-unk { + background-color: #6E707C; +} + +.dispatch-item-message { + float:left; + font-size: 14px; + font-weight: lighter; + color: white; + width: 100%; + overflow:wrap; + white-space:normal; + padding-left: 0.80vh; + padding-top: 0.2vh; +} + +.dispatch-item-msg { + padding-left: 2.8vh; + padding-bottom: 0vh; +} + +.dispatch-item-msg:hover { + background-color: var(--color-7); +} + +.dispatch-item-grid { + display:grid; +} + +.dispatch-input { + min-width: 90%; + max-width: 90%; + min-height: 0.1vh; + margin-left: 1.1vh; + margin-bottom: 1vh; + border: none; + padding: 12px 20px; + background-color: var(--color-7); + color: #bebec2; +} + +.dispatch-input:focus { + outline:none!important; +} + +.reports-search-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.reports-search-refresh:hover { + background-color: #aa891c; +} + +.dispatch-comms-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.dispatch-comms-refresh:hover { + background-color: #aa891c; +} + +.reports-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.reports-search-title:hover { + background-color: var(--color-3); +} + +.manage-reports-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + max-height: 74.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + overflow: auto; +} + +.manage-reports-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: auto; + margin-left: 10px; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.manage-reports-title-tag { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 84%; + align-items: center; + user-select: none; +} + +.manage-reports-title:hover { + background-color: var(--color-3); +} + + + +.manage-reports-create { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 5px; + padding-bottom: 5px; + align-items: center; + background-color: var(--color-4); + margin: auto; + margin-left: 5px; + margin-top: 10px; + /* margin-right: 0px; */ + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.manage-reports-create:hover { + background-color: var(--color-3); +} + +.manage-reports-input-tag { + font-size: 16px; + font-weight: lighter; + color: white; + width: 95%; + margin: auto; + text-align: left; + margin-top: 10px; + margin-bottom: 0px; +} + +.manage-reports-input-title { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-reports-input-title input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-reports-input-type { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-reports-input-type input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-reports-input-owner { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-reports-input-owner input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-reports-input-individual { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-reports-input-individual input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-reports-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 0px; + margin-top: 10px; + margin-right: 13px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-reports-save:hover { + background-color: #1caa28; +} + +.manage-reports-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-reports-new:hover { + background-color: #aa1c1c; +} + +.incidents-remove-normal-tag:hover { + background-color: #aa1c1c; +} + +.incidents-remove-normal-civ:hover { + background-color: #aa1c1c; +} + +.incidents-remove-tag:hover { + background-color: #aa1c1c; +} + +.incidents-remove-officer-tag:hover { + background-color: #aa1c1c; +} + +.manage-reports-editing-title { + background-color: var(--color-3); + color: white; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 10px; + width: 95%; + align-items: center; + user-select: none; + display: block; +} + +.manage-reports-reports-content { + width: 91%; + margin: auto; + margin-top: 15px; + margin-bottom: 15px; + border: none; + outline: none; + height: 100%; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.manage-reports-right-container { + display: flex; + flex-direction: column; + height: 95.7%; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 15px; +} + +.manage-reports-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + overflow: scroll; +} + +.manage-reports-gallery-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + height: 18vh; + overflow: scroll; +} + +.manage-reports-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.reports-officers-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.reports-officers-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.reports-officers-add-btn:hover { + background-color: var(--color-3); +} + +.reports-officers-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + margin-top: 10px; + overflow: scroll; +} + +.reports-gallery-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.reports-gallery-add-btn:hover { + background-color: var(--color-3); +} + +.reports-gallery-upload-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#reports-gallery-upload-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#reports-gallery-upload-input::placeholder { + color: white; +} + +.reports-img { + width: 10vh; + filter: blur(5px); + object-fit: cover; +} + +.reports-gallery-inner-container { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-reports-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.manage-reports-tags-add-btn:hover { + background-color: var(--color-3); +} + +.reports-civilians-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + margin-top: 10px; + overflow: scroll; +} + +.reports-civilians-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.reports-civilians-add-btn:hover { + background-color: var(--color-3); +} + +.reports-civilians-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.reports-item { + background-color: var(--color-5); + width: 100%; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + flex-direction: column; +} + +.reports-item:hover { + background-color: var(--color-3); +} + +.reports-top-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; +} + +.reports-item-title { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-top: 5px; + max-width: 25vh; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.reports-report-name { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-top: 5px +} + +.reports-bottom-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; + margin-top: 5px; +} + +.reports-report-id { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-bottom: 5px; +} + +.reports-report-time-ago { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-bottom: 5px; +} + +span.tag-reports-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.tag-reports-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +span.officer-tag-reports-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.officer-tag-reports-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +span.civilian-tag-reports-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.civilian-tag-reports-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.dmv-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; +} + +.dmv-search-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.dmv-search-refresh:hover { + background-color: #aa891c; +} + +.dmv-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.dmv-search-title:hover { + background-color: var(--color-3); +} + +.dmv-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#dmv-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#dmv-search-input::placeholder { + color: white; +} + +.dmv-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.vehicle-information-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.vehicle-information-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.vehicle-information-save:hover { + background-color: #1caa28; +} + +.add-charge:hover { + background-color: #1caa28; +} + +.vehicle-information-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 81%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.dmv-item { + background-color: var(--color-5); + width: 100%; + height: 9vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + +} + +.dmv-item:hover { + background-color: var(--color-3); +} + +.dmv-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.dmv-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.dmv-tags { + display: flex; + overflow-x: auto; + width: 98%; + margin-top: 10px; + margin-bottom: 5px; +} + +.dmv-tag { + margin: auto; + margin-left: 0px; + margin-right: 6px; + padding: 4px; + padding-left: 7px; + padding-right: 7px; + border-radius: 10px; + color: white; + font-size: 12px; + font-weight: bolder; + background-color: #956E09; +} + +.dmv-bottom-info { + display: flex; + margin: auto; + width: 100%; +} + +.dmv-id { + color: white; + font-size: 13px; +} + +.vehicle-info-stuff { + display: flex; + flex-direction: row; + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; +} + +.vehicle-info-image { + width: 444px; + height: 269px; + object-fit: cover; +} + +.vehicle-info-inner-container { + display: flex; + flex-direction: column; + width: 55%; +} + +.vehicle-info-plate { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-plate-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-owner { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-owner-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-class { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-class-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-model { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-model-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-imageurl { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-imageurl-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-icon { + color: white; + font-size: 16px; + margin-left: 10px +} + +.vehicle-info-line { + background-color: var(--color-3); + height: 2px; + margin-left: 10px; + margin-bottom: 10px; +} + +.vehicle-info-tags-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + height: fit-content; + align-items: center; + user-select: none; +} + +.vehicle-info-tags-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.vehicle-info-tags-add-btn:hover { + background-color: var(--color-3); +} + +.vehicle-info-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; +} + +.vehicle-info-tags-holder { + overflow: auto; + margin: auto; + margin-top: 7px; + margin-bottom: 7px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.vehicle-info-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.vehicle-info-content { + width: 93%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + border: none; + outline: none; + min-height: 26.9vh; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.vehicle-tags { + display: flex; + overflow-x: auto; + width: 98%; + margin-top: 5px; + margin-bottom: 5px; +} + +.vehicle-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: white; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.stafflogs-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 100%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; + overflow: auto; +} + +.stafflogs-container > p { + color: white; + font-size: 1.3vh; + padding-left: 1vh; +} + +/* Vehicle Colors :( so long lol */ + +.black-color { + background-color: #0e0e0e; + color: white; +} + +.darksilver-color { + background-color: #333333; + color: white; +} + +.silver-color { + background-color: #333333; + color: white; +} + +.bluesilver-color { background-color: #c4d4e0; } + +.matteblack-color { + background-color: #141414; + color: white; +} + +.gray-color { + background-color: #808080; + color: white; +} + +.lightgray-color { background-color: #D3D3D3; } +.utilgunmetal-color { background-color: #39434d; } +.red-color { background-color: #c00e1a; } +.torinored-color { background-color: #da1918; } +.formulared-color { background-color: #b6111b; } +.blazered-color { background-color: #a51e23; } +.gracefulred-color { background-color: #7b1a22; } +.garnetred-color { background-color: #8e1b1f; } +.desertred-color { background-color: #6f1818; } +.cabernetred-color { background-color: #49111d; } +.candyred-color { background-color: #b60f25; } +.orange-color { background-color: #f78616; } +.gold-color { background-color: #c2944f; } +.mattedarkred-color { background-color: #732021; } +.matteyellow-color { background-color: #ffc91f; color: black } +.brightred-color { background-color: #de0f18; } +.darkgreen-color { background-color: #132428; } +.racingreen-color { background-color: #122e2b; } +.seagreen-color { background-color: #12383c; } +.olivegreen-color { background-color: #31423f; } +.green-color { background-color: #155c2d; } +.gasolinebluegreen-color { background-color: #1b6770; } +.mattelimegreen-color { background-color: #66b81f; } +.seawash-color { background-color: #65867f; } +.midnightblue-color { background-color: #222e46; } +.darkblue-color { background-color: #233155; } +.saxonyblue-color { background-color: #304c7e; } +.blue-color { background-color: #345df3; } +.diamondblue-color { background-color: #d6e7f1; } +.brightblue-color { background-color: #0b9cf1; } +.purpleblue-color { background-color: #2f2d52; } +.ultrablue-color { background-color: #2354a1; } +.lightningblue-color { background-color: #2446a8; } +.mattedarkblue-color { background-color: #1f2852; } +.matteblue-color { background-color: #253aa7; } +.yellow-color { background-color: #fbe212; color: black } +.bronze-color { background-color: #916532; } +.lime-color { background-color: #98d223; } +.champagne-color { background-color: #9b8c78; } +.beige-color { background-color: #F5F5DC; } +.darkivory-color { background-color: #473f2b; } +.brown-color { background-color: #3a2a1b; } +.lightbrown-color { background-color: #b5a079; } +.beechwood-color { background-color: #a4965f; } +.chocoorange-color { background-color: #752b19; } +.cream-color { background-color: #f7edd5; } +.white-color { background-color: #f0f0f0; color: black } +.steel-color { background-color: #6a747c; } +.blacksteel-color { background-color: #354158; } +.aluminium-color { background-color: #9ba0a8; } +.chrome-color { background-color: #5870a1; } +.wornwhite-color { background-color: #eae6de; color: black } +.offwhite-color { background-color: #dfddd0; color: black } +.lightorange-color { background-color: #f9a458; } +.pink-color { background-color: #f21f99; } +.blackblue-color { background-color: #0a0c17; } +.blackpurple-color { background-color: #0c0d18; } +.blackred-color { background-color: #0e0d14; } +.darkpurple-color { background-color: #621276; } +.olivedrab-color { background-color: #696748; } +.tan-color { background-color: #c3b492; } + +.reports-remove-image:hover { + background-color: #950909; +} + +.bolo-remove-image:hover { + background-color: #950909; +} + +.bolo-delete:hover { + background-color: #950909; +} + +.remove-bulletin:hover { + background-color: #950909; +} + +.search-vehicle:hover { + background-color: #956E09; +} + +.mark-code-5:hover { + background-color: #0B9509; +} + +.remove-code-5:hover { + background-color: #950909; +} + +.mark-stolen:hover { + background-color: #0B9509; +} + +.remove-stolen:hover { + background-color: #950909; +} + +.toggle-duty:hover { + background-color: #956E09; +} + +.set-callsign:hover { + background-color: #0B9509; +} + +.set-radio:hover { + background-color: #09956b; +} + +.incidents-ghost-holder { + overflow: auto; + max-height: 80vh; + margin-top: 10px; + margin-bottom: 10px; +} + +.incidents-charges-table { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin: auto; + margin-top: -25vh; +} + +.incidents-charges-table-container { + background-color: var(--color-5); + width: 155vh; + height: 85vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + user-select: none; +} + +.incidents-charges-title-container { + width: 95%; + height: 11vh; + background-color: var(--color-4); + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + display: flex; + flex-direction: column; + border: 2px solid var(--color-4); +} + +.incidents-charges-title { + color: white; + margin: auto; + text-align: center; + align-items: center; + font-size: 22px; + font-weight: bolder; + margin-top: 1vh; +} + +.incidents-charges-title span { + color: #B4A684; + font-size: 19px; +} + +.incidents-charges-title-description { + color: white; + margin: auto; + background-color: var(--color-5); + text-align: left; + font-size: 17px; + padding: .5vh; + width: 97%; + margin-bottom: 1.5vh; +} + +.manage-incidents-editing-title { + background-color: var(--color-3); + color: white; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 10px; + width: 95%; + align-items: center; + user-select: none; +} + + +.current-charges-container { + width: 95%; + border: 2px solid var(--color-4); + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + display: flex; +} + +.current-charges-inner-container { + background-color: var(--color-4); + width: 35vh; + height: fit-content; + margin: auto; + margin-left: 1vh; + margin-right: 0vh; + text-align: center; + display: flex; +} + +.current-charges-title { + color: white; + font-size: 19px; + font-weight: bolder; + padding: .25vh; + padding-left: 6vh; + padding-right: 6vh; + margin: auto; +} + +#current-charges-holder { + display: flex; + margin: auto; + width: 110vh; + margin-left: 1vh; + margin-right: 1vh; + overflow: hidden; +} + +.current-charges-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + padding: 5px; + padding-left: 7px; + padding-right: 7px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + background-color: white; + color: black; + white-space: nowrap; +} + +.offenses-title-container { + width: fit-content; + height: fit-content; + background-color: var(--color-4); + margin-left: 3.75vh; + margin-top: 1.5vh; + margin-bottom: 0vh; + display: flex; + border: 2px solid var(--color-4); +} + +.offenses-title { + color: white; + padding: .7vh; + padding-right: 3vh; + font-weight: bolder; + font-size: 1.4vh; +} + +.offenses-prepend-holder { + width: 95%; + background-color: var(--color-4); + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + border: 2px solid var(--color-4); + display: grid; + grid-template-columns: auto auto auto auto; + grid-template-rows: auto auto auto auto; + row-gap: 0vh; + overflow: auto; +} + +.offense-item { + background-color: #0B9509; + border: 1.5px solid black; + height: 5.0vh; + margin: .5vh; + flex-direction: column; + color: white; + display: inline-block; + overflow: auto; + transition: all 0.15s ease-in-out; +} + +.offense-item:hover { + transform: scale(1.02); + transition: all 0.15s ease-in-out; +} + +.offense-item-offense { + margin: auto; + margin-left: .5vh; + margin-top: .5vh; + color: white; + font-size: 1.2vh; + font-weight: bold; +} + +.offfense-item-name { + margin: auto; + margin-right: .5vh; + margin-top: .5vh; + color: white; + font-size: 1.2vh; + font-weight: bold; +} + +.offense-item-id { + margin: auto; + margin-left: .5vh; + margin-bottom: .5vh; + color: white; + font-size: 1.2vh; + font-weight: bold; +} + +.offfense-item-months { + margin: auto; + margin-right: .5vh; + margin-bottom: .5vh; + color: white; + font-size: 1.2vh; + font-weight: bold; +} + +.offenses-main-container { + overflow: auto; + margin: auto; + margin-top: 1vh; + margin-bottom: 1vh; + width: 100%; +} + +.callsign-container { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin-top: 40.5vh; +} + +.radio-container { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin-top: 40.5vh; +} + +.radio-inner-container { + background-color: var(--color-5); + width: 30vh; + height: 17.5vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + border: .45vh solid white; +} + +.radio-title { + color: white; + font-size: 2vh; + font-weight: bold; + margin: auto; + margin-top: 2vh; + margin-bottom: 0vh; +} + +.radio-input { + width: 20vh; + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + background-color: var(--color-6); + border: none; + outline: none; + font-size: 2vh; + color: white; + text-align: center; + padding: 1vh; +} + +.radio-buttons { + width: 20vh; + margin: auto; + margin-top: 1.5vh; + display: flex; + flex-direction: row; +} + +.radio-cancel { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #D77A0D; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.radio-cancel:hover { + background-color: #f18f1e; +} + +.radio-submit { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #0B9509; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.radio-submit:hover { + background-color: #15ac12; +} + +.callsign-inner-container { + background-color: var(--color-5); + width: 30vh; + height: 17.5vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + border: .45vh solid white; +} + +.callsign-title { + color: white; + font-size: 2vh; + font-weight: bold; + margin: auto; + margin-top: 2vh; + margin-bottom: 0vh; +} + +.callsign-input { + width: 20vh; + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + background-color: var(--color-6); + border: none; + outline: none; + font-size: 2vh; + color: white; + text-align: center; + padding: 1vh; +} + +.callsign-buttons { + width: 20vh; + margin: auto; + margin-top: 1.5vh; + display: flex; + flex-direction: row; +} + +.callsign-cancel { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #D77A0D; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.callsign-cancel:hover { + background-color: #f18f1e; +} + +.callsign-submit { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #0B9509; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.callsign-submit:hover { + background-color: #15ac12; +} + + +/* Keep At Bottom */ + +.red-tag { + background-color: #950909; +} + +.orange-tag { + background-color: #956E09; +} + +.green-tag { + background-color: #0B9509; +} + +.white-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 6px; + padding: 7px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + background-color: white; + color: black; +} + +.orange-penal-code { + background-color: #D77A0D; +} + +.green-penal-code { + background-color: #0B9509; +} + +.red-penal-code { + background-color: #950909; +} + +.header-pin { + padding-right: 5px; +} + +.priority-1 { + background-color: #bb0404; +} + +.priority-2 { + background-color: #ce7808; +} + +.call-bottom-info > span { + padding-right: 0.5vh; +} + +.call-attach:hover { + background-color: #1caa28; +} + +.Set-Waypoint:hover { + background-color: #f18f1e; +} + +.call-detach:hover { + background-color: #950909; +} + +.remove-blip:hover { + background-color: #950909; +} + +.dispatch-attached-units { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} + +.active-unit-item:hover { + background-color: var(--color-3); +} + +.active-calls-item:hover { + background-color: var(--color-3); +} + +.dispatch-attached-units-container { + background-color: var(--color-1); + width: 92vh; + height: 46vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 1; + border: 2px solid #FFFFFF; + display: none; + margin-top: 32.5vh; +} + +.dispatch-attached-units-title { + background-color: var(--color-4); + color: white; + font-size: 20px; + font-weight: bolder; + text-align: center; + padding-top: 15px; + padding-bottom: 15px; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + user-select: none; +} + +.dispatch-attached-units-holder { + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + overflow: auto; + height: 37.8vh; + display: flex; + flex-direction: column; + width: 95%; +} + +.dispatch-attached-unit-item { + padding: 10px; + height: 3vh; + background-color: var(--color-5); + display: flex; + align-items: center; + margin-bottom: 5px; +} + +.attached-units:hover { + background-color: rgb(156, 156, 156); +} + +.Set-Dispatch-Waypoint:hover { + background-color: #f18f1e; +} + +.call-dispatch-detach:hover { + background-color: #950909; +} + +.incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.incidents-title:hover { + background-color: var(--color-3); +} + +.incidents-search-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.incidents-search-refresh:hover { + background-color: #aa891c; +} + +.respond-calls { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin-top: 32.5vh; +} + +.respond-calls-container { + background-color: var(--color-5); + width: 70vh; + min-height: 30vh; + max-height: 40vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + overflow: auto; +} + +.respond-calls-title { + background-color: var(--color-4); + color: white; + font-size: 20px; + font-weight: bolder; + text-align: center; + padding-top: 15px; + padding-bottom: 15px; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + user-select: none; +} + +.respond-calls-input { + width: 92.5%; + margin-top: 10px; + margin-bottom: 10px; + outline: solid 3px #1B3047; + margin-left: 27px; + min-height: 21.5vh; + max-height: 21.5vh; + border: none; + padding: 10px 10px; + background-color: transparent; + color: #dadada; + resize: none; + font-size: 16px; +} + +.respond-calls-input:focus { + outline: solid 3px #1B3047; +} + +.respond-calls-responses { + width: 95%; + margin-left: 1.7vh +} + +.respond-calls-response { + color: #dadada; + margin-top: 0.5vh; + padding: 0.5vh; + background-color: rgba(32, 32, 32, 0.5); + color: #FFFFFF; +} + +.offenses-search-area { + width: 95%; + border: 2px solid var(--color-4); + height: 3vh; + margin: 1.5vh auto 0vh; + display: flex; +} + +.offenses-search { + background: transparent; + border: none; + outline: none; + font-size: 1.2vh; + color: rgb(255, 255, 255); + font-family: Roboto, sans-serif; + font-style: normal; + font-weight: normal; + margin-left: 1vh; + padding-top: 10px; + padding-bottom: 10px; +} + +.impound-form { + display: flex; + flex-direction: column; + + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + + width: 750px; + height: 375px; + background: var(--color-5); + border: 1px solid white; +} + +.impound-form > form { + position: absolute; + left: 10%; + width: 73%; + height: 100%; +} + +.impound-form > form > input { + border: none; + outline: none; + font-size: 24px; + color: white; + + background: transparent; + border: 1px solid rgb(168, 168, 168); + + width: 100%; + height: 13.5%; + + margin-top: 20px; + padding-left: 10%; +} + +.impound-form > form > i { + position: absolute; + color: white; + font-size: 24px; + margin-top: 37.5px; + margin-left: 12.6px; +} + +.impound-buttons { + position: absolute; + margin: auto; + display: flex; + flex-direction: row; + bottom: 6%; + left: 10%; +} + +.impound-cancel { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #D77A0D; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.impound-cancel:hover { + background-color: #f18f1e; +} + +.impound-submit { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #0B9509; + border-radius: 1vh; + margin: auto; + user-select: none; + margin-left: 10px; +} + +.impound-submit:hover { + background-color: #15ac12; +} + +.status-impound:hover { + background-color: #ac8312; +} + +.remove-impound:hover { + background-color: #ac1212; +} + +.impound-vehicle:hover { + background-color: #12ac1f; +} + +.impound-fee { + color: white; +} + +.dispatch-reply:hover { + background-color: var(--color-1); +} +.display_hidden{ + display: none; +} + +.cams-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; + overflow: auto +} + +.cams-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 100%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; + overflow: auto; +} + +.cams-item { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + grid-auto-flow: row; + gap: 15px 15px; + overflow: auto; + margin-bottom: 10px; + + +} + +.cams-items { + background-color: var(--color-5); + height: auto; + padding: 10px; + text-align: center; + margin: 10px; + color: white; + font-size: 20px; + color: white; + overflow: visible; + +} + +.cams-image { + height:125px; + width: auto; + margin: 10px; + +} + +.cams-items:hover { + background-color: var(--color-3); +} + +.weapons-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; +} + +.weapons-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.weapons-search-title:hover { + background-color: var(--color-3); +} + +.weapons-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#weapons-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#weapons-search-input::placeholder { + color: white; +} + +.weapons-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.weapon-information-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.weapon-information-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.weapon-information-new:hover { + background-color: #aa1c1c; +} + +.weapon-information-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.weapon-information-save:hover { + background-color: #1caa28; +} + +.weapon-information-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 81%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.weapon-info-stuff { + display: flex; + flex-direction: row; + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; +} + +.weapon-info-image { + width: 444px; + height: 269px; + object-fit: cover; +} + +.weapon-info-imageurl { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-imageurl-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-inner-container { + display: flex; + flex-direction: column; + width: 55%; +} + +.weapon-info-serial { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-serial-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-icon { + color: white; + font-size: 16px; + margin-left: 10px +} + +.weapon-info-line { + background-color: var(--color-3); + height: 2px; + margin-left: 10px; + margin-bottom: 10px; +} + +.weapon-info-model { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-model-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-owner { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-owner-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-class { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-class-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-imageurl { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-imageurl-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.weapon-info-content { + width: 93%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + border: none; + outline: none; + min-height: 30.9vh; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.weapons-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.weapons-bottom-info { + display: flex; + margin: auto; + width: 100%; +} + +.weapons-id { + color: white; + font-size: 13px; +} + +.weapons-item { + background-color: var(--color-5); + width: 100%; + height: 9vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + +} + +.weapons-item:hover { + background-color: var(--color-3); +} + +.weapons-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.vehicle-info-points { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; + margin-top: 5px; +} + +input[type="range"].vehicle-info-points-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 80%; +} + +input[type="range"].vehicle-info-points-input::-moz-range-thumb { + box-shadow: none; + border: 2px solid grey; + height: 16px; + width: 16px; + border-radius: 16px; + background: white; +} + +input[type="range"].vehicle-info-points-input::-moz-range-track { + width: 100%; + height: 2px; + box-shadow: none; + background: var(--color-8); + border-radius: 0px; + border: 0px; +} + +.manage-profile-apartment { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-apartment-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +/* Charges Hover */ + +.ccontextmenu { + position: absolute; + width: fit-content; + padding: 2px; + margin: 0; + border: 1px solid var(--color-3); + background: var(--color-5); + z-index: 100; + border-radius: 3px; + box-shadow: 1px 1px 4px rgba(0,0,0,.2); + opacity: 0; + transform: translate(0, 15px) scale(.95); + transition: transform 0.1s ease-out, opacity 0.1s ease-out; + pointer-events: none; +} + +.ccontextmenu-item { + display: block; + position: relative; + margin: 0; + padding: 0; + /* white-space: nowrap; */ + max-width: 34ch; + word-wrap:break-word; +} + +.ccontextmenu-text { + display: block; + color: white; + font-size: 13px; + cursor: pointer; + border: 1px solid transparent; + /* white-space: nowrap; */ + padding: 6px 8px; + border-radius: 3px; + max-width: 34ch; + word-wrap:break-word; +} + +.ccontextmenu-text { + outline: 0 none; + text-decoration: none; +} + +.ccontextmenu-text .fa { + position: absolute; + left: 8px; + top: 50%; + transform: translateY(-50%); +} + +.ccontextmenu-item-disabled { + opacity: .5; + pointer-events: none; +} + +.ccontextmenu-item-disabled .ccontextmenu-text { + cursor: default; +} + +.ccontextmenu-item-submenu::after { + content: ""; + position: absolute; + right: 6px; + top: 50%; + transform: translateY(-50%); + border: 5px solid transparent; + border-left-color: #808080; +} + +.ccontextmenu-item-submenu:hover::after { + border-left-color: #fff; +} + +.ccontextmenu-show, +.ccontextmenu-item:hover > .ccontextmenu { + opacity: 1; + transform: translate(0, 0) scale(1); + pointer-events: auto; + z-index: 9999; +} + +.map-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.calls-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 30%; + margin-top: 10px; + margin-left: 10px; +} + +.calls-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.calls-search-title:hover { + background-color: var(--color-3); +} + +.calls-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#calls-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#calls-search-input::placeholder { + color: white; +} + +.map-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 70%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.map-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.map-new:hover { + background-color: #aa1c1c; +} + +.map-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.map-save:hover { + background-color: #1caa28; +} + + +.map-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 98%; + align-items: center; + user-select: none; +} + +.map-item { + border: 2px solid var(--color-3); + position: absolute; + + width: 58%; + height: 86%; + + left: 40.6%; + top: 10.5%; + + margin-bottom: 15px; + + +} + +.leaflet-marker-pane { + z-index: 600; +} + +.leaflet-tooltip-pane { + z-index: 650; +} + +.leaflet-tooltip-right { + margin-left: 6px; } \ No newline at end of file From ced8f1ee7a3d5a52b32e6ca41a5ab2dbf25e1fde Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Mon, 6 Feb 2023 16:55:21 +0100 Subject: [PATCH 018/381] Add files via upload --- ui/app.js | 1 - ui/dashboard.html | 7 +++++++ ui/style.css | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ui/app.js b/ui/app.js index f8adef2e..446f54f2 100644 --- a/ui/app.js +++ b/ui/app.js @@ -4286,7 +4286,6 @@ $(document).ready(() => { $(".dispatch-items")[0].scrollHeight ); } else if (eventData.type == "call") { - ClearMap(); const value = eventData.data; DispatchMAP(value); if (value && value.job.includes(playerJob)) { diff --git a/ui/dashboard.html b/ui/dashboard.html index ed352ed3..7064ca33 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -963,6 +963,7 @@
                Dispatch Map
                +
                Clear
                @@ -1100,6 +1101,12 @@ offset: [-10, 0] }); + + $(".map-clear").on('click', function() { + ClearMap(); + }); + + diff --git a/ui/style.css b/ui/style.css index 7f621b9e..a202eb29 100644 --- a/ui/style.css +++ b/ui/style.css @@ -6520,7 +6520,7 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { margin-right: 10px; } -.map-new { +.map-clear { width: 13.7%; font-size: 15px; font-weight: lighter; @@ -6537,7 +6537,7 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { display: block; } -.map-new:hover { +.map-clear:hover { background-color: #aa1c1c; } From ee6621aec41cb40fb45353aa4324acad1ada46cc Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Wed, 8 Feb 2023 17:30:11 +0100 Subject: [PATCH 019/381] Fix --- ui/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 446f54f2..f864fb65 100644 --- a/ui/app.js +++ b/ui/app.js @@ -669,7 +669,7 @@ $(document).ready(() => { ".manage-incidents-create", function () { let tempalte = - "Summary:\n\n[Insert Report Summary Here]"; + "📝 Summary:\n\n[Insert Report Summary Here]\n\n🧍 Hostage: [Name Here]\n\n🔪 Weapons/Items Confiscated:\n\n· [Insert List Here]\n\n-----\n💸 Fine:\n⌚ Sentence:\n-----"; $("#manage-incidents-title-input").val( "Name - Charge - " + $(".date").html() ); From 578fad65ad5f6a779d52e02cba49e357efd8c9bc Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 8 Feb 2023 11:52:35 -0500 Subject: [PATCH 020/381] Added previews --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ddac55c5..4b65ff26 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ # Project Sloth MDT -For all support questions, ask in our Discord support chat. Do not create issues if you need help. Issues are for bug reporting and new features only. - - https://www.discord.gg/projectsloth +For all support questions, ask in our [Discord](https://www.discord.gg/projectsloth) support chat. Do not create issues if you need help. Issues are for bug reporting and new features only. ## Dependencies - [QBCore](https://github.com/qbcore-framework/qb-core) -- [PS-Dispatch](https://github.com/Project-Sloth/ps-dispatch) [If you intend to use it, make sure this starts before the mdt!] -- [Ox MySQL](https://github.com/overextended/oxmysql) +- [ps-dispatch](https://github.com/Project-Sloth/ps-dispatch) [If you intend to use it, make sure this starts before the mdt!] +- [oxmysql](https://github.com/overextended/oxmysql) # Installation * Download ZIP @@ -17,6 +15,16 @@ For all support questions, ask in our Discord support chat. Do not create issues * Start resource through server.cfg * Restart your server. +# Preview +![image](https://user-images.githubusercontent.com/82112471/217596976-5147fefa-24e2-4b98-b167-4e151b8a9a8c.png) +![image](https://user-images.githubusercontent.com/82112471/217597024-2c1493fc-4439-4b56-abbd-f9149e987b9e.png) +![image](https://user-images.githubusercontent.com/82112471/217597103-c271720a-4c1b-4a13-8e17-a27727cb0e95.png) +![image](https://user-images.githubusercontent.com/82112471/217597192-f9a63728-d2d0-4dfe-bd8b-373df1f9e969.png) +![image](https://user-images.githubusercontent.com/82112471/217597248-85d2d074-7fcd-4a54-ac57-8d1103047bc0.png) +![image](https://user-images.githubusercontent.com/82112471/217597338-aefcaed1-db9e-4b17-be45-3e0a66416b63.png) +![image](https://user-images.githubusercontent.com/82112471/217597379-d936fb8e-e33a-4817-8997-16447158afb8.png) +![image](https://user-images.githubusercontent.com/82112471/217597433-cd24bd41-a515-4fac-a896-807494501c39.png) + ## FAQ - **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". From dc61967661312949dc7e070f5e85dd7be99318a2 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 9 Feb 2023 00:27:32 -0500 Subject: [PATCH 021/381] Update dashboard.html --- ui/dashboard.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/dashboard.html b/ui/dashboard.html index 7064ca33..4dbcbff3 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -1019,7 +1019,7 @@ maxBoundsViscosity: 1.0 }); - var customImageUrl = 'https://gta-assets.nopixel.net/images/dispatch-map.png'; + var customImageUrl = 'https://i1.lensdump.com/i/gj7atT.png'; var sw = map.unproject([0, 1024], 3 - 1); var ne = map.unproject([1024, 0], 3 - 1); From 6765a1bbc8198fc2e9a6389671ece42dbdf72c28 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 9 Feb 2023 00:31:03 -0500 Subject: [PATCH 022/381] Update README.md From cc508729b3415247e7bfd7d7c368feb0b5941cac Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Thu, 9 Feb 2023 17:49:51 +0100 Subject: [PATCH 023/381] Map optimization When having a lot of dispatches the map wont lag as before --- ui/dashboard.html | 185 +++++++++++++++++++++------------------------- 1 file changed, 85 insertions(+), 100 deletions(-) diff --git a/ui/dashboard.html b/ui/dashboard.html index 4dbcbff3..94add43d 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -986,125 +986,110 @@ From 3aa8c1c67309d6d12a4101d5aff01435a1cd2e78 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 9 Feb 2023 14:54:40 -0500 Subject: [PATCH 025/381] Update fxmanifest.lua --- fxmanifest.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 8d78d4b5..2ac5e495 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '0.9.9' +version '1.2' lua54 'yes' @@ -34,4 +34,4 @@ files { 'ui/warrants.html', 'ui/app.js', 'ui/style.css', -} \ No newline at end of file +} From 7706719d581dc7a8b11d2c5ac464c6a407878173 Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Thu, 9 Feb 2023 20:58:42 +0100 Subject: [PATCH 026/381] Moved js to app.js and clear box animation --- ui/app.js | 121 +++++++++++++++++++++++++++++++++++++++++++++- ui/dashboard.html | 120 +-------------------------------------------- ui/style.css | 30 ++---------- 3 files changed, 124 insertions(+), 147 deletions(-) diff --git a/ui/app.js b/ui/app.js index f864fb65..88887c12 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5364,4 +5364,123 @@ window.addEventListener("load", function () { }); } }); -}); \ No newline at end of file +}); + +customcrs = L.extend({}, L.CRS.Simple, { + projection: L.Projection.LonLat, + scale: function(zoom) { + + return Math.pow(2, zoom); + }, + zoom: function(sc) { + + return Math.log(sc) / 0.6931471805599453; + }, + distance: function(pos1, pos2) { + var x_difference = pos2.lng - pos1.lng; + var y_difference = pos2.lat - pos1.lat; + return Math.sqrt(x_difference * x_difference + y_difference * y_difference); + }, + transformation: new L.Transformation(0.02072, 117.3, -0.0205, 172.8), + infinite: false +}); + +var map = L.map("map-item", { +crs: customcrs, +minZoom: 3, +maxZoom: 5, +zoom: 5, + +noWrap: true, +continuousWorld: false, +preferCanvas: true, + +center: [0, -1024], +maxBoundsViscosity: 1.0 +}); + +var customImageUrl = 'https://i1.lensdump.com/i/gj7atT.png'; + +var sw = map.unproject([0, 1024], 3 - 1); +var ne = map.unproject([1024, 0], 3 - 1); +var mapbounds = new L.LatLngBounds(sw, ne); +map.setView([-300, -1500], 4); +map.setMaxBounds(mapbounds); + + +map.attributionControl.setPrefix(false) + +L.imageOverlay(customImageUrl, mapbounds).addTo(map); + +map.on('dragend', function() { + if (!mapbounds.contains(map.getCenter())) { + map.panTo(mapbounds.getCenter(), { animate: false }); + } +}); + +var Dispatches = {}; +var DispatchPing = L.divIcon({ + html: '', + iconSize: [20, 20], + className: 'map-icon map-icon-ping', + offset: [-10, 0] +}); +var mapMarkers = L.layerGroup(); + +function DispatchMAP(DISPATCH) { + var MIN = Math.round(Math.round((new Date() - new Date(DISPATCH.time)) / 1000) / 60); + if (MIN > 10) return; + + var COORDS_X = DISPATCH.origin.x + var COORDS_Y = DISPATCH.origin.y + var CODE = DISPATCH.callId + + Dispatches[CODE] = L.marker([COORDS_Y, COORDS_X], { icon: DispatchPing }); + Dispatches[CODE].addTo(map); + + + Dispatches[CODE].bindTooltip(`
                ${DISPATCH.dispatchMessage}
                #${DISPATCH.callId}
                `, + { + direction: 'top', + permanent: false, + offset: [0, -10], + opacity: 1, + interactive: true, + className: 'map-tooltip' + }); + + Dispatches[CODE].addTo(mapMarkers); + + Dispatches[CODE].on('click', function() { + const callId = CODE + $.post( + `https://${GetParentResourceName()}/setWaypoint`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + Dispatches[CODE].on('contextmenu', function() { + map.removeLayer(Dispatches[CODE]); + }); + +} + +function ClearMap() { +$(".leaflet-popup-pane").empty(); +$(".leaflet-marker-pane").empty(); +} + +$(".map-clear").on('click', function() { + $(".map-clear").empty(); + $(".map-clear").prepend( + `` + ); + setTimeout(() => { + $(".map-clear").empty(); + $(".map-clear").html("Clear"); + ClearMap(); + }, 1500); +}); + diff --git a/ui/dashboard.html b/ui/dashboard.html index 2497158d..000c8f22 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -15,10 +15,6 @@ - - - - @@ -965,9 +961,7 @@
                Dispatch Map
                Clear
                -
                -
                @@ -984,120 +978,8 @@
                - + diff --git a/ui/style.css b/ui/style.css index a202eb29..290c55bb 100644 --- a/ui/style.css +++ b/ui/style.css @@ -6529,6 +6529,7 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { background-color: #8f1b1b; margin: auto; margin-left: 5px; + margin-right: 10px; margin-top: 10px; margin-bottom: 0px; color: white; @@ -6541,28 +6542,6 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { background-color: #aa1c1c; } -.map-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.map-save:hover { - background-color: #1caa28; -} - - .map-title { background-color: var(--color-4); color: white; @@ -6574,6 +6553,8 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { margin: auto; margin-top: 10px; margin-bottom: 0px; + margin-left: 10px; + margin-right: 5px; width: 98%; align-items: center; user-select: none; @@ -6582,16 +6563,11 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { .map-item { border: 2px solid var(--color-3); position: absolute; - width: 58%; height: 86%; - left: 40.6%; top: 10.5%; - margin-bottom: 15px; - - } .leaflet-marker-pane { From 5635b8264ea43963a1a067c9a0b3e5e5b1f52108 Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Sat, 11 Feb 2023 12:22:00 +0100 Subject: [PATCH 027/381] Automatic deletion after 20 minutes --- ui/app.js | 6 ++++++ ui/dashboard.html | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/app.js b/ui/app.js index 88887c12..a6185167 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5366,6 +5366,8 @@ window.addEventListener("load", function () { }); }); + + // Dispatch Map // customcrs = L.extend({}, L.CRS.Simple, { projection: L.Projection.LonLat, scale: function(zoom) { @@ -5438,6 +5440,10 @@ function DispatchMAP(DISPATCH) { Dispatches[CODE] = L.marker([COORDS_Y, COORDS_X], { icon: DispatchPing }); Dispatches[CODE].addTo(map); + // Automatic deletion after a period of 20 minutes, equivalent to 1200000 milliseconds. + setTimeout(function() { + map.removeLayer(Dispatches[CODE]); + }, 1200000); Dispatches[CODE].bindTooltip(`
                ${DISPATCH.dispatchMessage}
                #${DISPATCH.callId}
                `, { diff --git a/ui/dashboard.html b/ui/dashboard.html index 000c8f22..a73f3a34 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -977,8 +977,6 @@
                Submit
                - - From 0445f04f74d466583eee8a3be6ae9e84ce47429d Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Sat, 11 Feb 2023 12:55:59 +0100 Subject: [PATCH 028/381] Fixed civilians involved --- ui/app.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ui/app.js b/ui/app.js index a6185167..ab11fef0 100644 --- a/ui/app.js +++ b/ui/app.js @@ -2520,12 +2520,12 @@ $(document).ready(() => { }); $(".reports-civilians-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - civilians.push($(this).text()); - } - }); + .find("div") + .each(function () { + if ($(this).text() != "") { + civilians.push($(this).text()); + } + }); let time = new Date(); @@ -4904,6 +4904,14 @@ $(document).ready(() => { `
                ${value}
                ` ); }); + + $(".reports-civilians-tags-holder").empty(); + $.each(table["civsinvolved"], function (index, value) { + $(".reports-civilians-tags-holder").append( + `
                ${value}
                ` + ); + }); + } else if (eventData.type == "searchedVehicles") { } else if (eventData.type == "getVehicleData") { From 718267939edfd9d80a636a7a364e99f164f4290a Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Fri, 17 Feb 2023 14:34:08 +0100 Subject: [PATCH 029/381] job updates for qbcore --- client/main.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/main.lua b/client/main.lua index a9714e18..3c306a8d 100644 --- a/client/main.lua +++ b/client/main.lua @@ -40,6 +40,16 @@ end) RegisterNetEvent("QBCore:Client:SetDuty", function(job, state) if AllowedJob(job) then TriggerServerEvent("ps-mdt:server:ToggleDuty") + TriggerServerEvent('QBCore:ToggleDuty') + if PlayerData.job.name == "police" or PlayerData.job.type == "leo" then + TriggerServerEvent("police:server:UpdateCurrentCops") + end + if (PlayerData.job.name == "ambulance" or PlayerData.job.type == "ems") and job then + TriggerServerEvent('hospital:server:AddDoctor', 'ambulance') + elseif (PlayerData.job.name == "ambulance" or PlayerData.job.type == "ems") and not job then + TriggerServerEvent('hospital:server:RemoveDoctor', 'ambulance') + end + TriggerServerEvent("police:server:UpdateBlips") end end) From d020e8693e787e7f8cf0226349ce06e5a267bd92 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 18 Feb 2023 15:43:22 -0500 Subject: [PATCH 030/381] Added reskins links --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 4b65ff26..12842ab7 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,11 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl - **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. +# Reskins +The below repos are direct forks of ps-mdt and have been edited to fit certain countries/look. + +* [UK](https://github.com/Harraa/ps-mdt) + ## EchoRP MDT QBCore Edit (WIP) EchoRP MDT Released by Flawws#9999 from Echo RP rewritten and restructured for QBCore. From 69980b99db5fbbaeee9b056ed8776570abb6e159 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 18 Feb 2023 15:46:46 -0500 Subject: [PATCH 031/381] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 12842ab7..3cfca5fb 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl # Reskins The below repos are direct forks of ps-mdt and have been edited to fit certain countries/look. +* [US](https://github.com/OK1ez/ps-mdt/tree/OK1ez) Different layout and different colors. * [UK](https://github.com/Harraa/ps-mdt) ## EchoRP MDT QBCore Edit (WIP) From 79ada8e0bd3d74fde946b68974b43643de45b9c3 Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Mon, 20 Feb 2023 15:32:34 +0100 Subject: [PATCH 032/381] Correct reskin link The reskin link in the readme was going to the 'ok1ez' branch, which is only used for pull requests to the real 'ps-mdt'. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cfca5fb..f22221b0 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl # Reskins The below repos are direct forks of ps-mdt and have been edited to fit certain countries/look. -* [US](https://github.com/OK1ez/ps-mdt/tree/OK1ez) Different layout and different colors. +* [US](https://github.com/OK1ez/ps-mdt/tree/main) Different layout and different colors. * [UK](https://github.com/Harraa/ps-mdt) ## EchoRP MDT QBCore Edit (WIP) From e696a9b83378572bf30f84cec7c67cb56601e3cd Mon Sep 17 00:00:00 2001 From: nggcasey <60057103+nggcasey@users.noreply.github.com> Date: Sun, 26 Feb 2023 17:02:32 +1100 Subject: [PATCH 033/381] Added plate reader functions --- server/main.lua | 54 +++++++++++++++++++++++++++++++++++++++++++---- shared/config.lua | 3 ++- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/server/main.lua b/server/main.lua index a9b586dc..ce79e2ac 100644 --- a/server/main.lua +++ b/server/main.lua @@ -39,12 +39,35 @@ if Config.UseWolfknightRadar == true then AddEventHandler("wk:onPlateScanned", function(cam, plate, index) local src = source local Player = QBCore.Functions.GetPlayer(src) - local bolo = GetBoloStatus(plate) + local PlayerData = GetPlayerData(src) + local vehicleowner = GetVehicleOwner(plate) + local bolo, title, boloid = GetBoloStatus(plate, title, boloid) + local warrant, owner, incidentid = GetWarrantStatus(plate, owner, incidentid) + local driverslicense = PlayerData.metadata['licences'].driver + local driverunlicensed = nil + if bolo == true then - TriggerClientEvent("wk:togglePlateLock", src, cam, true, bolo) + TriggerClientEvent('QBCore:Notify', src, 'BOLO ID: '..boloid..' | Title: '..title..' | Registered Owner: '..vehicleowner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + end + if warrant == true then + TriggerClientEvent('QBCore:Notify', src, 'WANTED - INCIDENT ID: '..incidentid..' | Registered Owner: '..owner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + end + + if driverslicense == false then + driverunlicensed = true + if driverunlicensed == true then + TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleowner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + end end + + + if bolo or warrant or driverunlicensed == true then + TriggerClientEvent("wk:togglePlateLock", src, cam, true, 1) + end + end) end + RegisterNetEvent("ps-mdt:server:OnPlayerUnload", function() --// Delete player from the MDT on logout local src = source @@ -1434,15 +1457,29 @@ RegisterServerEvent("mdt:server:AddLog", function(text) AddLog(text) end) -function GetBoloStatus(plate) +function GetBoloStatus(plate, title, boloid) local result = MySQL.query.await("SELECT * FROM mdt_bolos where plate = @plate", {['@plate'] = plate}) if result and result[1] then - return true + local title = result[1]['title'] + local boloid = result[1]['id'] + return true, title, boloid end return false end +function GetWarrantStatus(plate, owner, incidentid) + local result = MySQL.query.await("SELECT p.plate, p.citizenid, m.id FROM player_vehicles p INNER JOIN mdt_convictions m ON p.citizenid = m.cid WHERE m.warrant =1 AND p.plate =?", {plate}) + if result and result[1] then + local citizenid = result[1]['citizenid'] + local Player = QBCore.Functions.GetPlayerByCitizenId(citizenid) + local owner = Player.PlayerData.charinfo.firstname.." "..Player.PlayerData.charinfo.lastname + local incidentid = result[1]['id'] + return true, owner, incidentid + end + return false +end + function GetVehicleInformation(plate) local result = MySQL.query.await('SELECT * FROM mdt_vehicleinfo WHERE plate = @plate', {['@plate'] = plate}) if result[1] then @@ -1452,3 +1489,12 @@ function GetVehicleInformation(plate) end end +function GetVehicleOwner(plate, owner) + local result = MySQL.query.await('SELECT plate, citizenid, id FROM player_vehicles WHERE plate = @plate', {['@plate'] = plate}) + if result and result[1] then + local citizenid = result[1]['citizenid'] + local Player = QBCore.Functions.GetPlayerByCitizenId(citizenid) + local owner = Player.PlayerData.charinfo.firstname.." "..Player.PlayerData.charinfo.lastname + return owner + end +end diff --git a/shared/config.lua b/shared/config.lua index 1fbfa353..031eaf82 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -8,7 +8,8 @@ Config.RosterLink = { } -Config.UseWolfknightRadar = false +Config.UseWolfknightRadar = true +Config.WolfknightNotifyTime = 5000 --How long the notification displays for in miliseconds (30000 = 30 seconds) --[[ Adds support for Wraith ARS 2X by WolfKnight98 (wk_wars2x) https://github.com/WolfKnight98/wk_wars2x From 67a4f19f0943a605e9243a4d9e2d572aceef5642 Mon Sep 17 00:00:00 2001 From: nggcasey <60057103+nggcasey@users.noreply.github.com> Date: Sun, 26 Feb 2023 17:10:13 +1100 Subject: [PATCH 034/381] Set default to Config.UseWolfknightRadar = false --- shared/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/config.lua b/shared/config.lua index 031eaf82..1c34b239 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -8,7 +8,7 @@ Config.RosterLink = { } -Config.UseWolfknightRadar = true +Config.UseWolfknightRadar = false Config.WolfknightNotifyTime = 5000 --How long the notification displays for in miliseconds (30000 = 30 seconds) --[[ Adds support for Wraith ARS 2X by WolfKnight98 (wk_wars2x) From d1c5f48c33fa1906d739d4ed5e080a92c7fccf28 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Sun, 26 Feb 2023 12:14:06 -0800 Subject: [PATCH 035/381] add incidents to profile screen --- server/dbm.lua | 4 ++-- server/main.lua | 15 ++++++++++++++ ui/app.js | 53 ++++++++++++++++++++++++++++++++++++++++------- ui/dashboard.html | 6 ++++-- ui/style.css | 45 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+), 12 deletions(-) diff --git a/server/dbm.lua b/server/dbm.lua index d69444b0..002ef9dd 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -44,10 +44,10 @@ function GetPfpFingerPrintInformation(cid) return result[1] end --- idk but I guess sure? function GetIncidentName(id) -- Should also be a scalar - return MySQL.query.await('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) + local result = MySQL.query.await('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) + return result[1] -- return exports.oxmysql:executeSync('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) end diff --git a/server/main.lua b/server/main.lua index a9b586dc..23f97997 100644 --- a/server/main.lua +++ b/server/main.lua @@ -258,11 +258,22 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb if Config.PoliceJobs[JobName] or Config.DojJobs[JobName] then local convictions = GetConvictions({person.cid}) + local incidents = {} person.convictions2 = {} local convCount = 1 if next(convictions) then for _, conv in pairs(convictions) do if conv.warrant then person.warrant = true end + + -- Get the incident details + local id = conv.linkedincident + local incident = GetIncidentName(id) + incidents[#incidents + 1] = { + id = id, + title = incident.title, + time = conv.time + } + local charges = json.decode(conv.charges) for _, charge in pairs(charges) do person.convictions2[convCount] = charge @@ -270,6 +281,9 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb end end end + + person.incidents = incidents + local hash = {} person.convictions = {} @@ -279,6 +293,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb hash[v] = true end end + local vehicles = GetPlayerVehicles(person.cid) if vehicles then diff --git a/ui/app.js b/ui/app.js index ab11fef0..16f0ee38 100644 --- a/ui/app.js +++ b/ui/app.js @@ -194,17 +194,19 @@ $(document).ready(() => { $(".manage-profile-fingerprint").removeAttr("disabled"); $(".manage-profile-pic").attr("src", result["profilepic"] ?? "img/male.png"); - const { vehicles, tags, gallery, convictions, properties } = result + const { vehicles, tags, gallery, convictions, incidents, properties } = result $(".licenses-holder").empty(); $(".tags-holder").empty(); $(".vehs-holder").empty(); $(".gallery-inner-container").empty(); $(".convictions-holder").empty(); + $(".profile-incidents-holder").empty(); let licencesHTML = '
                No Licenses
                '; let tagsHTML = '
                No Tags
                '; - let convHTML = '
                Clean Record ?
                '; + let convHTML = '
                Clean Record
                '; + let incidentsHTML = '
                No Incidents
                '; let vehHTML = '
                No Vehicles
                '; let galleryHTML = '
                No Photos
                '; let propertyHTML = '
                No Properties
                '; @@ -218,25 +220,43 @@ $(document).ready(() => { } if (licenses.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { - licencesHTML = ''; - for (const [lic, hasLic] of licenses) { + licencesHTML = ''; + for (const [lic, hasLic] of licenses) { + let tagColour = hasLic == true ? "green-tag" : "red-tag"; + licencesHTML += `${titleCase(lic)}`; + } - let tagColour = hasLic == true ? "green-tag" : "red-tag"; - licencesHTML += `${titleCase(lic)}`; - } if (vehicles && vehicles.length > 0) { - vehHTML = ''; vehicles.forEach(value => { vehHTML += `
                ${value.plate} - ${value.model}
                ` }) } + if (convictions && convictions.length > 0) { convHTML = ''; convictions.forEach(value => { convHTML += `
                ${value}
                `; }) } + + if (incidents && incidents.length > 0) { + incidentsHTML=''; + // Sort incidents so most recent appear first + const sortedIncidents = incidents.sort((a,b) => b.time - a.time); + sortedIncidents.forEach(value => { + incidentsHTML += `
                +
                +
                ${value.id}
                +
                + ${value.title} +
                ${getFormattedDate(new Date(Number(value.time)))}
                +
                +
                +
                ` + }) + } + if (properties && properties.length > 0) { propertyHTML = ''; properties.forEach(value => { @@ -244,6 +264,7 @@ $(document).ready(() => { }) } } + if (tags && tags.length > 0) { tagsHTML = ''; tags.forEach((tag) => { @@ -271,6 +292,7 @@ $(document).ready(() => { $(".licenses-holder").html(licencesHTML); $(".tags-holder").html(tagsHTML); $(".convictions-holder").html(convHTML); + $(".profile-incidents-holder").html(incidentsHTML); $(".vehs-holder").html(vehHTML); $(".gallery-inner-container").html(galleryHTML); $(".houses-holder").html(propertyHTML); @@ -2115,6 +2137,20 @@ $(document).ready(() => { ]; openContextMenu(e, args); }); + + $(".profile-incidents-holder").on("contextmenu", ".white-tag", function (e) { + const args = [ + { + className: "view-incident", + icon: "fas fa-search", + text: "View Incident", + info: $(this).data("id"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + $(".reports-search-title").click(function () { if (canSearchReports == true) { if ($(".reports-search-input").css("display") == "none") { @@ -4015,6 +4051,7 @@ $(document).ready(() => { if (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined) { $(".manage-profile-licenses-container").removeClass("display_hidden"); $(".manage-convictions-container").removeClass("display_hidden"); + $(".manage-profile-incidents-container").removeClass("display_hidden"); $(".manage-profile-vehs-container").removeClass("display_hidden"); $(".manage-profile-houses-container").removeClass("display_hidden"); } diff --git a/ui/dashboard.html b/ui/dashboard.html index a73f3a34..6513edc1 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -317,13 +317,15 @@
                - -
                Known Convictions
                +
                +
                Incidents
                +
                +
                diff --git a/ui/style.css b/ui/style.css index 290c55bb..55df5872 100644 --- a/ui/style.css +++ b/ui/style.css @@ -1571,6 +1571,51 @@ span.tag-input[contenteditable]:empty::before { user-select: none; } +.manage-profile-incidents-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + max-height: 200px; + overflow: scroll; +} + +.profile-incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.profile-incidents-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + user-select: none; +} + +.incident-number { + padding-right: 8px; +} + +.incident-timestamp { + color: #303030; + font-size: 10px; + font-weight: 500; +} + .loader { position: absolute; left: 50%; From 3fba67f6bf06b74fa92be3ecb756ae78498514d1 Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:51:42 -0500 Subject: [PATCH 036/381] Adding departments to app.js --- ui/app.js | 799 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 635 insertions(+), 164 deletions(-) diff --git a/ui/app.js b/ui/app.js index ab11fef0..19a5c022 100644 --- a/ui/app.js +++ b/ui/app.js @@ -29,6 +29,13 @@ let impoundChanged = false; // TEMP CONFIG OF JOBS const PoliceJobs = { ['police']: true, + ['lspd']: true, + ['bcso']: true, + ['sast']: true, + ['sasp']: true, + ['sapr']: true, + ['doc']: true, + ['lssd']: true, } const AmbulanceJobs = { @@ -2520,12 +2527,12 @@ $(document).ready(() => { }); $(".reports-civilians-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - civilians.push($(this).text()); - } - }); + .find("div") + .each(function () { + if ($(this).text() != "") { + civilians.push($(this).text()); + } + }); let time = new Date(); @@ -3746,49 +3753,50 @@ $(document).ready(() => { function JobColors(sentJob) { if (sentJob) { - if (PoliceJobs[sentJob] !== undefined) { + if (PoliceJobs[sentJob] !== undefined) { + if (sentJob == "police") { document.documentElement.style.setProperty( - "--color-1", + "--color-1", /* Panels */ "#1E3955" ); document.documentElement.style.setProperty( - "--color-2", + "--color-2", /* Clock */ "#213F5F" ); document.documentElement.style.setProperty( - "--color-3", + "--color-3", /* Outlines and hover */ "#2C537B" ); document.documentElement.style.setProperty( - "--color-4", + "--color-4", /* Button Base */ "#23405E" ); document.documentElement.style.setProperty( - "--color-5", + "--color-5", /* interactables */ "#152638" ); document.documentElement.style.setProperty( - "--color-6", + "--color-6", /* context text box? */ "#121f2c" ); document.documentElement.style.setProperty( - "--color-7", + "--color-7", /* Dispatch Msg box */ "rgb(28, 54, 82)" ); document.documentElement.style.setProperty( - "--color-8", + "--color-8", /* ? */ /* ? */ "#2554cc" ); document.documentElement.style.setProperty( - "--color-9", + "--color-9", /* backround */ "#6E707C" ); document.documentElement.style.setProperty( - "--color-10", - "#8f741b" + "--color-10", /* Refresh button */ + "#8F741B" ); - $(".badge-logo").attr("src", "img/sasp_badge.webp"); - $(".header-title").html("SAN ANDREAS STATE POLICE"); + $(".badge-logo").attr("src", "img/LSPD.webp"); + $(".header-title").html("LOS SANTOS POLICE"); $(".bolo-nav-item").html("BOLOs"); $(".bolos-search-title").html("Bolos"); $("#bolos-search-input").attr("placeholder", "Search Bolo..."); @@ -3842,7 +3850,584 @@ $(document).ready(() => { $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); $(".manage-incidents-title ").css("margin-right", "0px") $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); - } else if (AmbulanceJobs[sentJob] !== undefined) { + } else if (sentJob == "sasp") { + document.documentElement.style.setProperty( + "--color-1", /* Panels */ + "#423f39" + ); + document.documentElement.style.setProperty( + "--color-2", /* Clock */ + "#8f7c3f" + ); + document.documentElement.style.setProperty( + "--color-3", /* Outlines and hover */ + "#16537e" + ); + document.documentElement.style.setProperty( + "--color-4", /* Button Base */ + "#8f7c3f" + ); + document.documentElement.style.setProperty( + "--color-5", /* interactables */ + "#0f3a58" + ); + document.documentElement.style.setProperty( + "--color-6", /* context text box? */ + "#121f2c" + ); + document.documentElement.style.setProperty( + "--color-7", /* Dispatch Msg box */ + "#0f3a58" + ); + document.documentElement.style.setProperty( + "--color-8", /* ? */ /* ? */ + "#2554cc" + ); + document.documentElement.style.setProperty( + "--color-9", /* backround */ + "#9c9485" + ); + document.documentElement.style.setProperty( + "--color-10", /* Refresh button */ + "#8F741B" + ); + $(".badge-logo").attr("src", "img/sasp_badge.webp"); + $(".header-title").html("SAN ANDREAS STATE POLICE"); + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (sentJob == "sast") { + document.documentElement.style.setProperty( + "--color-1", /* Panels */ + "#2c2c2c" + ); + document.documentElement.style.setProperty( + "--color-2", /* Clock */ + "#232323" + ); + document.documentElement.style.setProperty( + "--color-3", /* Outlines and hover */ + "#16537e" + ); + document.documentElement.style.setProperty( + "--color-4", /* Button Base */ + "#1c1c1c" + ); + document.documentElement.style.setProperty( + "--color-5", /* interactables */ + "#232323" + ); + document.documentElement.style.setProperty( + "--color-6", /* context text box? */ + "#121f2c" + ); + document.documentElement.style.setProperty( + "--color-7", /* Dispatch Msg box */ + "#232323" + ); + document.documentElement.style.setProperty( + "--color-8", /* ? */ /* ? */ + "#2554cc" + ); + document.documentElement.style.setProperty( + "--color-9", /* backround */ + "#bcbcbc" + ); + document.documentElement.style.setProperty( + "--color-10", /* Refresh button */ + "#8F741B" + ); + $(".badge-logo").attr("src", "img/sast_badge.webp"); + $(".header-title").html("SAN ANDREAS STATE TROOPERS"); + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (sentJob == "bcso") { + document.documentElement.style.setProperty( + "--color-1", /* Panels */ + "#333333" + ); + document.documentElement.style.setProperty( + "--color-2", /* Clock */ + "#57471a" + ); + document.documentElement.style.setProperty( + "--color-3", /* Outlines and hover */ + "#614f1d" + ); + document.documentElement.style.setProperty( + "--color-4", /* Button Base */ + "#594b27" + ); + document.documentElement.style.setProperty( + "--color-5", /* interactables */ + "#4d3f17" + ); + document.documentElement.style.setProperty( + "--color-6", /* context text box? */ + "#433714" + ); + document.documentElement.style.setProperty( + "--color-7", /* Dispatch Msg box */ + "#57471a" + ); + document.documentElement.style.setProperty( + "--color-8", /* ? */ /* ? no idea */ + "#2554cc" + ); + document.documentElement.style.setProperty( + "--color-9", /* backround */ + "#6E707C" + ); + document.documentElement.style.setProperty( + "--color-10", /* Refresh button */ + "#8F741B" + ); + $(".badge-logo").attr("src", "img/BCSO.webp"); + $(".header-title").html("BLAINE COUNTY SHERIFF OFFICE"); + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (sentJob == "sapr") { + document.documentElement.style.setProperty( + "--color-1", /* Panels */ + "#3b4c3a" + ); + document.documentElement.style.setProperty( + "--color-2", /* Clock */ + "#57471a" + ); + document.documentElement.style.setProperty( + "--color-3", /* Outlines and hover */ + "#614f1d" + ); + document.documentElement.style.setProperty( + "--color-4", /* Button Base */ + "#594b27" + ); + document.documentElement.style.setProperty( + "--color-5", /* interactables */ + "#4d3f17" + ); + document.documentElement.style.setProperty( + "--color-6", /* context text box? */ + "#f1c232" + ); + document.documentElement.style.setProperty( + "--color-7", /* Dispatch Msg box */ + "#57471a" + ); + document.documentElement.style.setProperty( + "--color-8", /* ? */ /* ? no idea */ + "#2554cc" + ); + document.documentElement.style.setProperty( + "--color-9", /* backround */ + "#6E707C" + ); + document.documentElement.style.setProperty( + "--color-10", /* Refresh button */ + "#8F741B" + ); + $(".badge-logo").attr("src", "img/sapr.webp"); + $(".header-title").html("SAN ANDREAS PARK RANGERS"); + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (sentJob == "doc") { + document.documentElement.style.setProperty( + "--color-1", /* Panels */ + "#191919" + ); + document.documentElement.style.setProperty( + "--color-2", /* Clock */ + "#323232" + ); + document.documentElement.style.setProperty( + "--color-3", /* Outlines and hover */ + "#000000" + ); + document.documentElement.style.setProperty( + "--color-4", /* Button Base */ + "#666666" + ); + document.documentElement.style.setProperty( + "--color-5", /* interactables */ + "#46474f" + ); + document.documentElement.style.setProperty( + "--color-6", /* context text box? */ + "#f1c232" + ); + document.documentElement.style.setProperty( + "--color-7", /* Dispatch Msg box */ + "#666666" + ); + document.documentElement.style.setProperty( + "--color-8", /* ? */ /* ? no idea */ + "#2554cc" + ); + document.documentElement.style.setProperty( + "--color-9", /* backround */ + "#6E707C" + ); + document.documentElement.style.setProperty( + "--color-10", /* Refresh button */ + "#8F741B" + ); + $(".badge-logo").attr("src", "img/BBSP.webp"); + $(".header-title").html("DEPARTMENT OF CORRECTIONS"); + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (sentJob == "lssd") { + document.documentElement.style.setProperty( + "--color-1", /* Panels */ + "#3b4c3a" + ); + document.documentElement.style.setProperty( + "--color-2", /* Clock */ + "#8f7c3f" + ); + document.documentElement.style.setProperty( + "--color-3", /* Outlines and hover */ + "#8f7c3f" + ); + document.documentElement.style.setProperty( + "--color-4", /* Button Base */ + "#806f38" + ); + document.documentElement.style.setProperty( + "--color-5", /* interactables */ + "#4d3f17" + ); + document.documentElement.style.setProperty( + "--color-6", /* context text box? */ + "#f1c232" + ); + document.documentElement.style.setProperty( + "--color-7", /* Dispatch Msg box */ + "#57471a" + ); + document.documentElement.style.setProperty( + "--color-8", /* ? */ /* ? no idea */ + "#2554cc" + ); + document.documentElement.style.setProperty( + "--color-9", /* backround */ + "#6E707C" + ); + document.documentElement.style.setProperty( + "--color-10", /* Refresh button */ + "#8F741B" + ); + $(".badge-logo").attr("src", "img/LSSD.webp"); + $(".header-title").html("LOS SANTOS SHERIFF DEPARTMENT"); + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } + } if (AmbulanceJobs[sentJob] !== undefined) { $("#home-warrants-container").fadeOut(0); $("#home-reports-container").fadeIn(0); document.documentElement.style.setProperty( @@ -3866,7 +4451,7 @@ $(document).ready(() => { "#381515" ); document.documentElement.style.setProperty( - "--color-6", + "--color-6", /* context text box? */ "#2C1212" ); document.documentElement.style.setProperty( @@ -3874,7 +4459,7 @@ $(document).ready(() => { "#521C1C" ); document.documentElement.style.setProperty( - "--color-8", + "--color-8", /* ? */ "#CC2525" ); document.documentElement.style.setProperty( @@ -3961,7 +4546,7 @@ $(document).ready(() => { "#382815" ); document.documentElement.style.setProperty( - "--color-6", + "--color-6", /* context text box? */ "#2c2312" ); document.documentElement.style.setProperty( @@ -3969,7 +4554,7 @@ $(document).ready(() => { "rgb(82, 60, 28)" ); document.documentElement.style.setProperty( - "--color-8", + "--color-8", /* ? */ "#cc9225" ); $(".badge-logo").attr("src", "img/court.webp"); @@ -4079,9 +4664,11 @@ $(document).ready(() => { }); let policeCount = 0; + let saspCount = 0; + let bcsoCount = 0; let emsCount = 0; let dojCount = 0; - let fireCount = 0; + /* let fireCount = 0; */ let activeUnits = eventData.activeUnits; let cid = eventData.citizenid; @@ -4099,10 +4686,25 @@ $(document).ready(() => { let radioBack = unit.sig100 ? "#7b2c2c" : "var(--color-3)"; let radio = unit.radio ? unit.radio : "0"; let callSign = unit.callSign ? unit.callSign : "000"; - let activeInfoJob = `
                UNKNOWN
                `; + let activeInfoJob = `
                UNKNOWN
                `; if (PoliceJobs[unit.unitType] !== undefined) { - policeCount++; - activeInfoJob = `
                LSPD
                `; + if (unit.unitType == "police") { policeCount++; + activeInfoJob = `
                LSPD
                `; + } else if(unit.unitType == "bcso") { bcsoCount++; + activeInfoJob = `
                BCSO
                `; + } else if(unit.unitType == "lssd") { bcsoCount++; + activeInfoJob = `
                LSSD
                `; + } else if(unit.unitType == "sasp") { saspCount++; + activeInfoJob = `
                SASP
                `; + } else if(unit.unitType == "sast") { saspCount++; + activeInfoJob = `
                SAST
                `; + } else if(unit.unitType == "sapr") { saspCount++; + activeInfoJob = `
                SAPR
                `; + } else if(unit.unitType == "judge") { dojCount++; + activeInfoJob = `
                DOJ
                `; + } else if(unit.unitType == "doc") { dojCount++; + activeInfoJob = `
                DOC
                `; + } } else if (AmbulanceJobs[unit.unitType] !== undefined) { activeInfoJob = `
                Ambulance
                ` emsCount++; @@ -4111,7 +4713,7 @@ $(document).ready(() => { fireCount++; */ } else if (DojJobs[unit.unitType] !== undefined) { activeInfoJob = `
                DOJ
                ` - dojCount++; + dojCount++; } unitListHTML += ` @@ -4128,9 +4730,11 @@ $(document).ready(() => { $("#police-count").html(policeCount); + $("#sasp-count").html(saspCount); + $("#bcso-count").html(bcsoCount); $("#ems-count").html(emsCount); $("#doj-count").html(dojCount); - $("#fire-count").html(fireCount); + /* $("#fire-count").html(fireCount); */ /* } else if (eventData.type == "bulletin") { $(".bulletin-items-continer").empty(); $.each(eventData.data, function (index, value) { @@ -4904,14 +5508,6 @@ $(document).ready(() => { `
                ${value}
                ` ); }); - - $(".reports-civilians-tags-holder").empty(); - $.each(table["civsinvolved"], function (index, value) { - $(".reports-civilians-tags-holder").append( - `
                ${value}
                ` - ); - }); - } else if (eventData.type == "searchedVehicles") { } else if (eventData.type == "getVehicleData") { @@ -5373,128 +5969,3 @@ window.addEventListener("load", function () { } }); }); - - - // Dispatch Map // -customcrs = L.extend({}, L.CRS.Simple, { - projection: L.Projection.LonLat, - scale: function(zoom) { - - return Math.pow(2, zoom); - }, - zoom: function(sc) { - - return Math.log(sc) / 0.6931471805599453; - }, - distance: function(pos1, pos2) { - var x_difference = pos2.lng - pos1.lng; - var y_difference = pos2.lat - pos1.lat; - return Math.sqrt(x_difference * x_difference + y_difference * y_difference); - }, - transformation: new L.Transformation(0.02072, 117.3, -0.0205, 172.8), - infinite: false -}); - -var map = L.map("map-item", { -crs: customcrs, -minZoom: 3, -maxZoom: 5, -zoom: 5, - -noWrap: true, -continuousWorld: false, -preferCanvas: true, - -center: [0, -1024], -maxBoundsViscosity: 1.0 -}); - -var customImageUrl = 'https://i1.lensdump.com/i/gj7atT.png'; - -var sw = map.unproject([0, 1024], 3 - 1); -var ne = map.unproject([1024, 0], 3 - 1); -var mapbounds = new L.LatLngBounds(sw, ne); -map.setView([-300, -1500], 4); -map.setMaxBounds(mapbounds); - - -map.attributionControl.setPrefix(false) - -L.imageOverlay(customImageUrl, mapbounds).addTo(map); - -map.on('dragend', function() { - if (!mapbounds.contains(map.getCenter())) { - map.panTo(mapbounds.getCenter(), { animate: false }); - } -}); - -var Dispatches = {}; -var DispatchPing = L.divIcon({ - html: '', - iconSize: [20, 20], - className: 'map-icon map-icon-ping', - offset: [-10, 0] -}); -var mapMarkers = L.layerGroup(); - -function DispatchMAP(DISPATCH) { - var MIN = Math.round(Math.round((new Date() - new Date(DISPATCH.time)) / 1000) / 60); - if (MIN > 10) return; - - var COORDS_X = DISPATCH.origin.x - var COORDS_Y = DISPATCH.origin.y - var CODE = DISPATCH.callId - - Dispatches[CODE] = L.marker([COORDS_Y, COORDS_X], { icon: DispatchPing }); - Dispatches[CODE].addTo(map); - - // Automatic deletion after a period of 20 minutes, equivalent to 1200000 milliseconds. - setTimeout(function() { - map.removeLayer(Dispatches[CODE]); - }, 1200000); - - Dispatches[CODE].bindTooltip(`
                ${DISPATCH.dispatchMessage}
                #${DISPATCH.callId}
                `, - { - direction: 'top', - permanent: false, - offset: [0, -10], - opacity: 1, - interactive: true, - className: 'map-tooltip' - }); - - Dispatches[CODE].addTo(mapMarkers); - - Dispatches[CODE].on('click', function() { - const callId = CODE - $.post( - `https://${GetParentResourceName()}/setWaypoint`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - Dispatches[CODE].on('contextmenu', function() { - map.removeLayer(Dispatches[CODE]); - }); - -} - -function ClearMap() { -$(".leaflet-popup-pane").empty(); -$(".leaflet-marker-pane").empty(); -} - -$(".map-clear").on('click', function() { - $(".map-clear").empty(); - $(".map-clear").prepend( - `` - ); - setTimeout(() => { - $(".map-clear").empty(); - $(".map-clear").html("Clear"); - ClearMap(); - }, 1500); -}); - From 0a08d43fcdcd42e0d60c7ed1bf87704f7c0cc657 Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:53:38 -0500 Subject: [PATCH 037/381] Adding Dept's to html --- ui/dashboard.html | 128 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 125 insertions(+), 3 deletions(-) diff --git a/ui/dashboard.html b/ui/dashboard.html index a73f3a34..32cd7fa9 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -15,6 +15,10 @@ + + + + @@ -26,7 +30,7 @@
                @@ -977,7 +985,121 @@
                Submit
                - + + + From dd2e6ce219036bc074df6f72c0366b07907426fe Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:54:14 -0500 Subject: [PATCH 038/381] adding Dept's to css --- ui/style.css | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/ui/style.css b/ui/style.css index 290c55bb..2192bd66 100644 --- a/ui/style.css +++ b/ui/style.css @@ -572,6 +572,14 @@ span.bulletin-item-info[contenteditable]:empty::before { background-color: #093095; } +#sasp-count { + background-color: #2589cc; +} + +#bcso-count { + background-color: #cc7e25; +} + #ems-count { background-color: #950909; } @@ -6529,7 +6537,6 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { background-color: #8f1b1b; margin: auto; margin-left: 5px; - margin-right: 10px; margin-top: 10px; margin-bottom: 0px; color: white; @@ -6542,6 +6549,28 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { background-color: #aa1c1c; } +.map-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.map-save:hover { + background-color: #1caa28; +} + + .map-title { background-color: var(--color-4); color: white; @@ -6553,8 +6582,6 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { margin: auto; margin-top: 10px; margin-bottom: 0px; - margin-left: 10px; - margin-right: 5px; width: 98%; align-items: center; user-select: none; @@ -6563,11 +6590,16 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { .map-item { border: 2px solid var(--color-3); position: absolute; + width: 58%; height: 86%; + left: 40.6%; top: 10.5%; + margin-bottom: 15px; + + } .leaflet-marker-pane { @@ -6580,4 +6612,4 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { .leaflet-tooltip-right { margin-left: 6px; -} \ No newline at end of file +} From a44793e5b20274fd3aa0a22f892ed50f900d4741 Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:57:03 -0500 Subject: [PATCH 039/381] adding Dept to config --- shared/config.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shared/config.lua b/shared/config.lua index 1fbfa353..cfafe892 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -5,6 +5,11 @@ Config.RosterLink = { ['ambulance'] = '', ['bcso'] = '', ['doj'] = '', + ['sast'] = '', + ['sasp'] = '', + ['doc'] = '', + ['lssd'] = '', + ['sapr'] = '', } @@ -244,6 +249,7 @@ Config.PoliceJobs = { ['sast'] = true, ['sasp'] = true, ['doc'] = true, + ['lssd'] = true, ['sapr'] = true, ['pa'] = true -- yucky } From 98b56a9bb4bd6294b96e8c06b65543f59d22e4ee Mon Sep 17 00:00:00 2001 From: Jacob Bernard Allen Date: Mon, 27 Feb 2023 19:04:42 -0500 Subject: [PATCH 040/381] adding roster perms to config --- shared/config.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/shared/config.lua b/shared/config.lua index cfafe892..b28d38a6 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -284,6 +284,24 @@ Config.LogPerms = { ['police'] = { [4] = true, }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, } Config.ColorNames = { From 95a9755e8d614061c99b8f10987846eb6c015ea1 Mon Sep 17 00:00:00 2001 From: Jacob Bernard Allen Date: Mon, 27 Feb 2023 19:10:05 -0500 Subject: [PATCH 041/381] img add --- ui/img/BBSP.webp | Bin 0 -> 13456 bytes ui/img/BCSO.webp | Bin 0 -> 16756 bytes ui/img/LSPD.webp | Bin 0 -> 18578 bytes ui/img/LSSD.webp | Bin 0 -> 18046 bytes ui/img/sapr.webp | Bin 0 -> 17154 bytes ui/img/sast_badge.webp | Bin 0 -> 16334 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 ui/img/BBSP.webp create mode 100644 ui/img/BCSO.webp create mode 100644 ui/img/LSPD.webp create mode 100644 ui/img/LSSD.webp create mode 100644 ui/img/sapr.webp create mode 100644 ui/img/sast_badge.webp diff --git a/ui/img/BBSP.webp b/ui/img/BBSP.webp new file mode 100644 index 0000000000000000000000000000000000000000..c17bcee70fff94c9e4957a380a06eab3137cf1d5 GIT binary patch literal 13456 zcmYM5b8IHS8t!Y`wr$(CZEI_{Tidp=wXLnU?bfz!Kj1Lp(z?uD4{L1zZZBCnpu@GAyh~ zjT}6m83P&Lr@b_P;W4m3Q23cE-PD1MfXj>){LY9y#&XA2!!xK3X;^&GyPJVt0lXC`_C4JnWMmV>VgX?S_Ld?7y&$MI3WSzxqF~ zDmgPSSTEaOpZk8n7J2X#p(mE!W}6GwCwm90Qr+je&9c70<0ze%d2z)^bO9DU6D7F% z{nT(E)6jJLe{gXBOm<>jOUlG0p1KM$Fj4?{~q4n63@rI72UnBH}DURB6x zuH9;4D=ag=7!`UZHl_HwCWO~12jGEu2sX^0wU2{b(PZ~Tr84b;D$rxYLbHU~I+QTe zQE>vR9ZZNWuLS~iz0R$tPJ`YaZHIoRjZo%S0lmW5iy{s2ytSaX+%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HY^m#SD%B literal 0 HcmV?d00001 diff --git a/ui/img/LSSD.webp b/ui/img/LSSD.webp new file mode 100644 index 0000000000000000000000000000000000000000..bff08684ea98e77f03ef9b002fc329ac43c6d8fd GIT binary patch literal 18046 zcmV(}K+wNZNk&F?MgRa;MM6+kP&il$0000O0002L006rH06|PpNRJNy00F?p{}(B{ z)&6U(IcaX1)J*F8)V6KgZm&_L=Cx|u%v0O8jnueFYKODd`oB0cvuF0~GY?-x#021f zJxkBm^XuT=PO;H`(BAGpKdM1`H^rP^b2C`)W;l|(5z?~>rhbc@vIMkOGi=Lro(${N z1a~r$V`hf*W{Q=Q$>8r`y_w-GIvIRcA-$Mj#OF+s$qit=m|-NHB%RkndoV%YON@TW zALobmUW&~bZ0P(8toIV!PHz1-N&9FX2hG3z*Hvn1Do z^-Q9sTEnmCY|(isOx09+98pt2Lw$kKO7gq;&`?xWdK6Vf|CyKF_OSEseVql9AKZWO z(L1g*JNm0?&!MIO1}(AMsgHg&oNJ*z3(zZ0ElT1AtnIk+5WuOCbGY~M-*a& zyR(0N^yPaj06 zxRadx*nV>XFd4|i0IYcKIFcU8QfD~HZ!cZf0F!}A46tqQBN>tG!VD+*?4DBtCIgZI zgZ6%rq$j&JJ;}EZm<})*a8#iCyhcVOyE}sXaQ~kGHn4~RTRuxhumU5<(Ypew1Bd~O z-b6;QBE!jhR|RaK5XDr-O=LPNG=h2hj8GjA3|RXm(pj-iey}ZI1AsyQMS8Mwvrb+- zJxnT26iYrqIx9Jn@2w4Jr75uYkMv|kXPtQ@U=?Ptvq@)#2YLN4SY;VTJj4igGQ12C zonSg&UkFxFhQ&YN6m~EpNoJ>#WO}rZtn=%Qp;ASLjlXA|?T;Y&-bv>&I}^P3FK>~I z$hOg$`#_~~#ISSF+3s|bpPaScbhv@usrLpATK)KUNP4!5PL6~~#fV~G(%I&8G9TV; zMgXgl*%> zhnf64M5@H_b28Xo4^BC6F+fZNvwp_xRFdmK#RQn=r0+;?4>R~@s8okxH!|4Pbn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djCAl^o@05J4*jhW$)bwr z>sX}9zdht(X2f$AoSQ&MsOr^XUhE}%kb$Y5E<4`6b6Xl9{o0=JJCA)nS^gvq0I)or z1KRH}yDg`>o176VbjamAwd%3f*|Yge&drv!^4lMtTN%hJY9VFcAP8Oc?yO-vGk? p|1y;QZ&NF{gKcsX$YPt^0P@B_!G7qk23IpvkT%;44GcE6{{XJwq&xrs literal 0 HcmV?d00001 diff --git a/ui/img/sapr.webp b/ui/img/sapr.webp new file mode 100644 index 0000000000000000000000000000000000000000..b257b5c3bcf731b30c517df574d1be00567d0724 GIT binary patch literal 17154 zcmV(*K;FMnNk&HcLI40)MM6+kP&il$0000O0002L006rH06|PpNR|o!00HnuTiY>7 z+O}=`eq@$yvu)e9?Y?ZIZQHhO+qPY{k*LaJ-?twb5qZXWMjXE*VggXhMO6g}uV}B5 zY9hdhwN~j4XqpMI=|l6HmVEc`UXVolXJpBD$3YWJu|L`7?iTr!LXt~>=NQ@Ejr$@b zmty!ddI=h@fF{`JIh9jhhmc$d_#eH5bM^>matUx-89Gl(uz;gk-r2Mf zG_e$8rqaqV^1W`5q!Qq6MpkG%6Pi?tUz1*mbLke)gi?%}L}SIqk9$LsNq`4w?4a=s zgk%ahhR%*Umv4uVNQ$vjXdPnYN8KSwB*24=%+PplA}NlfdlpXL2_bi><{lh>zGY?qrC=^I-@E8 z&~M`-E`EOjOL~ma%$Y+si_ute`J{*cyZiV?08o{BA*uqP%ld!4|A%I_w`k_fySqhm zwx9LRCHoEs09C1dq6z@xe|_yott9Eu+*x3^Xly_2sZ)3820&D5nks4ricOVu-JEsOBFQP&Z_}kl2yhe0=&Yx1Mz(DRtqD+UxPZpG+s129GX?*yL&l#6 zLu!Y<$XIWj2O=P2QOQJAMT2C6fK8g{^~HD-1euBo08#0PC`xNKQ2dXUk((9EJtO19 z(a=l;K);dw0Z3&6tbM{A4_t9bHw5i)2q83}$GeQ#)MzIUMW>LVHURrR{L9=44<7(% zB?27R%=YiBiOkoSMbDyb_WK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+Mj^tOTDr<^hq1O42$Q8w#u`tK1CYqRGh44#s z&n|7Ma_))rDlcKG6v+et^V@t^=k*?Ohjyk%2rm}MoZ>BzB|5ugV>S?n@8@mPo##Ci zs9gE27Yn98D(0?K8jf@J#PB>^k{ zTvC!62ObNBmv#R!)qi6^{xK6U2oTagH~lAzP_X}r zcm2ozDf<8PpZ@>r_68QV&h)k>&O~hVjPy)E;6OlekU(JnA{d!j7=iQtZ)A|X|DUPv nUmNIux$7T;|CihT@qY@)zx*KolR=S-^B?^;8xtere_H<^yfmQt literal 0 HcmV?d00001 From 50ae9e52b7461f279aca0196a1720a3366d42f8a Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:46:57 -0500 Subject: [PATCH 042/381] README UPDATE --- README.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f22221b0..896c18e9 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,20 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl * Restart your server. # Preview -![image](https://user-images.githubusercontent.com/82112471/217596976-5147fefa-24e2-4b98-b167-4e151b8a9a8c.png) -![image](https://user-images.githubusercontent.com/82112471/217597024-2c1493fc-4439-4b56-abbd-f9149e987b9e.png) -![image](https://user-images.githubusercontent.com/82112471/217597103-c271720a-4c1b-4a13-8e17-a27727cb0e95.png) -![image](https://user-images.githubusercontent.com/82112471/217597192-f9a63728-d2d0-4dfe-bd8b-373df1f9e969.png) -![image](https://user-images.githubusercontent.com/82112471/217597248-85d2d074-7fcd-4a54-ac57-8d1103047bc0.png) -![image](https://user-images.githubusercontent.com/82112471/217597338-aefcaed1-db9e-4b17-be45-3e0a66416b63.png) -![image](https://user-images.githubusercontent.com/82112471/217597379-d936fb8e-e33a-4817-8997-16447158afb8.png) -![image](https://user-images.githubusercontent.com/82112471/217597433-cd24bd41-a515-4fac-a896-807494501c39.png) +* LSPD +![image](https://i.imgur.com/2HmsTa3.png) +* BCSO +![image](https://i.imgur.com/9WVU0Kz.png) +* sasp +![image](https://i.imgur.com/6tLNVkb.png) +* sast +![image](https://i.imgur.com/G5b2vGU.png) +* sapr +![image](https://i.imgur.com/cu1ZsfW.png) +* lssd +![image](https://i.imgur.com/IsqZddu.png) +* doc +![image](https://i.imgur.com/lFi4jDH.png) ## FAQ - **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". @@ -32,6 +38,10 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl - **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. +- **How do i access the other police panels?** - Just add the names to your jobs.lua in the shared folder. + +- **If there are 7 diffrent departments why is there only 5 active unit counters?** - The counters are catagorized from left to right City, County, State, EMS and DOJ, this was done to keep the UI clean and becasue most aren't going to use all 7 departments. + # Reskins The below repos are direct forks of ps-mdt and have been edited to fit certain countries/look. From b466ae69bc569e882e4a0580ef33d89201aa611a Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:51:19 -0500 Subject: [PATCH 043/381] 1 --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 896c18e9..36125948 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,15 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl ![image](https://i.imgur.com/2HmsTa3.png) * BCSO ![image](https://i.imgur.com/9WVU0Kz.png) -* sasp +* SASP ![image](https://i.imgur.com/6tLNVkb.png) -* sast +* SAST ![image](https://i.imgur.com/G5b2vGU.png) -* sapr +* SAPR ![image](https://i.imgur.com/cu1ZsfW.png) -* lssd +* LSSD ![image](https://i.imgur.com/IsqZddu.png) -* doc +* DOC ![image](https://i.imgur.com/lFi4jDH.png) ## FAQ From d3953521f07ed1bfb811cdb445944d1a6c1df0ed Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:55:52 -0500 Subject: [PATCH 044/381] FAQ update From 7211fa6c54e40f72b9e6dfe5a686abf39e3b76d5 Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Mon, 27 Feb 2023 20:01:26 -0500 Subject: [PATCH 045/381] FAQ update2 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 36125948..4d19d82e 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl - **If there are 7 diffrent departments why is there only 5 active unit counters?** - The counters are catagorized from left to right City, County, State, EMS and DOJ, this was done to keep the UI clean and becasue most aren't going to use all 7 departments. +- **Why cant I see __X__ department panel?** - to see the each panel your job must be named correctly and are case sensitive, if you cant see the LSPD panel make sure your job is named police. The others are direct lower case versons of their names in the preview above. + # Reskins The below repos are direct forks of ps-mdt and have been edited to fit certain countries/look. From 5826d522e8430ef23d968c31918726b729c65c43 Mon Sep 17 00:00:00 2001 From: Jacob Bernard Allen Date: Wed, 1 Mar 2023 15:40:47 -0500 Subject: [PATCH 046/381] PR update updating fork to match main for PR --- README.md | 28 ++--- ui/app.js | 277 ++++++++++++++++++++++++++++++++++------------ ui/dashboard.html | 124 +-------------------- ui/style.css | 40 +------ 4 files changed, 219 insertions(+), 250 deletions(-) diff --git a/README.md b/README.md index 4d19d82e..f22221b0 100644 --- a/README.md +++ b/README.md @@ -16,20 +16,14 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl * Restart your server. # Preview -* LSPD -![image](https://i.imgur.com/2HmsTa3.png) -* BCSO -![image](https://i.imgur.com/9WVU0Kz.png) -* SASP -![image](https://i.imgur.com/6tLNVkb.png) -* SAST -![image](https://i.imgur.com/G5b2vGU.png) -* SAPR -![image](https://i.imgur.com/cu1ZsfW.png) -* LSSD -![image](https://i.imgur.com/IsqZddu.png) -* DOC -![image](https://i.imgur.com/lFi4jDH.png) +![image](https://user-images.githubusercontent.com/82112471/217596976-5147fefa-24e2-4b98-b167-4e151b8a9a8c.png) +![image](https://user-images.githubusercontent.com/82112471/217597024-2c1493fc-4439-4b56-abbd-f9149e987b9e.png) +![image](https://user-images.githubusercontent.com/82112471/217597103-c271720a-4c1b-4a13-8e17-a27727cb0e95.png) +![image](https://user-images.githubusercontent.com/82112471/217597192-f9a63728-d2d0-4dfe-bd8b-373df1f9e969.png) +![image](https://user-images.githubusercontent.com/82112471/217597248-85d2d074-7fcd-4a54-ac57-8d1103047bc0.png) +![image](https://user-images.githubusercontent.com/82112471/217597338-aefcaed1-db9e-4b17-be45-3e0a66416b63.png) +![image](https://user-images.githubusercontent.com/82112471/217597379-d936fb8e-e33a-4817-8997-16447158afb8.png) +![image](https://user-images.githubusercontent.com/82112471/217597433-cd24bd41-a515-4fac-a896-807494501c39.png) ## FAQ - **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". @@ -38,12 +32,6 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl - **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. -- **How do i access the other police panels?** - Just add the names to your jobs.lua in the shared folder. - -- **If there are 7 diffrent departments why is there only 5 active unit counters?** - The counters are catagorized from left to right City, County, State, EMS and DOJ, this was done to keep the UI clean and becasue most aren't going to use all 7 departments. - -- **Why cant I see __X__ department panel?** - to see the each panel your job must be named correctly and are case sensitive, if you cant see the LSPD panel make sure your job is named police. The others are direct lower case versons of their names in the preview above. - # Reskins The below repos are direct forks of ps-mdt and have been edited to fit certain countries/look. diff --git a/ui/app.js b/ui/app.js index 19a5c022..e9dd1844 100644 --- a/ui/app.js +++ b/ui/app.js @@ -2527,12 +2527,12 @@ $(document).ready(() => { }); $(".reports-civilians-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - civilians.push($(this).text()); - } - }); + .find("div") + .each(function () { + if ($(this).text() != "") { + civilians.push($(this).text()); + } + }); let time = new Date(); @@ -3890,62 +3890,62 @@ $(document).ready(() => { document.documentElement.style.setProperty( "--color-10", /* Refresh button */ "#8F741B" - ); - $(".badge-logo").attr("src", "img/sasp_badge.webp"); - $(".header-title").html("SAN ANDREAS STATE POLICE"); - $(".bolo-nav-item").html("BOLOs"); - $(".bolos-search-title").html("Bolos"); - $("#bolos-search-input").attr("placeholder", "Search Bolo..."); - $(".manage-bolos-title").html("Manage Bolo"); - $(".manage-bolos-editing-title").html( - "You are currently creating a new BOLO" - ); - $(".boloplate-title").html("Plate"); - $(".boloowner-title").html("Owner"); - $(".boloindividual-title").html("Individual"); - $("#boloplate").attr("placeholder", "Place plate here..."); - $("#bolodetail").attr( - "placeholder", - "Bolo detail goes here..." - ); - $("#boloowner").attr( - "placeholder", - "Place vehicle owner here..." - ); - $("#boloindividual").attr( - "placeholder", - "Place invidivual here..." - ); - $("#home-warrants-container").fadeIn(0); - $("#home-reports-container").fadeOut(0); - //$(".quote-span").html("TUCKER MALD, BEST MALD"); - $(".incidents-nav-item").show(); - $(".bolo-nav-item").show(); - $(".dmv-nav-item").show(); - $(".weapons-nav-item").show() - $(".cams-nav-item").show(); - $(".map-nav-item").show(); - $(".dispatch-title-ofsomesort").html("Dispatch"); - $(".dispatch-comms-container").fadeIn(0); - $(".manage-profile-name-input-1").attr("readonly", true); - $(".manage-profile-name-input-2").attr("readonly", true); - $("#reports-officers-involved-tag-title").html( - "Officers Involved" - ); - $(".roster-iframe").attr("src", rosterLink); - - $(".manage-profile-save").css("display", "block"); - $(".manage-profile-editing-title").css("display", "block"); - $(".manage-incidents-create").css("display", "block"); - $(".manage-incidents-save").css("display", "block"); - $(".manage-incidents-editing-title").css("display", "block"); - $(".manage-reports-new").css("display", "block"); - $(".manage-reports-save").css("display", "block"); - $(".manage-reports-editing-title").css("display", "block"); - $(".vehicle-information-save").css("display", "block"); - $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); - $(".manage-incidents-title ").css("margin-right", "0px") - $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + ); + $(".badge-logo").attr("src", "img/sasp_badge.webp"); + $(".header-title").html("SAN ANDREAS STATE POLICE"); + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); } else if (sentJob == "sast") { document.documentElement.style.setProperty( "--color-1", /* Panels */ @@ -4161,7 +4161,7 @@ $(document).ready(() => { ); document.documentElement.style.setProperty( "--color-6", /* context text box? */ - "#f1c232" + "#433714" ); document.documentElement.style.setProperty( "--color-7", /* Dispatch Msg box */ @@ -4257,7 +4257,7 @@ $(document).ready(() => { ); document.documentElement.style.setProperty( "--color-6", /* context text box? */ - "#f1c232" + "#191919" ); document.documentElement.style.setProperty( "--color-7", /* Dispatch Msg box */ @@ -4427,7 +4427,7 @@ $(document).ready(() => { $(".manage-incidents-title ").css("margin-right", "0px") $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); } - } if (AmbulanceJobs[sentJob] !== undefined) { + } else if (AmbulanceJobs[sentJob] !== undefined) { $("#home-warrants-container").fadeOut(0); $("#home-reports-container").fadeIn(0); document.documentElement.style.setProperty( @@ -4451,7 +4451,7 @@ $(document).ready(() => { "#381515" ); document.documentElement.style.setProperty( - "--color-6", /* context text box? */ + "--color-6", "#2C1212" ); document.documentElement.style.setProperty( @@ -4459,7 +4459,7 @@ $(document).ready(() => { "#521C1C" ); document.documentElement.style.setProperty( - "--color-8", /* ? */ + "--color-8", "#CC2525" ); document.documentElement.style.setProperty( @@ -4546,7 +4546,7 @@ $(document).ready(() => { "#382815" ); document.documentElement.style.setProperty( - "--color-6", /* context text box? */ + "--color-6", "#2c2312" ); document.documentElement.style.setProperty( @@ -4554,7 +4554,7 @@ $(document).ready(() => { "rgb(82, 60, 28)" ); document.documentElement.style.setProperty( - "--color-8", /* ? */ + "--color-8", "#cc9225" ); $(".badge-logo").attr("src", "img/court.webp"); @@ -4686,10 +4686,10 @@ $(document).ready(() => { let radioBack = unit.sig100 ? "#7b2c2c" : "var(--color-3)"; let radio = unit.radio ? unit.radio : "0"; let callSign = unit.callSign ? unit.callSign : "000"; - let activeInfoJob = `
                UNKNOWN
                `; + let activeInfoJob = `
                UNKNOWN
                `; if (PoliceJobs[unit.unitType] !== undefined) { if (unit.unitType == "police") { policeCount++; - activeInfoJob = `
                LSPD
                `; + activeInfoJob = `
                LSPD
                `; } else if(unit.unitType == "bcso") { bcsoCount++; activeInfoJob = `
                BCSO
                `; } else if(unit.unitType == "lssd") { bcsoCount++; @@ -4713,7 +4713,7 @@ $(document).ready(() => { fireCount++; */ } else if (DojJobs[unit.unitType] !== undefined) { activeInfoJob = `
                DOJ
                ` - dojCount++; + dojCount++; } unitListHTML += ` @@ -5508,6 +5508,14 @@ $(document).ready(() => { `
                ${value}
                ` ); }); + + $(".reports-civilians-tags-holder").empty(); + $.each(table["civsinvolved"], function (index, value) { + $(".reports-civilians-tags-holder").append( + `
                ${value}
                ` + ); + }); + } else if (eventData.type == "searchedVehicles") { } else if (eventData.type == "getVehicleData") { @@ -5969,3 +5977,128 @@ window.addEventListener("load", function () { } }); }); + + + // Dispatch Map // +customcrs = L.extend({}, L.CRS.Simple, { + projection: L.Projection.LonLat, + scale: function(zoom) { + + return Math.pow(2, zoom); + }, + zoom: function(sc) { + + return Math.log(sc) / 0.6931471805599453; + }, + distance: function(pos1, pos2) { + var x_difference = pos2.lng - pos1.lng; + var y_difference = pos2.lat - pos1.lat; + return Math.sqrt(x_difference * x_difference + y_difference * y_difference); + }, + transformation: new L.Transformation(0.02072, 117.3, -0.0205, 172.8), + infinite: false +}); + +var map = L.map("map-item", { +crs: customcrs, +minZoom: 3, +maxZoom: 5, +zoom: 5, + +noWrap: true, +continuousWorld: false, +preferCanvas: true, + +center: [0, -1024], +maxBoundsViscosity: 1.0 +}); + +var customImageUrl = 'https://i1.lensdump.com/i/gj7atT.png'; + +var sw = map.unproject([0, 1024], 3 - 1); +var ne = map.unproject([1024, 0], 3 - 1); +var mapbounds = new L.LatLngBounds(sw, ne); +map.setView([-300, -1500], 4); +map.setMaxBounds(mapbounds); + + +map.attributionControl.setPrefix(false) + +L.imageOverlay(customImageUrl, mapbounds).addTo(map); + +map.on('dragend', function() { + if (!mapbounds.contains(map.getCenter())) { + map.panTo(mapbounds.getCenter(), { animate: false }); + } +}); + +var Dispatches = {}; +var DispatchPing = L.divIcon({ + html: '', + iconSize: [20, 20], + className: 'map-icon map-icon-ping', + offset: [-10, 0] +}); +var mapMarkers = L.layerGroup(); + +function DispatchMAP(DISPATCH) { + var MIN = Math.round(Math.round((new Date() - new Date(DISPATCH.time)) / 1000) / 60); + if (MIN > 10) return; + + var COORDS_X = DISPATCH.origin.x + var COORDS_Y = DISPATCH.origin.y + var CODE = DISPATCH.callId + + Dispatches[CODE] = L.marker([COORDS_Y, COORDS_X], { icon: DispatchPing }); + Dispatches[CODE].addTo(map); + + // Automatic deletion after a period of 20 minutes, equivalent to 1200000 milliseconds. + setTimeout(function() { + map.removeLayer(Dispatches[CODE]); + }, 1200000); + + Dispatches[CODE].bindTooltip(`
                ${DISPATCH.dispatchMessage}
                #${DISPATCH.callId}
                `, + { + direction: 'top', + permanent: false, + offset: [0, -10], + opacity: 1, + interactive: true, + className: 'map-tooltip' + }); + + Dispatches[CODE].addTo(mapMarkers); + + Dispatches[CODE].on('click', function() { + const callId = CODE + $.post( + `https://${GetParentResourceName()}/setWaypoint`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + Dispatches[CODE].on('contextmenu', function() { + map.removeLayer(Dispatches[CODE]); + }); + +} + +function ClearMap() { +$(".leaflet-popup-pane").empty(); +$(".leaflet-marker-pane").empty(); +} + +$(".map-clear").on('click', function() { + $(".map-clear").empty(); + $(".map-clear").prepend( + `` + ); + setTimeout(() => { + $(".map-clear").empty(); + $(".map-clear").html("Clear"); + ClearMap(); + }, 1500); +}); + diff --git a/ui/dashboard.html b/ui/dashboard.html index 32cd7fa9..8425ebd0 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -15,10 +15,6 @@ - - - - @@ -30,7 +26,7 @@
                @@ -985,121 +979,7 @@
                Submit
                - - - + diff --git a/ui/style.css b/ui/style.css index 2192bd66..290c55bb 100644 --- a/ui/style.css +++ b/ui/style.css @@ -572,14 +572,6 @@ span.bulletin-item-info[contenteditable]:empty::before { background-color: #093095; } -#sasp-count { - background-color: #2589cc; -} - -#bcso-count { - background-color: #cc7e25; -} - #ems-count { background-color: #950909; } @@ -6537,6 +6529,7 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { background-color: #8f1b1b; margin: auto; margin-left: 5px; + margin-right: 10px; margin-top: 10px; margin-bottom: 0px; color: white; @@ -6549,28 +6542,6 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { background-color: #aa1c1c; } -.map-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.map-save:hover { - background-color: #1caa28; -} - - .map-title { background-color: var(--color-4); color: white; @@ -6582,6 +6553,8 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { margin: auto; margin-top: 10px; margin-bottom: 0px; + margin-left: 10px; + margin-right: 5px; width: 98%; align-items: center; user-select: none; @@ -6590,16 +6563,11 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { .map-item { border: 2px solid var(--color-3); position: absolute; - width: 58%; height: 86%; - left: 40.6%; top: 10.5%; - margin-bottom: 15px; - - } .leaflet-marker-pane { @@ -6612,4 +6580,4 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { .leaflet-tooltip-right { margin-left: 6px; -} +} \ No newline at end of file From f845cadb8a8e680fe0fe902965f2bf5c3e174eef Mon Sep 17 00:00:00 2001 From: Crayons <69732173+Crayons0814@users.noreply.github.com> Date: Thu, 2 Mar 2023 20:49:15 -0500 Subject: [PATCH 047/381] unit count bug fix --- ui/style.css | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/style.css b/ui/style.css index 55df5872..2a099c32 100644 --- a/ui/style.css +++ b/ui/style.css @@ -572,6 +572,14 @@ span.bulletin-item-info[contenteditable]:empty::before { background-color: #093095; } +#bcso-count { +background-color: #cc7e25;; +} + +#sasp-count { +background-color: #2589cc; +} + #ems-count { background-color: #950909; } @@ -6625,4 +6633,4 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { .leaflet-tooltip-right { margin-left: 6px; -} \ No newline at end of file +} From b22b6ab5e7d48deac501422a15b759129f872419 Mon Sep 17 00:00:00 2001 From: nggcasey <60057103+nggcasey@users.noreply.github.com> Date: Fri, 3 Mar 2023 18:14:40 +1100 Subject: [PATCH 048/381] Update server/main.lua Co-authored-by: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> --- server/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index b4131992..5fc68c93 100644 --- a/server/main.lua +++ b/server/main.lua @@ -61,7 +61,8 @@ if Config.UseWolfknightRadar == true then end - if bolo or warrant or driverunlicensed == true then + if bolo or warrant or not driverslicense then + TriggerClientEvent("wk:togglePlateLock", src, cam, true, 1) end From d13ea574ecf136277943b3cad69179f7e1cf7417 Mon Sep 17 00:00:00 2001 From: nggcasey <60057103+nggcasey@users.noreply.github.com> Date: Fri, 3 Mar 2023 18:45:30 +1100 Subject: [PATCH 049/381] Code cleanup as per BackSHOOTERs review --- server/main.lua | 39 ++++++++++++++++++++------------------- shared/config.lua | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/server/main.lua b/server/main.lua index 5fc68c93..92fa2f6d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -40,28 +40,29 @@ if Config.UseWolfknightRadar == true then local src = source local Player = QBCore.Functions.GetPlayer(src) local PlayerData = GetPlayerData(src) - local vehicleowner = GetVehicleOwner(plate) - local bolo, title, boloid = GetBoloStatus(plate, title, boloid) - local warrant, owner, incidentid = GetWarrantStatus(plate, owner, incidentid) - local driverslicense = PlayerData.metadata['licences'].driver + local vehicleOwner = GetVehicleOwner(plate) + local bolo, title, boloId = GetBoloStatus(plate, title, boloId) + --local warrant, owner, incidentId = GetWarrantStatus(plate, owner, incidentId) + local warrant, owner, incidentId = GetWarrantStatus(plate) + local driversLicense = PlayerData.metadata['licences'].driver local driverunlicensed = nil if bolo == true then - TriggerClientEvent('QBCore:Notify', src, 'BOLO ID: '..boloid..' | Title: '..title..' | Registered Owner: '..vehicleowner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + TriggerClientEvent('QBCore:Notify', src, 'BOLO ID: '..boloId..' | Title: '..title..' | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end if warrant == true then - TriggerClientEvent('QBCore:Notify', src, 'WANTED - INCIDENT ID: '..incidentid..' | Registered Owner: '..owner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + TriggerClientEvent('QBCore:Notify', src, 'WANTED - INCIDENT ID: '..incidentId..' | Registered Owner: '..owner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end - if driverslicense == false then + if driversLicense == false then driverunlicensed = true if driverunlicensed == true then - TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleowner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end end - if bolo or warrant or not driverslicense then + if bolo or warrant or not driversLicense then TriggerClientEvent("wk:togglePlateLock", src, cam, true, 1) end @@ -1123,15 +1124,15 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag end end) -RegisterNetEvent('mdt:server:handleExistingConvictions', function(data, incidentid, time) +RegisterNetEvent('mdt:server:handleExistingConvictions', function(data, incidentId, time) MySQL.query('SELECT * FROM mdt_convictions WHERE cid=:cid AND linkedincident=:linkedincident', { cid = data['Cid'], - linkedincident = incidentid + linkedincident = incidentId }, function(convictionRes) if convictionRes and convictionRes[1] and convictionRes[1]['id'] then MySQL.update('UPDATE mdt_convictions SET cid=:cid, linkedincident=:linkedincident, warrant=:warrant, guilty=:guilty, processed=:processed, associated=:associated, charges=:charges, fine=:fine, sentence=:sentence, recfine=:recfine, recsentence=:recsentence WHERE cid=:cid AND linkedincident=:linkedincident', { cid = data['Cid'], - linkedincident = incidentid, + linkedincident = incidentId, warrant = data['Warrant'], guilty = data['Guilty'], processed = data['Processed'], @@ -1145,7 +1146,7 @@ RegisterNetEvent('mdt:server:handleExistingConvictions', function(data, incident else MySQL.insert('INSERT INTO `mdt_convictions` (`cid`, `linkedincident`, `warrant`, `guilty`, `processed`, `associated`, `charges`, `fine`, `sentence`, `recfine`, `recsentence`, `time`) VALUES (:cid, :linkedincident, :warrant, :guilty, :processed, :associated, :charges, :fine, :sentence, :recfine, :recsentence, :time)', { cid = data['Cid'], - linkedincident = incidentid, + linkedincident = incidentId, warrant = data['Warrant'], guilty = data['Guilty'], processed = data['Processed'], @@ -1473,25 +1474,25 @@ RegisterServerEvent("mdt:server:AddLog", function(text) AddLog(text) end) -function GetBoloStatus(plate, title, boloid) +function GetBoloStatus(plate, title, boloId) local result = MySQL.query.await("SELECT * FROM mdt_bolos where plate = @plate", {['@plate'] = plate}) if result and result[1] then local title = result[1]['title'] - local boloid = result[1]['id'] - return true, title, boloid + local boloId = result[1]['id'] + return true, title, boloId end return false end -function GetWarrantStatus(plate, owner, incidentid) +function GetWarrantStatus(plate) local result = MySQL.query.await("SELECT p.plate, p.citizenid, m.id FROM player_vehicles p INNER JOIN mdt_convictions m ON p.citizenid = m.cid WHERE m.warrant =1 AND p.plate =?", {plate}) if result and result[1] then local citizenid = result[1]['citizenid'] local Player = QBCore.Functions.GetPlayerByCitizenId(citizenid) local owner = Player.PlayerData.charinfo.firstname.." "..Player.PlayerData.charinfo.lastname - local incidentid = result[1]['id'] - return true, owner, incidentid + local incidentId = result[1]['id'] + return true, owner, incidentId end return false end diff --git a/shared/config.lua b/shared/config.lua index 1c34b239..e782c9bd 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -9,7 +9,7 @@ Config.RosterLink = { Config.UseWolfknightRadar = false -Config.WolfknightNotifyTime = 5000 --How long the notification displays for in miliseconds (30000 = 30 seconds) +Config.WolfknightNotifyTime = 5000 --How long the notification displays for in milliseconds (30000 = 30 seconds) --[[ Adds support for Wraith ARS 2X by WolfKnight98 (wk_wars2x) https://github.com/WolfKnight98/wk_wars2x From d2eb2d96b20d4bf93f8991f714cdbc4d979758a6 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Thu, 2 Mar 2023 23:49:14 -0800 Subject: [PATCH 050/381] Add fine, incident, commserv buttons --- client/main.lua | 64 ++++++++++++++ server/main.lua | 8 ++ ui/app.js | 224 +++++++++++++++++++++++++----------------------- ui/style.css | 23 +++++ 4 files changed, 212 insertions(+), 107 deletions(-) diff --git a/client/main.lua b/client/main.lua index 3c306a8d..5d85fed4 100644 --- a/client/main.lua +++ b/client/main.lua @@ -359,6 +359,12 @@ RegisterNUICallback("updateLicence", function(data, cb) cb(true) end) +--==================================================================================== +------------------------------------------ +-- INCIDENTS PAGE -- +------------------------------------------ +--==================================================================================== + RegisterNUICallback("searchIncidents", function(data, cb) local incident = data.incident TriggerServerEvent('mdt:server:searchIncidents', incident) @@ -377,6 +383,64 @@ RegisterNUICallback("incidentSearchPerson", function(data, cb) cb(true) end) +-- Handle sending the player to jail +-- Uses QB-Core/qb-policejob function to send the player to jail +-- If you use a different jail system, you will need to change this +RegisterNUICallback("sendToJail", function(data, cb) + local citizenId, sentence = data.citizenId, data.sentence + + -- Gets the player id from the citizenId + local p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) + p:resolve(result) + end, citizenId) + + local targetSourceId = Citizen.Await(p) + + if sentence > 0 then + -- Uses qb-policejob JailPlayer event + TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence) + end +end) + +-- Handle sending a fine to a player +-- Uses the QB-Core bill command to send a fine to a player +-- If you use a different fine system, you will need to change this +RegisterNUICallback("sendFine", function(data, cb) + local citizenId, fine = data.citizenId, data.fine + + -- Gets the player id from the citizenId + local p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) + p:resolve(result) + end, citizenId) + + local targetSourceId = Citizen.Await(p) + + if fine > 0 then + -- Uses QB-Core /bill command + ExecuteCommand(('bill %s %s'):format(targetSourceId, fine)) + end +end) + +-- Handle sending the player to community service +-- If you use a different community service system, you will need to change this +RegisterNUICallback("sendToCommunityService", function(data, cb) + local citizenId, sentence = data.citizenId, data.sentence + + -- Gets the player id from the citizenId + local p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) + p:resolve(result) + end, citizenId) + + local targetSourceId = Citizen.Await(p) + + if sentence > 0 then + TriggerServerEvent("qb-communityservice:server:StartCommunityService", targetSourceId, sentence) + end +end) + RegisterNetEvent('mdt:client:getProfileData', function(sentData, isLimited) if not isLimited then local vehicles = sentData['vehicles'] diff --git a/server/main.lua b/server/main.lua index 23f97997..ff78e36e 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1467,3 +1467,11 @@ function GetVehicleInformation(plate) end end +-- Returns the source for the given citizenId +QBCore.Functions.CreateCallback('mdt:server:GetPlayerSourceId', function(source, cb, targetCitizenId) + local targetPlayer = QBCore.Functions.GetPlayerByCitizenId(targetCitizenId) + local targetSource = targetPlayer.PlayerData.source + + cb(targetSource) +end) + diff --git a/ui/app.js b/ui/app.js index 16f0ee38..24e3412d 100644 --- a/ui/app.js +++ b/ui/app.js @@ -23,6 +23,8 @@ var LastName = ""; var DispatchNum = 0; var playerJob = ""; let rosterLink = ""; +//Set this to false if you don't want to show the send to community service button on the incidents page +const canSendToCommunityService = true let impoundChanged = false; @@ -1886,6 +1888,9 @@ $(document).ready(() => { $(".associated-incidents-sentence-input") .filter(`[data-id="${$(this).data("id")}"]`) .css("display", "none"); + $(".associated-incidents-controls") + .filter(`[data-id="${$(this).data("id")}"]`) + .css("display", "none"); } } else { $(this).removeClass("green-tag"); @@ -1903,10 +1908,38 @@ $(document).ready(() => { $(".associated-incidents-sentence-input") .filter(`[data-id="${$(this).data("id")}"]`) .fadeIn(100); + $(".associated-incidents-controls") + .filter(`[data-id="${$(this).data("id")}"]`) + .fadeIn(100); } } } ); + + $('.incidents-ghost-holder').on('click', '#jail-button', function() { + // Get the current sentence and recommended sentence values + const citizenId = $(this).data("id"); + const sentence = $(".sentence-amount").filter(`[data-id=${citizenId}]`).val(); + const recommendSentence = $(".sentence-recommended-amount").filter(`[data-id=${citizenId}]`).val(); + sendToJail(citizenId, sentence, recommendSentence); + }); + + $('.incidents-ghost-holder').on('click', '#fine-button', function() { + // Get the current fine and recommended fine values + const citizenId = $(this).data("id"); + const fine = $(".fine-amount").filter(`[data-id=${citizenId}]`).val(); + const recommendFine = $(".fine-recommended-amount").filter(`[data-id=${citizenId}]`).val(); + sendFine(citizenId, fine, recommendFine); + }); + + $('.incidents-ghost-holder').on('click', '#community-service-button', function() { + // Get the current sentence and recommended sentence values + const citizenId = $(this).data("id"); + const sentence = $(".sentence-amount").filter(`[data-id=${citizenId}]`).val(); + const recommendSentence = $(".sentence-recommended-amount").filter(`[data-id=${citizenId}]`).val(); + sendToCommunityService(citizenId, sentence, recommendSentence); + }); + $(".contextmenu").on( "click", ".associated-incidents-remove-tag", @@ -1961,74 +1994,33 @@ $(document).ready(() => { )}">${$(this).data("name")}
                ` ); + // This section handles populating the fields when you add a new associated user to the incident $(".incidents-ghost-holder").prepend( ` -
                -
                ${$(this).data( - "info" - )}
                +
                +
                ${$(this).data("info")}
                -
                Warrant
                -
                Guilty
                -
                Processed
                -
                Associated
                +
                Warrant
                +
                Guilty
                +
                Processed
                +
                Associated
                -
                +
                +
                Recommended Fine
                +
                +
                Recommended Sentence
                +
                +
                Fine
                +
                +
                Sentence
                +
                +
                +
                Jail
                +
                Fine
                + ${canSendToCommunityService ? `
                Community Service
                ` : ''}
                -
                Recommended Fine
                -
                -
                Recommended Sentence
                -
                -
                Fine
                -
                -
                Sentence
                -
                - ` + ` ); } ); @@ -4693,51 +4685,36 @@ $(document).ready(() => { const cid = value.cid; - if (value.associated == 1) { - $(".incidents-ghost-holder").prepend( - `
                -
                ${value.name} (#${value.cid})
                -
                -
                Warrant
                -
                Guilty
                -
                Processed
                -
                Associated
                -
                - - - - - - - - - -
                ` - ); - } else { - $(".incidents-ghost-holder").prepend( - `
                -
                ${value.name} (#${value.cid})
                -
                -
                Warrant
                -
                Guilty
                -
                Processed
                -
                Associated
                -
                -
                -
                -
                Recommended Fine
                -
                -
                Recommended Sentence
                -
                -
                Fine
                -
                -
                Sentence
                -
                -
                ` - ); - } + // If the associated field is not checked, then populate the recommended fine and sentence fields + const associatedIncidentsContainer = (value.associated != 1) && ` +
                +
                Recommended Fine
                +
                +
                Recommended Sentence
                +
                +
                Fine
                +
                +
                Sentence
                +
                +
                +
                Jail
                +
                Fine
                + ${canSendToCommunityService ? `
                Community Service
                ` : ''} +
                + `; + + $(".incidents-ghost-holder").prepend( + `
                +
                ${value.name} (#${cid})
                +
                +
                Warrant
                +
                Guilty
                +
                Processed
                +
                Associated
                +
                + ${associatedIncidentsContainer} +
                ` + ); $(".fine-amount") .filter("[data-id='" + value.cid + "']") @@ -5172,6 +5149,39 @@ function addTag(tagInput) { ); } +// Use the customSentence if defined, otherwise use the recommendedSentence +// This uses the assumption that customSentence will be 0 if not defined +function sendToJail(citizenId, customSentence, recommendedSentence) { + const sentence = Number(customSentence) || Number(recommendedSentence); + + $.post(`https://${GetParentResourceName()}/sendToJail`, JSON.stringify({ + citizenId, + sentence, + })); +} + +// Use the customSentence if defined, otherwise use the recommendedSentence +// This uses the assumption that customSentence will be 0 if not defined +function sendToCommunityService(citizenId, customSentence, recommendedSentence) { + const sentence = Number(customSentence) || Number(recommendedSentence); + + $.post(`https://${GetParentResourceName()}/sendToCommunityService`, JSON.stringify({ + citizenId, + sentence, + })); +} + +// Use the customFine if defined, otherwise use the recommendedFine +// This uses the assumption that customFine will be 0 if not defined +function sendFine(citizenId, customFine, recommendedFine) { + const fine = Number(customFine) || Number(recommendedFine); + + $.post(`https://${GetParentResourceName()}/sendFine`, JSON.stringify({ + citizenId, + fine, + })); +} + // Context menu var menu = document.querySelector(".contextmenu"); diff --git a/ui/style.css b/ui/style.css index 55df5872..c400277d 100644 --- a/ui/style.css +++ b/ui/style.css @@ -2789,6 +2789,29 @@ span.civilians-incident-input[contenteditable]:empty::before { background-color: rgba(0, 0, 0, 0); } +.associated-incidents-controls { + display: flex; + justify-content: space-evenly; + width: 90%; + margin-top: 5px; + margin-bottom: 15px; +} + +.control-button { + text-align: center; + background-color: var(--color-4); + padding: 10px; +} + +.control-button span { + padding-right: 8px; +} + +.control-button:hover { + background-color: var(--color-3); + cursor: pointer; +} + .icidents-person-search { display: flex; flex-direction: column; From dd43f917c3655f790491df325df6a68f4647d6c1 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Thu, 2 Mar 2023 23:50:53 -0800 Subject: [PATCH 051/381] fix typo icidents --- ui/app.js | 52 +++++++++++++++++++++++------------------------ ui/dashboard.html | 12 +++++------ ui/style.css | 28 ++++++++++++------------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/ui/app.js b/ui/app.js index 24e3412d..5d01190d 100644 --- a/ui/app.js +++ b/ui/app.js @@ -396,8 +396,8 @@ $(document).ready(() => { } }); $(".associated-incidents-tags-add-btn").on("click", "", function () { - document.addEventListener("mouseup", onMouseDownIcidents); - $(".icidents-person-search-container").fadeIn(250); + document.addEventListener("mouseup", onMouseDownIncidents); + $(".incidents-person-search-container").fadeIn(250); $(".close-all").css("filter", "brightness(15%)"); }); $(".gallery-add-btn").click(function () { @@ -1099,10 +1099,10 @@ $(document).ready(() => { } if ( - $(".icidents-person-search-container").css("display") != "none" + $(".incidents-person-search-container").css("display") != "none" ) { shouldClose = false; - $(".icidents-person-search-container").fadeOut(250); + $(".incidents-person-search-container").fadeOut(250); $(".close-all").css("filter", "none"); } @@ -1150,9 +1150,9 @@ $(document).ready(() => { } }); - $(".icidents-person-search-name-input").on("keydown", "", function (e) { + $(".incidents-person-search-name-input").on("keydown", "", function (e) { if (e.keyCode === 13) { - let name = $(".icidents-person-search-name-input").val(); + let name = $(".incidents-person-search-name-input").val(); $.post( `https://${GetParentResourceName()}/incidentSearchPerson`, JSON.stringify({ @@ -1982,11 +1982,11 @@ $(document).ready(() => { openContextMenu(e, args); } ); - $(".icidents-person-search-holder").on( + $(".incidents-person-search-holder").on( "click", - ".icidents-person-search-item", + ".incidents-person-search-item", function () { - $(".icidents-person-search-container").fadeOut(250); + $(".incidents-person-search-container").fadeOut(250); $(".close-all").css("filter", "none"); $(".associated-incidents-tags-holder").prepend( `
                { $(".callsign-container").fadeOut(0); $(".radio-inner-container").fadeOut(0); $(".radio-container").fadeOut(0); - $(".icidents-person-search-container").fadeOut(0); + $(".incidents-person-search-container").fadeOut(0); $(".dispatch-attached-units").fadeOut(0); $(".respond-calls").fadeOut(0); $(".respond-calls-container").fadeOut(0); @@ -4744,18 +4744,18 @@ $(document).ready(() => { }); } else if (eventData.type == "incidentSearchPerson") { let table = eventData.data; - $(".icidents-person-search-holder").empty(); + $(".incidents-person-search-holder").empty(); $.each(table, function (index, value) { let name = value.firstname + " " + value.lastname; - $(".icidents-person-search-holder").prepend( + $(".incidents-person-search-holder").prepend( ` -
                - -
                -
                Citizen ID
                -
                ${value.id}
                -
                Name
                -
                ${name}
                +
                + +
                +
                Citizen ID
                +
                ${value.id}
                +
                Name
                +
                ${name}
                ` @@ -5274,19 +5274,19 @@ function removeImage(url) { .remove(); } -function hideIcidentsMenu() { +function hideIncidentsMenu() { if ( - $(".icidents-person-search-container").css("display") != "none" && + $(".incidents-person-search-container").css("display") != "none" && !mouse_is_inside ) { - $(".icidents-person-search-container").fadeOut(250); + $(".incidents-person-search-container").fadeOut(250); $(".close-all").css("filter", "none"); } } -function onMouseDownIcidents(e) { - hideIcidentsMenu(); - document.removeEventListener("mouseup", onMouseDownIcidents); +function onMouseDownIncidents(e) { + hideIncidentsMenu(); + document.removeEventListener("mouseup", onMouseDownIncidents); } function titleCase(str) { diff --git a/ui/dashboard.html b/ui/dashboard.html index 6513edc1..3e8f340c 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -60,12 +60,12 @@
                - @@ -5014,6 +5014,31 @@ $(document).ready(() => { $(".weapon-info-image").attr("src", table["image"]); $(".weapon-info-imageurl-input").val(table["image"]); + $(".contextmenu").on("click", ".weapons-delete", function () { + $(".weapons-items") + .find("[data-id='" + $(this).data("info") + "']") + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteWeapons`, + JSON.stringify({ + id: $(this).data("info"), + }) + ); + }); + + $(".weapons-items").on("contextmenu", ".weapons-item", function (e) { + var args = ""; + args = [ + { + className: "weapons-delete", + icon: "fas fa-times", + text: "Delete Weapon Info", + info: $(this).data("id"), + status: "", + }, + ]; + openContextMenu(e, args); + }); } else if (eventData.type == "updateVehicleDbId") { $(".vehicle-information-title-holder").data("dbid", Number(eventData.data)); } else if (eventData.type == "updateIncidentDbId") { From f53edd19db45f06bb41917e50f8e380b23863af6 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 11 Mar 2023 21:59:20 +0100 Subject: [PATCH 091/381] changed suggested changes changed suggested changes --- server/main.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/main.lua b/server/main.lua index 4b29bfc1..83331af5 100644 --- a/server/main.lua +++ b/server/main.lua @@ -573,9 +573,9 @@ RegisterNetEvent('mdt:server:deleteWeapons', function(id) local Player = QBCore.Functions.GetPlayer(src) local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' then - local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.update("DELETE FROM `mdt_weaponinfo` WHERE id=:id", { id = id, jobtype = JobType }) - TriggerEvent('mdt:server:AddLog', "A Weapon Info was deleted by "..fullname.." with the ID ("..id..")") + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_weaponinfo` WHERE id=:id", { id = id }) + TriggerEvent('mdt:server:AddLog', "A Weapon Info was deleted by "..fullName.." with the ID ("..id..")") end end end) @@ -586,9 +586,9 @@ RegisterNetEvent('mdt:server:deleteReports', function(id) local Player = QBCore.Functions.GetPlayer(src) local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' then - local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.update("DELETE FROM `mdt_reports` WHERE id=:id", { id = id, jobtype = JobType }) - TriggerEvent('mdt:server:AddLog', "A Report was deleted by "..fullname.." with the ID ("..id..")") + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_reports` WHERE id=:id", { id = id }) + TriggerEvent('mdt:server:AddLog', "A Report was deleted by "..fullName.." with the ID ("..id..")") end end end) @@ -599,9 +599,9 @@ RegisterNetEvent('mdt:server:deleteIncidents', function(id) local Player = QBCore.Functions.GetPlayer(src) local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' then - local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id, jobtype = JobType }) - TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullname.." with the ID ("..id..")") + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }) + TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") end end end) From 177262846b73f2fdb48a2d2c7cd8412fc048473c Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 11 Mar 2023 22:01:45 +0100 Subject: [PATCH 092/381] added suggested changes added suggested changes --- ui/app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/app.js b/ui/app.js index c216f6f3..d2c7b4ab 100644 --- a/ui/app.js +++ b/ui/app.js @@ -4512,7 +4512,7 @@ $(document).ready(() => { }); $(".contextmenu").on("click", ".incidents-delete", function () { $(".incidents-items") - .find("[data-id='" + $(this).data("info") + "']") + .find(`[data-id="${$(this).data("info")}"]`) .remove(); $.post( `https://${GetParentResourceName()}/deleteIncidents`, @@ -4878,7 +4878,7 @@ $(document).ready(() => { }); $(".contextmenu").on("click", ".reports-delete", function () { $(".reports-items") - .find("[data-id='" + $(this).data("info") + "']") + .find(`[data-id="${$(this).data("info")}"]`) .remove(); $.post( `https://${GetParentResourceName()}/deleteReports`, @@ -5016,7 +5016,7 @@ $(document).ready(() => { $(".weapon-info-imageurl-input").val(table["image"]); $(".contextmenu").on("click", ".weapons-delete", function () { $(".weapons-items") - .find("[data-id='" + $(this).data("info") + "']") + .find(`[data-id="${$(this).data("info")}"]`) .remove(); $.post( `https://${GetParentResourceName()}/deleteWeapons`, From 7ec7f0075fbd59ab8d7c71dda5580ccac17e80a2 Mon Sep 17 00:00:00 2001 From: LumioStudio <97387917+LumioStudio@users.noreply.github.com> Date: Sun, 12 Mar 2023 18:13:08 +0100 Subject: [PATCH 093/381] Remove unused ui files --- fxmanifest.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 7c8df1fa..3083d354 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -26,12 +26,6 @@ files { 'ui/img/*.png', 'ui/img/*.webp', 'ui/dashboard.html', - 'ui/dmv.html', - 'ui/bolos.html', - 'ui/incidents.html', - 'ui/penalcode.html', - 'ui/reports.html', - 'ui/warrants.html', 'ui/app.js', 'ui/style.css', } From 2b6359f7d9cd68c506efa88157fc7abde5b9583c Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 12 Mar 2023 18:55:25 +0100 Subject: [PATCH 094/381] added rank check - added rank check for removal of incidents,reports or weapon data - little issue i got, it sends it 3 times into the logs --- server/main.lua | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/server/main.lua b/server/main.lua index 83331af5..4b49ae10 100644 --- a/server/main.lua +++ b/server/main.lua @@ -571,11 +571,16 @@ RegisterNetEvent('mdt:server:deleteWeapons', function(id) if id then local src = source local Player = QBCore.Functions.GetPlayer(src) - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' then - local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.update("DELETE FROM `mdt_weaponinfo` WHERE id=:id", { id = id }) - TriggerEvent('mdt:server:AddLog', "A Weapon Info was deleted by "..fullName.." with the ID ("..id..")") + if Config.LogPerms[Player.PlayerData.job.name] then + if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_weaponinfo` WHERE id=:id", { id = id }) + TriggerEvent('mdt:server:AddLog', "A Weapon Info was deleted by "..fullName.." with the ID ("..id..")") + else + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') + TriggerEvent('mdt:server:AddLog', fullname.." tryed to delete a Weapon Info with the ID ("..id..")") + end end end end) @@ -584,11 +589,16 @@ RegisterNetEvent('mdt:server:deleteReports', function(id) if id then local src = source local Player = QBCore.Functions.GetPlayer(src) - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' then - local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.update("DELETE FROM `mdt_reports` WHERE id=:id", { id = id }) - TriggerEvent('mdt:server:AddLog', "A Report was deleted by "..fullName.." with the ID ("..id..")") + if Config.LogPerms[Player.PlayerData.job.name] then + if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_reports` WHERE id=:id", { id = id }) + TriggerEvent('mdt:server:AddLog', "A Report was deleted by "..fullName.." with the ID ("..id..")") + else + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') + TriggerEvent('mdt:server:AddLog', fullname.." tryed to delete a Report with the ID ("..id..")") + end end end end) @@ -597,11 +607,16 @@ RegisterNetEvent('mdt:server:deleteIncidents', function(id) if id then local src = source local Player = QBCore.Functions.GetPlayer(src) - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' then - local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }) - TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") + if Config.LogPerms[Player.PlayerData.job.name] then + if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }) + TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") + else + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') + TriggerEvent('mdt:server:AddLog', fullname.." tryed to delete a Incident with the ID ("..id..")") + end end end end) From 13dfc17f77ff90480d6c857af44647b6d32f2141 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 12 Mar 2023 20:58:12 -0400 Subject: [PATCH 095/381] Patched for vehicleOwner error Patch for vehicleOwner error --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 7f509ca3..c78dfe54 100644 --- a/server/main.lua +++ b/server/main.lua @@ -57,7 +57,7 @@ if Config.UseWolfknightRadar == true then TriggerClientEvent('QBCore:Notify', src, 'WANTED - INCIDENT ID: '..incidentId..' | Registered Owner: '..owner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end - if driversLicense == false then + if driversLicense == false and vehicleOwner then TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end From c1abf103a8d71e44398aee0e76c82795aa9083cb Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 12 Mar 2023 23:00:25 -0400 Subject: [PATCH 096/381] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 80162270..c7e49254 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl ## Dependencies - [QBCore](https://github.com/qbcore-framework/qb-core) -- [ps-dispatch](https://github.com/Project-Sloth/ps-dispatch) [If you intend to use it, make sure this starts before the mdt!] +- [ps-dispatch](https://github.com/Project-Sloth/ps-dispatch) - [oxmysql](https://github.com/overextended/oxmysql) +- [qb-apartments](https://github.com/qbcore-framework/qb-apartments) - You can remove this by removing the query. This is used to find people's apartment. # Installation * Download ZIP From 242c0db18895b8a694c812005b1b43a2cf7a65fc Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 12 Mar 2023 23:14:19 -0400 Subject: [PATCH 097/381] Added Config for default qb-apartments and config cleanup Cleaned up Config and organized it. Added a check if you're using default qb-apartments because if you're not then it'll error out and won't let you edit any profiles --- server/main.lua | 2 +- shared/config.lua | 126 +++++++++++++++++++++++----------------------- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/server/main.lua b/server/main.lua index c78dfe54..5e387622 100644 --- a/server/main.lua +++ b/server/main.lua @@ -258,7 +258,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local apartmentData = GetPlayerApartment(target.citizenid) - if apartmentData then + if Config.UsingDefaultQBApartments and apartmentData then apartmentData = apartmentData[1].label .. ' (' ..apartmentData[1].name..')' end diff --git a/shared/config.lua b/shared/config.lua index e328b763..559442fd 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -1,5 +1,11 @@ Config = Config or {} +Config.UsingDefaultQBApartments = true + +Config.OnlyShowOnDuty = true + +Config.Fuel = "lj-fuel" -- "LegacyFuel", "lj-fuel" + Config.RosterLink = { -- Google Docs Link ['police'] = '', ['ambulance'] = '', @@ -12,19 +18,70 @@ Config.RosterLink = { -- Google Docs Link ['sapr'] = '', } +Config.PoliceJobs = { + ['police'] = true, + ['lspd'] = true, + ['bcso'] = true, + ['sast'] = true, + ['sasp'] = true, + ['doc'] = true, + ['lssd'] = true, + ['sapr'] = true, + ['pa'] = true +} + +Config.AmbulanceJobs = { + ['ambulance'] = true, + ['doctor'] = true +} + +Config.DojJobs = { + ['lawyer'] = true, + ['judge'] = true +} + +-- This is a workaround solution because the qb-menu present in qb-policejob fills in an impound location and sends it to the event. +-- If the impound locations are modified in qb-policejob, the changes must also be implemented here to ensure consistency. + +Config.ImpoundLocations = { + [1] = vector4(436.68, -1007.42, 27.32, 180.0), + [2] = vector4(-436.14, 5982.63, 31.34, 136.0), +} -- Support for Wraith ARS 2X. Config.UseWolfknightRadar = false Config.WolfknightNotifyTime = 5000 -- How long the notification displays for in milliseconds (30000 = 30 seconds) --- To avoid making excessive database queries, modify this config to true 'CONFIG.use_sonorancad = true' setting in the configuration file located at 'wk_wars2x/config.lua'. +-- IMPORTANT: To avoid making excessive database queries, modify this config to true 'CONFIG.use_sonorancad = true' setting in the configuration file located at 'wk_wars2x/config.lua'. -- Enabling this setting will limit plate checks to only those vehicles that have been used by a player. - -Config.OnlyShowOnDuty = true - -Config.Fuel = "lj-fuel" -- "LegacyFuel", "lj-fuel" +Config.LogPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, +} Config.PenalCodeTitles = { [1] = 'OFFENSES AGAINST PERSONS', @@ -243,28 +300,6 @@ Config.PenalCode = { } } -Config.PoliceJobs = { - ['police'] = true, - ['lspd'] = true, - ['bcso'] = true, - ['sast'] = true, - ['sasp'] = true, - ['doc'] = true, - ['lssd'] = true, - ['sapr'] = true, - ['pa'] = true -} - -Config.AmbulanceJobs = { - ['ambulance'] = true, - ['doctor'] = true -} - -Config.DojJobs = { - ['lawyer'] = true, - ['judge'] = true -} - Config.AllowedJobs = {} for index, value in pairs(Config.PoliceJobs) do Config.AllowedJobs[index] = value @@ -276,33 +311,6 @@ for index, value in pairs(Config.DojJobs) do Config.AllowedJobs[index] = value end -Config.LogPerms = { - ['ambulance'] = { - [4] = true, - }, - ['police'] = { - [4] = true, - }, - ['bcso'] = { - [4] = true, - }, - ['sast'] = { - [4] = true, - }, - ['sasp'] = { - [4] = true, - }, - ['sapr'] = { - [4] = true, - }, - ['doc'] = { - [4] = true, - }, - ['lssd'] = { - [4] = true, - }, -} - Config.ColorNames = { [0] = "Metallic Black", [1] = "Metallic Graphite Black", @@ -662,12 +670,4 @@ function GetJobType(job) else return nil end -end - --- This is a workaround solution because the qb-menu present in qb-policejob fills in an impound location and sends it to the event. --- If the impound locations are modified in qb-policejob, the changes must also be implemented here to ensure consistency. - -Config.ImpoundLocations = { - [1] = vector4(436.68, -1007.42, 27.32, 180.0), - [2] = vector4(-436.14, 5982.63, 31.34, 136.0), -} +end \ No newline at end of file From 20ea24248183c7729a9e61ae96ceca2c13bd8622 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 12 Mar 2023 23:46:52 -0400 Subject: [PATCH 098/381] Fixes incidents not being able to be deleted https://gyazo.com/fc7d784da1735c2fc591dc651b38623a --- server/main.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/main.lua b/server/main.lua index 62c7d000..0f81f310 100644 --- a/server/main.lua +++ b/server/main.lua @@ -604,14 +604,19 @@ RegisterNetEvent('mdt:server:deleteReports', function(id) end) RegisterNetEvent('mdt:server:deleteIncidents', function(id) + local result = MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }) + if id then local src = source local Player = QBCore.Functions.GetPlayer(src) if Config.LogPerms[Player.PlayerData.job.name] then if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }) - TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") + MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }, function(rowsChanged) + if rowsChanged > 0 then + TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") + end + end) else local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') @@ -620,7 +625,6 @@ RegisterNetEvent('mdt:server:deleteIncidents', function(id) end end end) - RegisterNetEvent('mdt:server:deleteBolo', function(id) if id then local src = source From b746edaedb33670bc55982dd88ba1654051cb737 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 12 Mar 2023 23:47:48 -0400 Subject: [PATCH 099/381] Version 1.8 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 3083d354..203a96ad 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '1.7' +version '1.8' lua54 'yes' From 236acae5ea962f7df1aa5cba4e92a7752b4fa5b5 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 13 Mar 2023 03:09:15 -0400 Subject: [PATCH 100/381] Changed Function name --- server/dbm.lua | 2 +- server/main.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/dbm.lua b/server/dbm.lua index 002ef9dd..5b3fb9f7 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -165,7 +165,7 @@ function ManageLicense(identifier, type, status) end end -function ManageLicenses(identifier, incomingLicenses) +function UpdateAllLicenses(identifier, incomingLicenses) local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) if Player ~= nil then Player.Functions.SetMetaData("licences", incomingLicenses) diff --git a/server/main.lua b/server/main.lua index 0f81f310..c63c6097 100644 --- a/server/main.lua +++ b/server/main.lua @@ -368,7 +368,7 @@ end) RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, fingerprint, licenses) local src = source local Player = QBCore.Functions.GetPlayer(src) - ManageLicenses(cid, licenses) + UpdateAllLicenses(cid, licenses) if Player then local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'doj' then JobType = 'police' end From b372bc6f30a6d54f29a9fb6520ac822cba0d73b9 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 14 Mar 2023 08:30:59 -0400 Subject: [PATCH 101/381] Added Weapon Info Export --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c7e49254..c3004405 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,14 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl * DOC ![image](https://i.imgur.com/lFi4jDH.png) +## Weapon Info Export + +Adds server export for inserting weaponinfo records, that can be used elsewhere in your server, such as weapon purchase, to add information to the mdt. Below is the syntax for this, all arguments are strings. + +``` +exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) +``` + ## Wolfknight Plate Reader & Radar Compatibility Support for Wolfknight Radar & Plate Reader From 10a4027530a6cc0b2d71545f261e1f60cbe922f9 Mon Sep 17 00:00:00 2001 From: Jacob Bernard Allen Date: Wed, 15 Mar 2023 00:49:59 -0400 Subject: [PATCH 102/381] Simple charge descriptions Hopefully these are spelled correctly. DISCLAIMER these are more like place-holders to give an idea of what each charge could mean, it is HIGHLY recommended to write your own. --- shared/config.lua | 362 +++++++++++++++++++++++----------------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index 559442fd..6ea81dc8 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -98,205 +98,205 @@ Config.PenalCodeTitles = { Config.PenalCode = { [1] = { - [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange', description = 'Insert Charge Description Here'}, - [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange', description = 'Insert Charge Description Here'}, - [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red', description = 'Insert Charge Description Here'}, - [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, - [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, - [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red', description = 'Insert Charge Description Here'}, - [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red', description = 'Insert Charge Description Here'}, - [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red', description = 'Insert Charge Description Here'}, - [10] = {title = 'First Degree Murder', class = 'Felony', id = 'P.C. 1010', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [11] = {title = 'Accessory to First Degree Murder', class = 'Felony', id = 'P.C. 1011', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [12] = {title = 'Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1012', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [13] = {title = 'Attempted Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1013', months = 65, fine = 10000, color = 'red', description = 'Insert Charge Description Here'}, - [14] = {title = 'Accessory to the Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1014', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [15] = {title = 'Unlawful Imprisonment', class = 'Misdemeanor', id = 'P.C. 1015', months = 10, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Kidnapping', class = 'Felony', id = 'P.C. 1016', months = 15, fine = 900, color = 'orange', description = 'Insert Charge Description Here'}, - [17] = {title = 'Accessory to Kidnapping', class = 'Felony', id = 'P.C. 1017', months = 7, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, - [18] = {title = 'Attempted Kidnapping', class = 'Felony', id = 'P.C. 1018', months = 10, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, - [19] = {title = 'Hostage Taking', class = 'Felony', id = 'P.C. 1019', months = 20, fine = 1200, color = 'orange', description = 'Insert Charge Description Here'}, - [20] = {title = 'Accessory to Hostage Taking', class = 'Felony', id = 'P.C. 1020', months = 10, fine = 600, color = 'orange', description = 'Insert Charge Description Here'}, - [21] = {title = 'Unlawful Imprisonment of a Public Servant or Peace Officer.', class = 'Felony', id = 'P.C. 1021', months = 25, fine = 4000, color = 'orange', description = 'Insert Charge Description Here'}, - [22] = {title = 'Criminal Threats', class = 'Misdemeanor', id = 'P.C. 1022', months = 5, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, - [23] = {title = 'Reckless Endangerment', class = 'Misdemeanor', id = 'P.C. 1023', months = 10, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, - [24] = {title = 'Gang Related Shooting', class = 'Felony', id = 'P.C. 1024', months = 30, fine = 2500, color = 'red', description = 'Insert Charge Description Here'}, - [25] = {title = 'Cannibalism', class = 'Felony', id = 'P.C. 1025', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [26] = {title = 'Torture', class = 'Felony', id = 'P.C. 1026', months = 40, fine = 4500, color = 'red', description = 'Insert Charge Description Here'}, + [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green', description = 'when a person intentionally or knowingly causes physical contact with another (without a weapon)'}, + [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange', description = 'If a person intentionally or knowingly causes injury to another (without a weapon)'}, + [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange', description = 'When a person unintentionally, and recklessly causes bodily injury to another as a result of a confrontation AND causes bodily injury'}, + [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red', description = 'When a person intentionally, knowingly, or recklessly causes bodily injury to another person AND either causes serious bodily injury or uses or exhibits a deadly weapon'}, + [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red', description = 'When a person unintentionally and recklessly causes the death of another'}, + [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red', description = 'when a person unintentionally and recklessly causes the death of anther with a vehicle'}, + [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red', description = 'When a non-government person intentionally attacks another with the intent to kill'}, + [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red', description = 'Any intentional killing that is not premeditated or planned. A situation in which the killer intends only to inflict serious bodily harm.'}, + [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red', description = 'Being present and or participating in the act of parent charge'}, + [10] = {title = 'First Degree Murder', class = 'Felony', id = 'P.C. 1010', months = 0, fine = 0, color = 'red', description = 'Any intentional killing that is willful and premeditated with malice.'}, + [11] = {title = 'Accessory to First Degree Murder', class = 'Felony', id = 'P.C. 1011', months = 0, fine = 0, color = 'red', description = 'Being present and or participating in the act of parent charge'}, + [12] = {title = 'Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1012', months = 0, fine = 0, color = 'red', description = 'Any intentional killing that is done to a government employee'}, + [13] = {title = 'Attempted Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1013', months = 65, fine = 10000, color = 'red', description = 'Any attacks that are done to a government employee with the intent to cause death'}, + [14] = {title = 'Accessory to the Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1014', months = 0, fine = 0, color = 'red', description = 'Being present and or participating in the act of parent charge'}, + [15] = {title = 'Unlawful Imprisonment', class = 'Misdemeanor', id = 'P.C. 1015', months = 10, fine = 600, color = 'green', description = 'The act of taking another against their will and holding them for an extended period of time'}, + [16] = {title = 'Kidnapping', class = 'Felony', id = 'P.C. 1016', months = 15, fine = 900, color = 'orange', description = 'The act of taking another against their will for a short period of time'}, + [17] = {title = 'Accessory to Kidnapping', class = 'Felony', id = 'P.C. 1017', months = 7, fine = 450, color = 'orange', description = 'Being present and or participating in the act of parent charge'}, + [18] = {title = 'Attempted Kidnapping', class = 'Felony', id = 'P.C. 1018', months = 10, fine = 450, color = 'orange', description = 'The act of trying to take someone against their will'}, + [19] = {title = 'Hostage Taking', class = 'Felony', id = 'P.C. 1019', months = 20, fine = 1200, color = 'orange', description = 'The act of taking another against their will for personal gain'}, + [20] = {title = 'Accessory to Hostage Taking', class = 'Felony', id = 'P.C. 1020', months = 10, fine = 600, color = 'orange', description = 'Being present and or participating in the act of parent charge'}, + [21] = {title = 'Unlawful Imprisonment of a Public Servant or Peace Officer.', class = 'Felony', id = 'P.C. 1021', months = 25, fine = 4000, color = 'orange', description = 'The act of taking a government employee against their will for an extended period of time'}, + [22] = {title = 'Criminal Threats', class = 'Misdemeanor', id = 'P.C. 1022', months = 5, fine = 500, color = 'orange', description = 'The act of stating the intent to commit a crime against another'}, + [23] = {title = 'Reckless Endangerment', class = 'Misdemeanor', id = 'P.C. 1023', months = 10, fine = 1000, color = 'orange', description = 'The act of disregarding safety of another which may place another in danger of death or bodily injury'}, + [24] = {title = 'Gang Related Shooting', class = 'Felony', id = 'P.C. 1024', months = 30, fine = 2500, color = 'red', description = 'The act in which a firearm is discharged in relation to gang activity'}, + [25] = {title = 'Cannibalism', class = 'Felony', id = 'P.C. 1025', months = 0, fine = 0, color = 'red', description = 'The act in which a persons consumes the flesh of another willingly'}, + [26] = {title = 'Torture', class = 'Felony', id = 'P.C. 1026', months = 40, fine = 4500, color = 'red', description = 'The act of causing harm to another to extract informaion and or for self enjoyment'}, }, [2] = { - [1] = {title = 'Petty Theft', class = 'Infraction', id = 'P.C. 2001', months = 0, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Grand Theft', class = 'Misdemeanor', id = 'P.C. 2002', months = 10, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Grand Theft Auto A', class = 'Felony', id = 'P.C. 2003', months = 15, fine = 900, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Grand Theft Auto B', class = 'Felony', id = 'P.C. 2004', months = 35, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Carjacking', class = 'Felony', id = 'P.C. 2005', months = 30, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, - [6] = {title = 'Burglary', class = 'Misdemeanor', id = 'P.C. 2006', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Robbery', class = 'Felony', id = 'P.C. 2007', months = 25, fine = 2000, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Accessory to Robbery', class = 'Felony', id = 'P.C. 2008', months = 12, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [9] = {title = 'Attempted Robbery', class = 'Felony', id = 'P.C. 2009', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Armed Robbery', class = 'Felony', id = 'P.C. 2010', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, - [11] = {title = 'Accessory to Armed Robbery', class = 'Felony', id = 'P.C. 2011', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [12] = {title = 'Attempted Armed Robbery', class = 'Felony', id = 'P.C. 2012', months = 25, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [13] = {title = 'Grand Larceny', class = 'Felony', id = 'P.C. 2013', months = 45, fine = 7500, color = 'orange', description = 'Insert Charge Description Here'}, - [14] = {title = 'Leaving Without Paying', class = 'Infraction', id = 'P.C. 2014', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Possession of Nonlegal Currency', class = 'Misdemeanor', id = 'P.C. 2015', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Possession of Government-Issued Items', class = 'Misdemeanor', id = 'P.C. 2016', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [17] = {title = 'Possession of Items Used in the Commission of a Crime', class = 'Misdemeanor', id = 'P.C. 2017', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [18] = {title = 'Sale of Items Used in the Commission of a Crime', class = 'Felony', id = 'P.C. 2018', months = 15, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, - [19] = {title = 'Theft of an Aircraft', class = 'Felony', id = 'P.C. 2019', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [1] = {title = 'Petty Theft', class = 'Infraction', id = 'P.C. 2001', months = 0, fine = 250, color = 'green', description = 'The theft of property below $50 amount'}, + [2] = {title = 'Grand Theft', class = 'Misdemeanor', id = 'P.C. 2002', months = 10, fine = 600, color = 'green', description = 'Theft of property above $700'}, + [3] = {title = 'Grand Theft Auto A', class = 'Felony', id = 'P.C. 2003', months = 15, fine = 900, color = 'green', description = 'The act of stealing a vehicle that belongs to someone else without permission'}, + [4] = {title = 'Grand Theft Auto B', class = 'Felony', id = 'P.C. 2004', months = 35, fine = 3500, color = 'green', description = 'The act of stealing a vehicle that belongs to someone else without permission while armed'}, + [5] = {title = 'Carjacking', class = 'Felony', id = 'P.C. 2005', months = 30, fine = 2000, color = 'orange', description = 'The act of someone forcefully taking a vehicle from its occupants'}, + [6] = {title = 'Burglary', class = 'Misdemeanor', id = 'P.C. 2006', months = 10, fine = 500, color = 'green', description = 'The act of entering into a building illegally with intent to commit a crime, especially theft.'}, + [7] = {title = 'Robbery', class = 'Felony', id = 'P.C. 2007', months = 25, fine = 2000, color = 'green', description = 'The action of taking property unlawfully from a person or place by force or threat of force.'}, + [8] = {title = 'Accessory to Robbery', class = 'Felony', id = 'P.C. 2008', months = 12, fine = 1000, color = 'green', description = 'Being present and or participating in the act of parent charge'}, + [9] = {title = 'Attempted Robbery', class = 'Felony', id = 'P.C. 2009', months = 20, fine = 1000, color = 'green', description = 'The action of attempting property unlawfully from a person or place by force or threat of force.'}, + [10] = {title = 'Armed Robbery', class = 'Felony', id = 'P.C. 2010', months = 30, fine = 3000, color = 'orange', description = 'The action of taking property unlawfully from a person or place by force or threat of force while armed.'}, + [11] = {title = 'Accessory to Armed Robbery', class = 'Felony', id = 'P.C. 2011', months = 15, fine = 1500, color = 'orange', description = 'Being present and or participating in the act of parent charge'}, + [12] = {title = 'Attempted Armed Robbery', class = 'Felony', id = 'P.C. 2012', months = 25, fine = 1500, color = 'orange', description = 'The action of attempting property unlawfully from a person or place by force or threat of force while armed.'}, + [13] = {title = 'Grand Larceny', class = 'Felony', id = 'P.C. 2013', months = 45, fine = 7500, color = 'orange', description = 'Theft of personal property having a value above a legally specified amount.'}, + [14] = {title = 'Leaving Without Paying', class = 'Infraction', id = 'P.C. 2014', months = 0, fine = 500, color = 'green', description = 'The act of leaving an establishment without paying for provided service'}, + [15] = {title = 'Possession of Nonlegal Currency', class = 'Misdemeanor', id = 'P.C. 2015', months = 10, fine = 750, color = 'green', description = 'Being in possession of stolen currency'}, + [16] = {title = 'Possession of Government-Issued Items', class = 'Misdemeanor', id = 'P.C. 2016', months = 15, fine = 1000, color = 'green', description = 'Being in possession of Items only acquireable by government employees'}, + [17] = {title = 'Possession of Items Used in the Commission of a Crime', class = 'Misdemeanor', id = 'P.C. 2017', months = 10, fine = 500, color = 'green', description = 'Being in possession of Items that were previously used to commit crimes'}, + [18] = {title = 'Sale of Items Used in the Commission of a Crime', class = 'Felony', id = 'P.C. 2018', months = 15, fine = 1000, color = 'orange', description = 'The act of selling items that were previously used to commit crimes'}, + [19] = {title = 'Theft of an Aircraft', class = 'Felony', id = 'P.C. 2019', months = 20, fine = 1000, color = 'green', description = 'The act of stealing an aircraft'}, }, [3] = { - [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange', description = 'Insert Charge Description Here'}, - [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [9] = {title = 'Money Laundering', class = 'Felony', id = 'P.C. 3009', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, + [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green', description = 'The action of falsely identifying as another person to deceive'}, + [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green', description = 'The action of falsely identifying as a government employee to deceive'}, + [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green', description = 'The action of falsely identifying as a Judge to deceive'}, + [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green', description = 'To Have another persons Identification without consent'}, + [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green', description = 'To have the Identification of a Government employee without consent'}, + [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange', description = 'To threaten or cause harm to a person or property for financial gain'}, + [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green', description = 'To deceive another for financial gain'}, + [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green', description = 'To falsify legal documentation for personal gain'}, + [9] = {title = 'Money Laundering', class = 'Felony', id = 'P.C. 3009', months = 0, fine = 0, color = 'red', description = 'The processing stolen money for legal currency'}, }, [4] = { - [1] = {title = 'Trespassing', class = 'Misdemeanor', id = 'P.C. 4001', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Felony Trespassing', class = 'Felony', id = 'P.C. 4002', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Arson', class = 'Felony', id = 'P.C. 4003', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [4] = {title = 'Vandalism', class = 'Infraction', id = 'P.C. 4004', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Vandalism of Government Property', class = 'Felony', id = 'P.C. 4005', months = 20, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Littering', class = 'Infraction', id = 'P.C. 4006', months = 0, fine = 200, color = 'green', description = 'Insert Charge Description Here'}, + [1] = {title = 'Trespassing', class = 'Misdemeanor', id = 'P.C. 4001', months = 10, fine = 450, color = 'green', description = 'For a person to be within the bounds of a location of which they are not legally allowed'}, + [2] = {title = 'Felony Trespassing', class = 'Felony', id = 'P.C. 4002', months = 15, fine = 1500, color = 'green', description = 'For a person to have repeatedly entered the bounds of a location of which they are knowingly not legally allowed'}, + [3] = {title = 'Arson', class = 'Felony', id = 'P.C. 4003', months = 15, fine = 1500, color = 'orange', description = 'The use if fire and accelerants to will and maliciously destroy, harm or cause death to a person or property'}, + [4] = {title = 'Vandalism', class = 'Infraction', id = 'P.C. 4004', months = 0, fine = 300, color = 'green', description = 'The willful destruction of property'}, + [5] = {title = 'Vandalism of Government Property', class = 'Felony', id = 'P.C. 4005', months = 20, fine = 1500, color = 'green', description = 'The willful destruction of government property'}, + [6] = {title = 'Littering', class = 'Infraction', id = 'P.C. 4006', months = 0, fine = 200, color = 'green', description = 'The willful discard of refuse into to open and not in designated bin'}, }, [5] = { - [1] = {title = 'Bribery of a Government Official', class = 'Felony', id = 'P.C. 5001', months = 20, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Anti-Mask Law', class = 'Infraction', id = 'P.C. 5002', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Possession of Contraband in a Government Facility', class = 'Felony', id = 'P.C. 5003', months = 25, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Criminal Possession of Stolen Property', class = 'Misdemeanor', id = 'P.C. 5004', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Escaping', class = 'Felony', id = 'P.C. 5005', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Jailbreak', class = 'Felony', id = 'P.C. 5006', months = 30, fine = 2500, color = 'orange', description = 'Insert Charge Description Here'}, - [7] = {title = 'Accessory to Jailbreak', class = 'Felony', id = 'P.C. 5007', months = 25, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, - [8] = {title = 'Attempted Jailbreak', class = 'Felony', id = 'P.C. 5008', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Perjury', class = 'Felony', id = 'P.C. 5009', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Violation of a Restraining Order', class = 'Felony', id = 'P.C. 5010', months = 20, fine = 2250, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'Embezzlement', class = 'Felony', id = 'P.C. 5011', months = 45, fine = 10000, color = 'green', description = 'Insert Charge Description Here'}, - [12] = {title = 'Unlawful Practice', class = 'Felony', id = 'P.C. 5012', months = 15, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [13] = {title = 'Misuse of Emergency Systems', class = 'Infraction', id = 'P.C. 5013', months = 0, fine = 600, color = 'orange', description = 'Insert Charge Description Here'}, - [14] = {title = 'Conspiracy', class = 'Misdemeanor', id = 'P.C. 5014', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Violating a Court Order', class = 'Misdemeanor', id = 'P.C. 5015', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, - [16] = {title = 'Failure to Appear', class = 'Misdemeanor', id = 'P.C. 5016', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, - [17] = {title = 'Contempt of Court', class = 'Felony', id = 'P.C. 5017', months = 0, fine = 0, color = 'orange', description = 'Insert Charge Description Here'}, - [18] = {title = 'Resisting Arrest', class = 'Misdemeanor', id = 'P.C. 5018', months = 5, fine = 300, color = 'orange', description = 'Insert Charge Description Here'}, + [1] = {title = 'Bribery of a Government Official', class = 'Felony', id = 'P.C. 5001', months = 20, fine = 3500, color = 'green', description = 'the use of money, favors and or property to gain favor with a government official'}, + [2] = {title = 'Anti-Mask Law', class = 'Infraction', id = 'P.C. 5002', months = 0, fine = 750, color = 'green', description = 'Wearing a mask in a prohibited zone'}, + [3] = {title = 'Possession of Contraband in a Government Facility', class = 'Felony', id = 'P.C. 5003', months = 25, fine = 1000, color = 'green', description = 'Being in possession of items that are illegal while within a government building'}, + [4] = {title = 'Criminal Possession of Stolen Property', class = 'Misdemeanor', id = 'P.C. 5004', months = 10, fine = 500, color = 'green', description = 'Being in possession of items stolen knowingly or not'}, + [5] = {title = 'Escaping', class = 'Felony', id = 'P.C. 5005', months = 10, fine = 450, color = 'green', description = 'The action of willful and knowingly leaving custody while legally being arrest, detained or in jail'}, + [6] = {title = 'Jailbreak', class = 'Felony', id = 'P.C. 5006', months = 30, fine = 2500, color = 'orange', description = 'The action of leaving state custody from a state or county detention facility'}, + [7] = {title = 'Accessory to Jailbreak', class = 'Felony', id = 'P.C. 5007', months = 25, fine = 2000, color = 'orange', description = 'Being present and or participating in the act of parent charge'}, + [8] = {title = 'Attempted Jailbreak', class = 'Felony', id = 'P.C. 5008', months = 20, fine = 1500, color = 'orange', description = 'The willful and intentional attempted escape from a state or county detention facility'}, + [9] = {title = 'Perjury', class = 'Felony', id = 'P.C. 5009', months = 0, fine = 0, color = 'green', description = 'The action of stating falsities while legally bound to speak the truth'}, + [10] = {title = 'Violation of a Restraining Order', class = 'Felony', id = 'P.C. 5010', months = 20, fine = 2250, color = 'green', description = 'The willful and knowing infringement upon court ordered protective documentation'}, + [11] = {title = 'Embezzlement', class = 'Felony', id = 'P.C. 5011', months = 45, fine = 10000, color = 'green', description = 'The willful and knowingly movement of funds from non personal bank accounts to personal bank accounts for personal gain'}, + [12] = {title = 'Unlawful Practice', class = 'Felony', id = 'P.C. 5012', months = 15, fine = 1500, color = 'orange', description = 'The action of performing a service without proper legal licensing and approval'}, + [13] = {title = 'Misuse of Emergency Systems', class = 'Infraction', id = 'P.C. 5013', months = 0, fine = 600, color = 'orange', description = 'Use of government emergency equipment for its non-intended purpose'}, + [14] = {title = 'Conspiracy', class = 'Misdemeanor', id = 'P.C. 5014', months = 10, fine = 450, color = 'green', description = 'The act of planning a crime but not yet commiting the crime'}, + [15] = {title = 'Violating a Court Order', class = 'Misdemeanor', id = 'P.C. 5015', months = 0, fine = 0, color = 'orange', description = 'The infringement of court ordered documentation'}, + [16] = {title = 'Failure to Appear', class = 'Misdemeanor', id = 'P.C. 5016', months = 0, fine = 0, color = 'orange', description = 'When someone who is legally bound to appear in court does not do so'}, + [17] = {title = 'Contempt of Court', class = 'Felony', id = 'P.C. 5017', months = 0, fine = 0, color = 'orange', description = 'The disruption of court proceedings in a courtroom while it is in session (judicial decision)'}, + [18] = {title = 'Resisting Arrest', class = 'Misdemeanor', id = 'P.C. 5018', months = 5, fine = 300, color = 'orange', description = 'The act of not allowing peace officers to take you into custody willingly'}, }, [6] = { - [1] = {title = 'Disobeying a Peace Officer', class = 'infraction', id = 'P.C. 6001', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Disorderly Conduct', class = 'Infraction', id = 'P.C. 6002', months = 0, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Disturbing the Peace', class = 'infraction', id = 'P.C. 6003', months = 0, fine = 350, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'False Reporting', class = 'Misdemeanor', id = 'P.C. 6004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Harassment', class = 'Misdemeanor', id = 'P.C. 6005', months = 10, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, - [6] = {title = 'Misdemeanor Obstruction of Justice', class = 'Misdemeanor', id = 'P.C. 6006', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Felony Obstruction of Justice', class = 'Felony', id = 'P.C. 6007', months = 15, fine = 900, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Inciting a Riot', class = 'Felony', id = 'P.C. 6008', months = 25, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Loitering on Government Properties', class = 'Infraction', id = 'P.C. 6009', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Tampering', class = 'Misdemeanor', id = 'P.C. 6010', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'Vehicle Tampering', class = 'Misdemeanor', id = 'P.C. 6011', months = 15, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [12] = {title = 'Evidence Tampering', class = 'Felony', id = 'P.C. 6012', months = 20, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [13] = {title = 'Witness Tampering', class = 'Felony', id = 'P.C. 6013', months = 0, fine = 0, color = 'green', description = 'Insert Charge Description Here'}, - [14] = {title = 'Failure to Provide Identification', class = 'Misdemeanor', id = 'P.C. 6014', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Vigilantism', class = 'Felony', id = 'P.C. 6015', months = 30, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [16] = {title = 'Unlawful Assembly', class = 'Misdemeanor', id = 'P.C. 6016', months = 10, fine = 750, color = 'orange', description = 'Insert Charge Description Here'}, - [17] = {title = 'Government Corruption', class = 'Felony', id = 'P.C. 6017', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [18] = {title = 'Stalking', class = 'Felony', id = 'P.C. 6018', months = 40, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [19] = {title = 'Aiding and Abetting', class = 'Misdemeanor', id = 'P.C. 6019', months = 15, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, - [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, + [1] = {title = 'Disobeying a Peace Officer', class = 'infraction', id = 'P.C. 6001', months = 0, fine = 750, color = 'green', description = 'The willful disregard of a lawful order'}, + [2] = {title = 'Disorderly Conduct', class = 'Infraction', id = 'P.C. 6002', months = 0, fine = 250, color = 'green', description = 'Acting in a manner that creates a hazardous or physically offensive condition by any act which serves no legitimate purpose of the actor. '}, + [3] = {title = 'Disturbing the Peace', class = 'infraction', id = 'P.C. 6003', months = 0, fine = 350, color = 'green', description = 'Action in a manner that causes unrest and disrupts public order'}, + [4] = {title = 'False Reporting', class = 'Misdemeanor', id = 'P.C. 6004', months = 10, fine = 750, color = 'green', description = 'The act of reporting a crime that did not happen'}, + [5] = {title = 'Harassment', class = 'Misdemeanor', id = 'P.C. 6005', months = 10, fine = 500, color = 'orange', description = 'The repeated disruption or verbal attacks of another person'}, + [6] = {title = 'Misdemeanor Obstruction of Justice', class = 'Misdemeanor', id = 'P.C. 6006', months = 10, fine = 500, color = 'green', description = 'Acting in a way that hinders the process of Justice or lawful investigations'}, + [7] = {title = 'Felony Obstruction of Justice', class = 'Felony', id = 'P.C. 6007', months = 15, fine = 900, color = 'green', description = 'Acting in a way that hinders the process of Justice or lawful investigations while using violence'}, + [8] = {title = 'Inciting a Riot', class = 'Felony', id = 'P.C. 6008', months = 25, fine = 1000, color = 'orange', description = 'Causing civil unrest in a manner to incite a group to cause harm to people or property'}, + [9] = {title = 'Loitering on Government Properties', class = 'Infraction', id = 'P.C. 6009', months = 0, fine = 500, color = 'green', description = 'When someone is present in a government proper for an extended period of time'}, + [10] = {title = 'Tampering', class = 'Misdemeanor', id = 'P.C. 6010', months = 10, fine = 500, color = 'green', description = 'When someone willfully, knowingly and indirectly interfering with key points of a lawful investigation'}, + [11] = {title = 'Vehicle Tampering', class = 'Misdemeanor', id = 'P.C. 6011', months = 15, fine = 750, color = 'green', description = 'The willful and knowing interference the normal function of a vehicle'}, + [12] = {title = 'Evidence Tampering', class = 'Felony', id = 'P.C. 6012', months = 20, fine = 1000, color = 'green', description = 'The willful and knowing interference with evidence from a lawful investigation'}, + [13] = {title = 'Witness Tampering', class = 'Felony', id = 'P.C. 6013', months = 0, fine = 0, color = 'green', description = 'The willful and knowing coaching or coercing of a witness in a lawful investigation'}, + [14] = {title = 'Failure to Provide Identification', class = 'Misdemeanor', id = 'P.C. 6014', months = 15, fine = 1500, color = 'green', description = 'The act of not presenting identification when lawfully required to do so'}, + [15] = {title = 'Vigilantism', class = 'Felony', id = 'P.C. 6015', months = 30, fine = 1500, color = 'orange', description = 'The act of engaging in enforcing the law with legal authority to do so'}, + [16] = {title = 'Unlawful Assembly', class = 'Misdemeanor', id = 'P.C. 6016', months = 10, fine = 750, color = 'orange', description = 'when a large group gathers in a location that requires prior approval to do so'}, + [17] = {title = 'Government Corruption', class = 'Felony', id = 'P.C. 6017', months = 0, fine = 0, color = 'red', description = 'The act of using political position and power for self gain'}, + [18] = {title = 'Stalking', class = 'Felony', id = 'P.C. 6018', months = 40, fine = 1500, color = 'orange', description = 'When one person monitors another without their consent'}, + [19] = {title = 'Aiding and Abetting', class = 'Misdemeanor', id = 'P.C. 6019', months = 15, fine = 450, color = 'orange', description = 'To assist someone in committing or to encourage someone to commit a crime'}, + [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green', description = 'When someone willingly hides another who is wanted by the authorities'}, }, [7] = { - [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Mask', id = 'P.C. 7001', months = 5, fine = 250, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Felony Possession of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [5] = {title = 'Possession of Marijuana with Intent to Distribute', class = 'Felony', id = 'P.C. 7005', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, - [6] = {title = 'Misdemeanor Possession of Cocaine', class = 'Misdemeanor', id = 'P.C. 7006', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Felony Possession of Cocaine', class = 'Felony', id = 'P.C. 7007', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Possession of Cocaine with Intent to Distribute', class = 'Felony', id = 'P.C. 7008', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Felony Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7012', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [13] = {title = 'Felony Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Felony Possession of Ecstasy', class = 'Felony', id = 'P.C. 7016', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [17] = {title = 'Possession of Ecstasy with Intent to Distribute', class = 'Felony', id = 'P.C. 7017', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [18] = {title = 'Misdemeanor Possession of Opium', class = 'Misdemeanor', id = 'P.C. 7018', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [19] = {title = 'Felony Possession of Opium', class = 'Felony', id = 'P.C. 7019', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [20] = {title = 'Possession of Opium with Intent to Distribute', class = 'Felony', id = 'P.C. 7020', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [21] = {title = 'Misdemeanor Possession of Adderall', class = 'Misdemeanor', id = 'P.C. 7021', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [22] = {title = 'Felony Possession of Adderall', class = 'Felony', id = 'P.C. 7022', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [23] = {title = 'Possession of Adderall with Intent to Distribute', class = 'Felony', id = 'P.C. 7023', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [24] = {title = 'Misdemeanor Possession of Xanax', class = 'Misdemeanor', id = 'P.C. 7024', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [25] = {title = 'Felony Possession of Xanax', class = 'Felony', id = 'P.C. 7025', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [26] = {title = 'Possession of Xanax with Intent to Distribute', class = 'Felony', id = 'P.C. 7026', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [27] = {title = 'Misdemeanor Possession of Shrooms', class = 'Misdemeanor', id = 'P.C. 7027', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [28] = {title = 'Felony Possession of Shrooms', class = 'Felony', id = 'P.C. 7028', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [29] = {title = 'Possession of Shrooms with Intent to Distribute', class = 'Felony', id = 'P.C. 7029', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [30] = {title = 'Misdemeanor Possession of Lean', class = 'Misdemeanor', id = 'P.C. 7030', months = 7, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [31] = {title = 'Felony Possession of Lean', class = 'Felony', id = 'P.C. 7031', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [32] = {title = 'Possession of Lean with Intent to Distribute', class = 'Felony', id = 'P.C. 7032', months = 35, fine = 4500, color = 'orange', description = 'Insert Charge Description Here'}, - [33] = {title = 'Sale of a controlled substance', class = 'Misdemeanor', id = 'P.C. 7033', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [34] = {title = 'Drug Trafficking', class = 'Felony', id = 'P.C. 7034', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [35] = {title = 'Desecration of a Human Corpse', class = 'Felony', id = 'P.C. 7035', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [36] = {title = 'Public Intoxication', class = 'Infraction', id = 'P.C. 7036', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [37] = {title = 'Public Indecency', class = 'Misdemeanor', id = 'P.C. 7037', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Mask', id = 'P.C. 7001', months = 5, fine = 250, color = 'green', description = 'The possession of a quantity of marijuana in the amount of less the 4 blunts'}, + [2] = {title = 'Felony manufacturing of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'red', description = 'The possession of a quantity of marijuana that is from manufacturing'}, + [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green', description = 'The possession of 4 or less marijuana plants'}, + [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange', description = 'The possession of 5 or more marijuana plants'}, + [5] = {title = 'Possession of Marijuana with Intent to Distribute', class = 'Felony', id = 'P.C. 7005', months = 30, fine = 3000, color = 'orange', description = 'The possession of a quantity of Marijuana for distribution'}, + [6] = {title = 'Misdemeanor Possession of Cocaine', class = 'Misdemeanor', id = 'P.C. 7006', months = 7, fine = 500, color = 'green', description = 'The possession of cocaine in a small quantity usually for personal use'}, + [7] = {title = 'Felony manufacturing Possession of Cocaine', class = 'Felony', id = 'P.C. 7007', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of cocaine that is from manufacturing'}, + [8] = {title = 'Possession of Cocaine with Intent to Distribute', class = 'Felony', id = 'P.C. 7008', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Cocaine for distribution'}, + [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green', description = 'The possession of methamphetamine in a small quantity usually for personal use'}, + [10] = {title = 'Felony manufacturing Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of methamphetamine that is from manufacturing'}, + [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Methamphetamine for distribution'}, + [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7012', months = 7, fine = 500, color = 'green', description = 'The possession of oxy / vicodin in a small quantity usually for personal use without prescription'}, + [13] = {title = 'Felony manufacturing Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of oxy / vicodin that is from manufacturing'}, + [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of oxy / vicodin for distribution'}, + [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green', description = 'The possession of ecstasy in a small quantity usually for personal use'}, + [16] = {title = 'Felony manufacturing Possession of Ecstasy', class = 'Felony', id = 'P.C. 7016', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of ecstasy that is from manufacturing'}, + [17] = {title = 'Possession of Ecstasy with Intent to Distribute', class = 'Felony', id = 'P.C. 7017', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of ecstasy for distribution'}, + [18] = {title = 'Misdemeanor Possession of Opium', class = 'Misdemeanor', id = 'P.C. 7018', months = 7, fine = 500, color = 'green', description = 'The possession of opium in a small quantity usually for personal use'}, + [19] = {title = 'Felony manufacturing Possession of Opium', class = 'Felony', id = 'P.C. 7019', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of opium that is from manufacturing'}, + [20] = {title = 'Possession of Opium with Intent to Distribute', class = 'Felony', id = 'P.C. 7020', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Opium for distribution'}, + [21] = {title = 'Misdemeanor Possession of Adderall', class = 'Misdemeanor', id = 'P.C. 7021', months = 7, fine = 500, color = 'green', description = 'The possession of adderall in a small quantity usually for personal use without prescription'}, + [22] = {title = 'Felony manufacturing Possession of Adderall', class = 'Felony', id = 'P.C. 7022', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of adderall that is from manufacturing'}, + [23] = {title = 'Possession of Adderall with Intent to Distribute', class = 'Felony', id = 'P.C. 7023', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Adderall for distribution'}, + [24] = {title = 'Misdemeanor Possession of Xanax', class = 'Misdemeanor', id = 'P.C. 7024', months = 7, fine = 500, color = 'green', description = 'The possession of xanax in a small quantity usually for personal use without prescription'}, + [25] = {title = 'Felony manufacturing Possession of Xanax', class = 'Felony', id = 'P.C. 7025', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of xanax that is from manufacturing'}, + [26] = {title = 'Possession of Xanax with Intent to Distribute', class = 'Felony', id = 'P.C. 7026', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Xanax for distribution'}, + [27] = {title = 'Misdemeanor Possession of Shrooms', class = 'Misdemeanor', id = 'P.C. 7027', months = 7, fine = 500, color = 'green', description = 'The possession of shrooms in a small quantity usually for personal use'}, + [28] = {title = 'Felony manufacturing Possession of Shrooms', class = 'Felony', id = 'P.C. 7028', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of shrooms that is from manufacturing'}, + [29] = {title = 'Possession of Shrooms with Intent to Distribute', class = 'Felony', id = 'P.C. 7029', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Shrooms for distribution'}, + [30] = {title = 'Misdemeanor Possession of Lean', class = 'Misdemeanor', id = 'P.C. 7030', months = 7, fine = 500, color = 'green', description = 'The possession of lean in a small quantity usually for personal use'}, + [31] = {title = 'Felony manufacturing Possession of Lean', class = 'Felony', id = 'P.C. 7031', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of lean that is from manufacturing'}, + [32] = {title = 'Possession of Lean with Intent to Distribute', class = 'Felony', id = 'P.C. 7032', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of lean for distribution'}, + [33] = {title = 'Sale of a controlled substance', class = 'Misdemeanor', id = 'P.C. 7033', months = 10, fine = 1000, color = 'green', description = 'The sale of a substance that is controlled by law'}, + [34] = {title = 'Drug Trafficking', class = 'Felony', id = 'P.C. 7034', months = 0, fine = 0, color = 'red', description = 'The large scale movement of illegal drugs'}, + [35] = {title = 'Desecration of a Human Corpse', class = 'Felony', id = 'P.C. 7035', months = 20, fine = 1500, color = 'orange', description = 'When someone harms, disturbs or destroys the remains of another person'}, + [36] = {title = 'Public Intoxication', class = 'Infraction', id = 'P.C. 7036', months = 0, fine = 500, color = 'green', description = 'When someone is intoxicated above legal limit in public'}, + [37] = {title = 'Public Indecency', class = 'Misdemeanor', id = 'P.C. 7037', months = 10, fine = 750, color = 'green', description = 'The act of someone exposing themself in a way that infringes in public morals'}, }, [8] = { - [1] = {title = 'Criminal Possession of Weapon Class A', class = 'Felony', id = 'P.C. 8001', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Criminal Possession of Weapon Class B', class = 'Felony', id = 'P.C. 8002', months = 15, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Criminal Possession of Weapon Class C', class = 'Felony', id = 'P.C. 8003', months = 30, fine = 3500, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Criminal Possession of Weapon Class D', class = 'Felony', id = 'P.C. 8004', months = 25, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Criminal Sale of Weapon Class A', class = 'Felony', id = 'P.C. 8005', months = 15, fine = 1000, color = 'orange', description = 'Insert Charge Description Here'}, - [6] = {title = 'Criminal Sale of Weapon Class B', class = 'Felony', id = 'P.C. 8006', months = 20, fine = 2000, color = 'orange', description = 'Insert Charge Description Here'}, - [7] = {title = 'Criminal Sale of Weapon Class C', class = 'Felony', id = 'P.C. 8007', months = 35, fine = 7000, color = 'orange', description = 'Insert Charge Description Here'}, - [8] = {title = 'Criminal Sale of Weapon Class D', class = 'Felony', id = 'P.C. 8008', months = 30, fine = 3000, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Criminal Use of Weapon', class = 'Misdemeanor', id = 'P.C. 8009', months = 10, fine = 450, color = 'orange', description = 'Insert Charge Description Here'}, - [10] = {title = 'Possession of Illegal Firearm Modifications', class = 'Misdemeanor', id = 'P.C. 8010', months = 10, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'Weapon Trafficking', class = 'Felony', id = 'P.C. 8011', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [12] = {title = 'Brandishing a Weapon', class = 'Misdemeanor', id = 'P.C. 8012', months = 15, fine = 500, color = 'orange', description = 'Insert Charge Description Here'}, - [13] = {title = 'Insurrection', class = 'Felony', id = 'P.C. 8013', months = 0, fine = 0, color = 'red', description = 'Insert Charge Description Here'}, - [14] = {title = 'Flying into Restricted Airspace', class = 'Felony', id = 'P.C. 8014', months = 20, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Jaywalking', class = 'Infraction', id = 'P.C. 8015', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Criminal Use of Explosives', class = 'Felony', id = 'P.C. 8016', months = 30, fine = 2500, color = 'orange', description = 'Insert Charge Description Here'}, + [1] = {title = 'Criminal Possession of Weapon Class A', class = 'Felony', id = 'P.C. 8001', months = 10, fine = 500, color = 'green', description = 'Possession of a Class A firearm without licensing'}, + [2] = {title = 'Criminal Possession of Weapon Class B', class = 'Felony', id = 'P.C. 8002', months = 15, fine = 1000, color = 'green', description = 'Possession of a Class B firearm without licensing'}, + [3] = {title = 'Criminal Possession of Weapon Class C', class = 'Felony', id = 'P.C. 8003', months = 30, fine = 3500, color = 'green', description = 'Possession of a Class C firearm without licensing'}, + [4] = {title = 'Criminal Possession of Weapon Class D', class = 'Felony', id = 'P.C. 8004', months = 25, fine = 1500, color = 'green', description = 'Possession of a Class D firearm without licensing'}, + [5] = {title = 'Criminal Sale of Weapon Class A', class = 'Felony', id = 'P.C. 8005', months = 15, fine = 1000, color = 'orange', description = 'The act of selling a Class A firearm without licensing'}, + [6] = {title = 'Criminal Sale of Weapon Class B', class = 'Felony', id = 'P.C. 8006', months = 20, fine = 2000, color = 'orange', description = 'The act of selling a Class B firearm without licensing'}, + [7] = {title = 'Criminal Sale of Weapon Class C', class = 'Felony', id = 'P.C. 8007', months = 35, fine = 7000, color = 'orange', description = 'The act of selling a Class C firearm without licensing'}, + [8] = {title = 'Criminal Sale of Weapon Class D', class = 'Felony', id = 'P.C. 8008', months = 30, fine = 3000, color = 'orange', description = 'The act of selling a Class D firearm without licensing'}, + [9] = {title = 'Criminal Use of Weapon', class = 'Misdemeanor', id = 'P.C. 8009', months = 10, fine = 450, color = 'orange', description = 'Use of a weapon while in commission of a crime'}, + [10] = {title = 'Possession of Illegal Firearm Modifications', class = 'Misdemeanor', id = 'P.C. 8010', months = 10, fine = 300, color = 'green', description = 'Being in possession of firearm modifications unlawfully'}, + [11] = {title = 'Weapon Trafficking', class = 'Felony', id = 'P.C. 8011', months = 0, fine = 0, color = 'red', description = 'The transportation of a large amount of weapons for one point to another'}, + [12] = {title = 'Brandishing a Weapon', class = 'Misdemeanor', id = 'P.C. 8012', months = 15, fine = 500, color = 'orange', description = 'The act of making a firearm purposely visible'}, + [13] = {title = 'Insurrection', class = 'Felony', id = 'P.C. 8013', months = 0, fine = 0, color = 'red', description = 'Attempting to overthrow the government with violence'}, + [14] = {title = 'Flying into Restricted Airspace', class = 'Felony', id = 'P.C. 8014', months = 20, fine = 1500, color = 'green', description = 'Piloting and aircraft into airspace that is governmentally controlled'}, + [15] = {title = 'Jaywalking', class = 'Infraction', id = 'P.C. 8015', months = 0, fine = 150, color = 'green', description = 'crossing a roadway in a manner that is hazardous to motor vehicles'}, + [16] = {title = 'Criminal Use of Explosives', class = 'Felony', id = 'P.C. 8016', months = 30, fine = 2500, color = 'orange', description = 'Use of explosives to committing a crime'}, }, [9] = { - [1] = {title = 'Driving While Intoxicated', class = 'Misdemeanor', id = 'P.C. 9001', months = 5, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Evading', class = 'Misdemeanor', id = 'P.C. 9002', months = 5, fine = 400, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Reckless Evading', class = 'Felony', id = 'P.C. 9003', months = 10, fine = 800, color = 'orange', description = 'Insert Charge Description Here'}, - [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange', description = 'Insert Charge Description Here'}, - [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green', description = 'Insert Charge Description Here'}, - [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green', description = 'Insert Charge Description Here'}, - [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green', description = 'Insert Charge Description Here'}, - [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green', description = 'Insert Charge Description Here'}, - [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green', description = 'Insert Charge Description Here'}, - [20] = {title = 'Driving without Headlights or Signals', class = 'Infraction', id = 'P.C. 9020', months = 0, fine = 300, color = 'green', description = 'Insert Charge Description Here'}, - [21] = {title = 'Street Racing', class = 'Felony', id = 'P.C. 9021', months = 15, fine = 1500, color = 'green', description = 'Insert Charge Description Here'}, - [22] = {title = 'Piloting without Proper Licensing', class = 'Felony', id = 'P.C. 9022', months = 20, fine = 1500, color = 'orange', description = 'Insert Charge Description Here'}, - [23] = {title = 'Unlawful Use of a Motorvehicle', class = 'Misdemeanor', id = 'P.C. 9023', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, + [1] = {title = 'Driving While Intoxicated', class = 'Misdemeanor', id = 'P.C. 9001', months = 5, fine = 300, color = 'green', description = 'Operating a motor vehicle while impaired by alcohol'}, + [2] = {title = 'Evading', class = 'Misdemeanor', id = 'P.C. 9002', months = 5, fine = 400, color = 'green', description = 'Hiding or running from lawful detainment'}, + [3] = {title = 'Reckless Evading', class = 'Felony', id = 'P.C. 9003', months = 10, fine = 800, color = 'orange', description = 'Recklessly disregarding safety and Hiding or running from lawful detainment while '}, + [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green', description = 'Not giving way to emergency vehicles'}, + [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green', description = 'Not following the safety devices of the roadway'}, + [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green', description = 'Having a vehicle that is no longer functional in the roadway'}, + [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green', description = 'Driveing in a manner as to unknowingly disregard safety'}, + [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange', description = 'Driveing in a manner as to knowingly disregard safety'}, + [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green', description = 'Speeding 15 over the limit'}, + [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green', description = 'Speeding 35 over the limit'}, + [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green', description = 'Speeding 50 over the limit'}, + [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green', description = 'The operation of a motor vehicle without proper licensing'}, + [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green', description = 'Performing a u-turn where it is prohibited'}, + [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green', description = 'passing other motor vehicles in a prohibited manner'}, + [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green', description = 'Not staying in the correct lane with a motor vehicle'}, + [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green', description = 'performing a turn where it is prohibited'}, + [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green', description = 'Not stopping for a lawful stop or traffic device'}, + [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green', description = 'Parking a vehicle in a location that requires approval with any'}, + [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green', description = 'Striking another person or vehicle and fleeing the location'}, + [20] = {title = 'Driving without Headlights or Signals', class = 'Infraction', id = 'P.C. 9020', months = 0, fine = 300, color = 'green', description = 'Operating a vehicle with no functional lights'}, + [21] = {title = 'Street Racing', class = 'Felony', id = 'P.C. 9021', months = 15, fine = 1500, color = 'green', description = 'Operating motorvehicles in a contest'}, + [22] = {title = 'Piloting without Proper Licensing', class = 'Felony', id = 'P.C. 9022', months = 20, fine = 1500, color = 'orange', description = 'Failure to be in possession of valid licensing when operating an aircraft'}, + [23] = {title = 'Unlawful Use of a Motor Vehicle', class = 'Misdemeanor', id = 'P.C. 9023', months = 10, fine = 750, color = 'green', description = 'The use of a motor vehicle without a lawful reason'}, }, [10] = { - [1] = {title = 'Hunting in Restricted Areas', class = 'Infraction', id = 'P.C. 10001', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [2] = {title = 'Unlicensed Hunting', class = 'Infraction', id = 'P.C. 10002', months = 0, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [3] = {title = 'Animal Cruelty', class = 'Misdemeanor', id = 'P.C. 10003', months = 10, fine = 450, color = 'green', description = 'Insert Charge Description Here'}, - [4] = {title = 'Hunting with a Non-Hunting Weapon', class = 'Misdemeanor', id = 'P.C. 10004', months = 10, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [5] = {title = 'Hunting outside of hunting hours', class = 'Infraction', id = 'P.C. 10005', months = 0, fine = 750, color = 'green', description = 'Insert Charge Description Here'}, - [6] = {title = 'Overhunting', class = 'Misdemeanor', id = 'P.C. 10006', months = 10, fine = 1000, color = 'green', description = 'Insert Charge Description Here'}, - [7] = {title = 'Poaching', class = 'Felony', id = 'P.C. 10007', months = 20, fine = 1250, color = 'red', description = 'Insert Charge Description Here'}, + [1] = {title = 'Hunting in Restricted Areas', class = 'Infraction', id = 'P.C. 10001', months = 0, fine = 450, color = 'green', description = 'Harvesting game in areas where it is prohibited to do so'}, + [2] = {title = 'Unlicensed Hunting', class = 'Infraction', id = 'P.C. 10002', months = 0, fine = 450, color = 'green', description = 'Harvesting game without proper licensing'}, + [3] = {title = 'Animal Cruelty', class = 'Misdemeanor', id = 'P.C. 10003', months = 10, fine = 450, color = 'green', description = 'The act of abusing an animal knowingly or not'}, + [4] = {title = 'Hunting with a Non-Hunting Weapon', class = 'Misdemeanor', id = 'P.C. 10004', months = 10, fine = 750, color = 'green', description = 'To use a weapon not lawfully stated or manufactured to be used for the harvesting of wild game'}, + [5] = {title = 'Hunting outside of hunting hours', class = 'Infraction', id = 'P.C. 10005', months = 0, fine = 750, color = 'green', description = 'Harvesting animals outside of specified time to do so'}, + [6] = {title = 'Overhunting', class = 'Misdemeanor', id = 'P.C. 10006', months = 10, fine = 1000, color = 'green', description = 'Taking more than legally specified amount of game'}, + [7] = {title = 'Poaching', class = 'Felony', id = 'P.C. 10007', months = 20, fine = 1250, color = 'red', description = 'Harvesting an animal that is listed as legally non-harvestable'}, } } From 56772008f5d5a1aa2def4250d01e06f5472cd286 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 15 Mar 2023 15:02:03 +0100 Subject: [PATCH 103/381] changes for profile tab - changes for profile tab --- ui/style.css | 68 ++++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/ui/style.css b/ui/style.css index 4e180620..1f60e8e7 100644 --- a/ui/style.css +++ b/ui/style.css @@ -939,7 +939,7 @@ a { .profile-item { background-color: var(--color-5); width: 100%; - height: 9vh; + height: 12vh; margin: auto; margin-bottom: 10px; margin-top: 0px; @@ -953,8 +953,8 @@ a { } .profile-image { - width: 7vh; - height: 7vh; + width: 10vh; + height: 10vh; margin-left: 10px; margin-top: auto; margin-bottom: auto; @@ -1237,7 +1237,7 @@ a { .manage-profile-right-container { display: flex; flex-direction: column; - height: 95.7%; + height: 97.9%; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -1248,7 +1248,7 @@ a { background-color: var(--color-1); width: 100%; border: 2px solid var(--color-3); - height: 15%; + height: 13%; } .license-title { @@ -1260,7 +1260,7 @@ a { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1270,7 +1270,7 @@ a { .licenses-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1297,8 +1297,9 @@ a { flex-direction: column; background-color: var(--color-1); width: 100%; + height: 15%; border: 2px solid var(--color-3); - margin-top: 10px; + margin-top: 5px; min-height: 100px; max-height: 200px; overflow: scroll; @@ -1313,7 +1314,7 @@ a { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-right: 0px; margin-bottom: 0px; width: 84%; @@ -1329,7 +1330,7 @@ a { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -1352,6 +1353,7 @@ a { display: inline-block; text-decoration: none; margin: auto; + margin-bottom: 5px; margin-left: 0px; margin-right: 10px; padding: 4px; @@ -1376,7 +1378,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-left: 0px; margin-right: 10px; - margin-top: 10px; + margin-top: 5px; padding: 4px; padding-left: 8px; padding-right: 8px; @@ -1396,8 +1398,9 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; + height: 15%; border: 2px solid var(--color-3); - margin-top: 10px; + margin-top: 5px; max-height: 150px; overflow: scroll; } @@ -1411,7 +1414,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1421,7 +1424,7 @@ span.tag-input[contenteditable]:empty::before { .vehs-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1432,7 +1435,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-left: 0px; margin-right: 10px; - margin-top: 10px; + margin-top: 5px; padding: 4px; padding-left: 8px; padding-right: 8px; @@ -1449,8 +1452,9 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; + height: 15%; border: 2px solid var(--color-3); - margin-top: 10px; + margin-top: 5px; max-height: 150px; overflow: scroll; } @@ -1464,7 +1468,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1474,7 +1478,7 @@ span.tag-input[contenteditable]:empty::before { .houses-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1485,7 +1489,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-left: 0px; margin-right: 10px; - margin-top: 10px; + margin-top: 5px; padding: 4px; padding-left: 8px; padding-right: 8px; @@ -1503,8 +1507,8 @@ span.tag-input[contenteditable]:empty::before { background-color: var(--color-1); width: 100%; border: 2px solid var(--color-3); - margin-top: 10px; - height: 18vh; + margin-top: 5px; + height: 15vh; overflow: scroll; } @@ -1517,7 +1521,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-right: 0px; margin-bottom: 0px; width: 84%; @@ -1533,7 +1537,7 @@ span.tag-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -1548,7 +1552,7 @@ span.tag-input[contenteditable]:empty::before { overflow: auto; white-space: nowrap; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1564,8 +1568,9 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; + height: 15%; border: 2px solid var(--color-3); - margin-top: 10px; + margin-top: 5px; max-height: 200px; overflow: scroll; } @@ -1579,18 +1584,18 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; user-select: none; - + } .convictions-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1600,8 +1605,9 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; + height: 15%; border: 2px solid var(--color-3); - margin-top: 10px; + margin-top: 5px; max-height: 200px; overflow: scroll; } @@ -1615,7 +1621,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1625,7 +1631,7 @@ span.tag-input[contenteditable]:empty::before { .profile-incidents-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } From 9f5ff450709bd5b4c76ac1db54b2d56a12ca3c1c Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 15 Mar 2023 15:02:29 +0100 Subject: [PATCH 104/381] changes to app.js for profile tab changes to app.js for profile tab --- ui/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/app.js b/ui/app.js index d2c7b4ab..732b8b28 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5426,7 +5426,7 @@ function searchProfilesResults(result) {
                -
                ID: ${value.citizenid}
                  +
                Citizen ID: ${value.citizenid}
                 
                @@ -5590,4 +5590,3 @@ $(".map-clear").on('click', function() { ClearMap(); }, 1500); }); - From abf318eb9d187aed7e266150d75781aacc24e60f Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 15 Mar 2023 19:16:05 +0100 Subject: [PATCH 105/381] js edits js edits --- ui/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/app.js b/ui/app.js index d2c7b4ab..732b8b28 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5426,7 +5426,7 @@ function searchProfilesResults(result) {
                -
                ID: ${value.citizenid}
                  +
                Citizen ID: ${value.citizenid}
                 
                @@ -5590,4 +5590,3 @@ $(".map-clear").on('click', function() { ClearMap(); }, 1500); }); - From f6b53e5cb1824b16ead1bb9bbb24bf59d1dc9e32 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 15 Mar 2023 19:16:49 +0100 Subject: [PATCH 106/381] html --- ui/dashboard.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/dashboard.html b/ui/dashboard.html index 1b1e8151..e06e9eb4 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -321,13 +321,11 @@
                -
                Known Convictions
                -
                +
                Show Convictions
                -
                Incidents
                -
                +
                Show Incidents
                From 2b89c00dd5e8af58d3a46c6e3e6fb8eb2bdba757 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 15 Mar 2023 19:17:07 +0100 Subject: [PATCH 107/381] css css --- ui/style.css | 75 +++++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/ui/style.css b/ui/style.css index 4e180620..2f7b1b45 100644 --- a/ui/style.css +++ b/ui/style.css @@ -939,7 +939,7 @@ a { .profile-item { background-color: var(--color-5); width: 100%; - height: 9vh; + height: 12vh; margin: auto; margin-bottom: 10px; margin-top: 0px; @@ -953,8 +953,8 @@ a { } .profile-image { - width: 7vh; - height: 7vh; + width: 10vh; + height: 10vh; margin-left: 10px; margin-top: auto; margin-bottom: auto; @@ -1237,7 +1237,7 @@ a { .manage-profile-right-container { display: flex; flex-direction: column; - height: 95.7%; + height: 97.9%; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -1260,7 +1260,7 @@ a { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1270,7 +1270,7 @@ a { .licenses-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1297,8 +1297,9 @@ a { flex-direction: column; background-color: var(--color-1); width: 100%; + height: 18%; border: 2px solid var(--color-3); - margin-top: 10px; + margin-top: 5px; min-height: 100px; max-height: 200px; overflow: scroll; @@ -1313,7 +1314,7 @@ a { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-right: 0px; margin-bottom: 0px; width: 84%; @@ -1329,7 +1330,7 @@ a { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -1352,6 +1353,7 @@ a { display: inline-block; text-decoration: none; margin: auto; + margin-bottom: 5px; margin-left: 0px; margin-right: 10px; padding: 4px; @@ -1376,7 +1378,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-left: 0px; margin-right: 10px; - margin-top: 10px; + margin-top: 5px; padding: 4px; padding-left: 8px; padding-right: 8px; @@ -1396,8 +1398,9 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; + height: 18%; border: 2px solid var(--color-3); - margin-top: 10px; + margin-top: 5px; max-height: 150px; overflow: scroll; } @@ -1411,7 +1414,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1421,7 +1424,7 @@ span.tag-input[contenteditable]:empty::before { .vehs-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1432,7 +1435,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-left: 0px; margin-right: 10px; - margin-top: 10px; + margin-top: 5px; padding: 4px; padding-left: 8px; padding-right: 8px; @@ -1449,8 +1452,9 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; + height: 18%; border: 2px solid var(--color-3); - margin-top: 10px; + margin-top: 5px; max-height: 150px; overflow: scroll; } @@ -1464,7 +1468,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1474,7 +1478,7 @@ span.tag-input[contenteditable]:empty::before { .houses-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1485,7 +1489,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-left: 0px; margin-right: 10px; - margin-top: 10px; + margin-top: 5px; padding: 4px; padding-left: 8px; padding-right: 8px; @@ -1503,8 +1507,8 @@ span.tag-input[contenteditable]:empty::before { background-color: var(--color-1); width: 100%; border: 2px solid var(--color-3); - margin-top: 10px; - height: 18vh; + margin-top: 5px; + height: 15vh; overflow: scroll; } @@ -1517,7 +1521,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-right: 0px; margin-bottom: 0px; width: 84%; @@ -1533,7 +1537,7 @@ span.tag-input[contenteditable]:empty::before { padding-top: 7px; padding-bottom: 7px; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-left: 5px; margin-bottom: 0px; width: 10%; @@ -1548,7 +1552,7 @@ span.tag-input[contenteditable]:empty::before { overflow: auto; white-space: nowrap; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1563,11 +1567,10 @@ span.tag-input[contenteditable]:empty::before { display: flex; flex-direction: column; background-color: var(--color-1); - width: 100%; + width: 49%; + height: 5.4%; border: 2px solid var(--color-3); - margin-top: 10px; - max-height: 200px; - overflow: scroll; + margin-top: 5px; } .convictions-title { @@ -1579,18 +1582,18 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; user-select: none; - + } .convictions-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 5px; width: 95%; user-select: none; } @@ -1599,11 +1602,11 @@ span.tag-input[contenteditable]:empty::before { display: flex; flex-direction: column; background-color: var(--color-1); - width: 100%; + width: 50%; + height: 5.4%; border: 2px solid var(--color-3); - margin-top: 10px; - max-height: 200px; - overflow: scroll; + margin-top: -9.2%; + margin-left: 50%; } .profile-incidents-title { @@ -1615,7 +1618,7 @@ span.tag-input[contenteditable]:empty::before { padding-bottom: 5px; text-align: center; margin: auto; - margin-top: 10px; + margin-top: 5px; margin-bottom: 0px; width: 95%; align-items: center; @@ -1625,7 +1628,7 @@ span.tag-input[contenteditable]:empty::before { .profile-incidents-holder { overflow: auto; margin: auto; - margin-top: 10px; + margin-top: 16px; width: 95%; user-select: none; } From 0a5d52af3a47cd9d98eb911e5304b711b1009fdb Mon Sep 17 00:00:00 2001 From: Jacob Bernard Allen Date: Wed, 15 Mar 2023 14:26:45 -0400 Subject: [PATCH 108/381] Grammar fix --- shared/config.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index 6ea81dc8..dcc25b98 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -98,12 +98,12 @@ Config.PenalCodeTitles = { Config.PenalCode = { [1] = { - [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green', description = 'when a person intentionally or knowingly causes physical contact with another (without a weapon)'}, + [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green', description = 'When a person intentionally or knowingly causes physical contact with another (without a weapon)'}, [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange', description = 'If a person intentionally or knowingly causes injury to another (without a weapon)'}, [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange', description = 'When a person unintentionally, and recklessly causes bodily injury to another as a result of a confrontation AND causes bodily injury'}, [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red', description = 'When a person intentionally, knowingly, or recklessly causes bodily injury to another person AND either causes serious bodily injury or uses or exhibits a deadly weapon'}, [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red', description = 'When a person unintentionally and recklessly causes the death of another'}, - [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red', description = 'when a person unintentionally and recklessly causes the death of anther with a vehicle'}, + [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red', description = 'When a person unintentionally and recklessly causes the death of anther with a vehicle'}, [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red', description = 'When a non-government person intentionally attacks another with the intent to kill'}, [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red', description = 'Any intentional killing that is not premeditated or planned. A situation in which the killer intends only to inflict serious bodily harm.'}, [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red', description = 'Being present and or participating in the act of parent charge'}, @@ -150,8 +150,8 @@ Config.PenalCode = { [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green', description = 'The action of falsely identifying as another person to deceive'}, [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green', description = 'The action of falsely identifying as a government employee to deceive'}, [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green', description = 'The action of falsely identifying as a Judge to deceive'}, - [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green', description = 'To Have another persons Identification without consent'}, - [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green', description = 'To have the Identification of a Government employee without consent'}, + [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green', description = 'To have another persons Identification without consent'}, + [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green', description = 'To have the identification of a government employee without consent'}, [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange', description = 'To threaten or cause harm to a person or property for financial gain'}, [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green', description = 'To deceive another for financial gain'}, [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green', description = 'To falsify legal documentation for personal gain'}, @@ -271,16 +271,16 @@ Config.PenalCode = { [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green', description = 'Not giving way to emergency vehicles'}, [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green', description = 'Not following the safety devices of the roadway'}, [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green', description = 'Having a vehicle that is no longer functional in the roadway'}, - [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green', description = 'Driveing in a manner as to unknowingly disregard safety'}, - [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange', description = 'Driveing in a manner as to knowingly disregard safety'}, + [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green', description = 'Driving in a manner as to unknowingly disregard safety'}, + [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange', description = 'Driving in a manner as to knowingly disregard safety'}, [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green', description = 'Speeding 15 over the limit'}, [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green', description = 'Speeding 35 over the limit'}, [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green', description = 'Speeding 50 over the limit'}, [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green', description = 'The operation of a motor vehicle without proper licensing'}, [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green', description = 'Performing a u-turn where it is prohibited'}, - [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green', description = 'passing other motor vehicles in a prohibited manner'}, + [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green', description = 'Passing other motor vehicles in a prohibited manner'}, [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green', description = 'Not staying in the correct lane with a motor vehicle'}, - [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green', description = 'performing a turn where it is prohibited'}, + [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green', description = 'Performing a turn where it is prohibited'}, [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green', description = 'Not stopping for a lawful stop or traffic device'}, [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green', description = 'Parking a vehicle in a location that requires approval with any'}, [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green', description = 'Striking another person or vehicle and fleeing the location'}, From 464e36305d537cb85264ed3c106fc3a6b14eb24a Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 18 Mar 2023 18:58:29 -0400 Subject: [PATCH 109/381] Added Weapon Info Function Added info for weapons export with images --- README.md | 148 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 120 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index c3004405..ce9e5273 100644 --- a/README.md +++ b/README.md @@ -16,41 +16,107 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl * Start resource through server.cfg * Restart your server. -# Preview -![image](https://user-images.githubusercontent.com/82112471/217596976-5147fefa-24e2-4b98-b167-4e151b8a9a8c.png) -![image](https://user-images.githubusercontent.com/82112471/217597024-2c1493fc-4439-4b56-abbd-f9149e987b9e.png) -![image](https://user-images.githubusercontent.com/82112471/217597103-c271720a-4c1b-4a13-8e17-a27727cb0e95.png) -![image](https://user-images.githubusercontent.com/82112471/217597192-f9a63728-d2d0-4dfe-bd8b-373df1f9e969.png) -![image](https://user-images.githubusercontent.com/82112471/217597248-85d2d074-7fcd-4a54-ac57-8d1103047bc0.png) -![image](https://user-images.githubusercontent.com/82112471/217597338-aefcaed1-db9e-4b17-be45-3e0a66416b63.png) -![image](https://user-images.githubusercontent.com/82112471/217597379-d936fb8e-e33a-4817-8997-16447158afb8.png) -![image](https://user-images.githubusercontent.com/82112471/217597433-cd24bd41-a515-4fac-a896-807494501c39.png) - -# Multi Departments -* LSPD -![image](https://i.imgur.com/2HmsTa3.png) -* BCSO -![image](https://i.imgur.com/9WVU0Kz.png) -* SASP -![image](https://i.imgur.com/6tLNVkb.png) -* SAST -![image](https://i.imgur.com/G5b2vGU.png) -* SAPR -![image](https://i.imgur.com/cu1ZsfW.png) -* LSSD -![image](https://i.imgur.com/IsqZddu.png) -* DOC -![image](https://i.imgur.com/lFi4jDH.png) - -## Weapon Info Export +# Weapon Info Export Adds server export for inserting weaponinfo records, that can be used elsewhere in your server, such as weapon purchase, to add information to the mdt. Below is the syntax for this, all arguments are strings. ``` exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) ``` +![image](https://user-images.githubusercontent.com/82112471/226144189-0cf7a87c-d9bc-4d1f-a9fb-6f14f92cb68b.png) + +## Inventory Edit | Automatic Add Weapons with images +* [lj-inventory](https://github.com/loljoshie/lj-inventory) will come already with the changes needed for this to work. +* [qb-inventory](https://github.com/qbcore-framework/qb-inventory) follow instructions below. + +1. Add to qb-inventory > config.lua -## Wolfknight Plate Reader & Radar Compatibility +``` +Config.MDTWeaponImages = { + [1] = { + item = 'weapon_knife', + image = 'https://cfx-nui-qb-inventory/html/images/weapon_knife.png', + }, + [2] = { + item = 'weapon_bat', + image = 'https://cfx-nui-qb-inventory/html/images/weapon_bat.png', + }, + [3] = { + item = 'weapon_hatchet', + image = 'https://cfx-nui-qb-inventory/html/images/weapon_hatchet.png', + }, + [4] = { + item = 'weapon_pistol', + image = 'https://cfx-nui-qb-inventory/html/images/weapon_pistol.png', + }, + [5] = { + item = 'weapon_snspistol', + image = 'https://cfx-nui-qb-inventory/html/images/weapon_snspistol.png', + }, + [6] = { + item = 'weapon_vintagepistol', + image = 'https://cfx-nui-qb-inventory/html/images/weapon_vintagepistol.png', + } +} +``` +2. Add this function at the start of server > main.lua + +``` +function GetWeaponImageUrl(itemName) + for _, weaponImage in ipairs(Config.MDTWeaponImages) do + if weaponImage.item == itemName then + return weaponImage.image + end + end + return "img/not-found.webp" +end +``` + +3. Edit the following event +``` +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 = "img/not-found.webp" + 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 = GetWeaponImageUrl(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 Plate Reader & Radar Compatibility Support for Wolfknight Radar & Plate Reader https://github.com/WolfKnight98/wk_wars2x @@ -75,6 +141,32 @@ https://youtu.be/w9PAVc3ER_c ![image](https://i.imgur.com/6maboG3.png) ![image](https://i.imgur.com/DkhQxDq.png) +# Preview +![image](https://user-images.githubusercontent.com/82112471/217596976-5147fefa-24e2-4b98-b167-4e151b8a9a8c.png) +![image](https://user-images.githubusercontent.com/82112471/217597024-2c1493fc-4439-4b56-abbd-f9149e987b9e.png) +![image](https://user-images.githubusercontent.com/82112471/217597103-c271720a-4c1b-4a13-8e17-a27727cb0e95.png) +![image](https://user-images.githubusercontent.com/82112471/217597192-f9a63728-d2d0-4dfe-bd8b-373df1f9e969.png) +![image](https://user-images.githubusercontent.com/82112471/217597248-85d2d074-7fcd-4a54-ac57-8d1103047bc0.png) +![image](https://user-images.githubusercontent.com/82112471/217597338-aefcaed1-db9e-4b17-be45-3e0a66416b63.png) +![image](https://user-images.githubusercontent.com/82112471/217597379-d936fb8e-e33a-4817-8997-16447158afb8.png) +![image](https://user-images.githubusercontent.com/82112471/217597433-cd24bd41-a515-4fac-a896-807494501c39.png) + +# Multi Departments +* LSPD +![image](https://i.imgur.com/2HmsTa3.png) +* BCSO +![image](https://i.imgur.com/9WVU0Kz.png) +* SASP +![image](https://i.imgur.com/6tLNVkb.png) +* SAST +![image](https://i.imgur.com/G5b2vGU.png) +* SAPR +![image](https://i.imgur.com/cu1ZsfW.png) +* LSSD +![image](https://i.imgur.com/IsqZddu.png) +* DOC +![image](https://i.imgur.com/lFi4jDH.png) + ## FAQ - **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". From 0ce2ab88d2ca7b0a49abfb3f7f8939d0769c7b73 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 18 Mar 2023 19:19:01 -0400 Subject: [PATCH 110/381] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ce9e5273..21194704 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, to itemData.info.quality = 100 end local serial = itemData.info.serie - local imageurl = "img/not-found.webp" + local imageurl = GetWeaponImageUrl(itemData.name) local notes = "Purchased at Ammunation" local owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname local weapClass = 1 From fb67e01d9a6171a9d9f99581a561b8556bb11e25 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 18 Mar 2023 19:21:17 -0400 Subject: [PATCH 111/381] Apartments default config --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21194704..7e2016b3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl - [QBCore](https://github.com/qbcore-framework/qb-core) - [ps-dispatch](https://github.com/Project-Sloth/ps-dispatch) - [oxmysql](https://github.com/overextended/oxmysql) -- [qb-apartments](https://github.com/qbcore-framework/qb-apartments) - You can remove this by removing the query. This is used to find people's apartment. +- [qb-apartments](https://github.com/qbcore-framework/qb-apartments) | [Config](https://github.com/Project-Sloth/ps-mdt/blob/0ce2ab88d2ca7b0a49abfb3f7f8939d0769c7b73/shared/config.lua#L3) available to enable or disable. # Installation * Download ZIP From 6f6c0fbb9549e7c0326c219b96910709de9471f7 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 18 Mar 2023 22:18:34 -0400 Subject: [PATCH 112/381] Added self-register for all weapons Ability to have self-register completed --- client/main.lua | 57 ++++++++++++++++++------------------------------- server/main.lua | 42 +++++++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 37 deletions(-) diff --git a/client/main.lua b/client/main.lua index a5858d24..bbe46f69 100644 --- a/client/main.lua +++ b/client/main.lua @@ -957,35 +957,6 @@ RegisterNUICallback("sendCallResponse", function(data, cb) cb(true) end) ---[[ RegisterNUICallback("impoundVehicle", function(data, cb) - local JobType = GetJobType(PlayerData.job.name) - if JobType == 'police' then - local found = 0 - local plate = string.upper(string.gsub(data['plate'], "^%s*(.-)%s*$", "%1")) - local vehicles = GetGamePool('CVehicle') - - for k,v in pairs(vehicles) do - local plt = string.upper(string.gsub(GetVehicleNumberPlateText(v), "^%s*(.-)%s*$", "%1")) - if plt == plate then - local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(v)) - if dist < 5.0 then - found = VehToNet(v) - end - break - end - end - - if found == 0 then - QBCore.Functions.Notify('Vehicle not found!', 'error') - return - end - - SendNUIMessage({ type = "greenShit" }) - TriggerServerEvent('mdt:server:impoundVehicle', data, found) - cb('ok') - end -end) ]] - RegisterNUICallback("removeImpound", function(data, cb) local ped = PlayerPedId() local playerPos = GetEntityCoords(ped) @@ -1052,13 +1023,27 @@ RegisterNetEvent('mdt:client:sendCallResponse', function(message, time, callid, SendNUIMessage({ type = "sendCallResponse", message = message, time = time, callid = callid, name = name }) end) -RegisterNetEvent('mdt:client:notifyMechanics', function(sentData) - --[[if exports["erp-jobsystem"]:CanTow() then - TriggerServerEvent('erp-sounds:PlayWithinDistance', 1.5, 'beep', 0.4) - TriggerEvent('erp_phone:sendNotification', {img = 'vehiclenotif.png', title = "Impound", content = "New vehicle is ready to be impounded!", time = 5000 }) - end]] -end) - RegisterNetEvent('mdt:client:statusImpound', function(data, plate) SendNUIMessage({ type = "statusImpound", data = data, plate = plate }) end) + +function GetPlayerWeaponInfo(cb) + QBCore.Functions.TriggerCallback('getWeaponInfo', function(weaponInfo) + cb(weaponInfo) + end) +end + +--3rd Eye Trigger Event +RegisterNetEvent('ps-mdt:client:selfregister', function() + local playerData = QBCore.Functions.GetPlayerData() + if GetJobType(playerData.job.name) == 'police' then + GetPlayerWeaponInfo(function(weaponInfo) + if weaponInfo then + TriggerServerEvent('mdt:server:registerweapon', weaponInfo.serialnumber, weaponInfo.weaponurl, weaponInfo.notes, weaponInfo.owner, weaponInfo.weapClass, weaponInfo.weaponmodel) + --print("Weapon added to database") + else + --print("No weapons found") + end + end) + end +end) \ No newline at end of file diff --git a/server/main.lua b/server/main.lua index c63c6097..4d0ba8a4 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1040,8 +1040,15 @@ RegisterNetEvent('mdt:server:saveWeaponInfo', function(serial, imageurl, notes, end) function CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) + + local results = MySQL.query.await('SELECT * FROM mdt_weaponinfo WHERE serial = ?', { serial }) + if results[1] then + return + end + if serial == nil then return end if imageurl == nil then imageurl = 'img/not-found.webp' end + MySQL.Async.insert('INSERT INTO mdt_weaponinfo (serial, owner, information, weapClass, weapModel, image) VALUES (:serial, :owner, :notes, :weapClass, :weapModel, :imageurl) ON DUPLICATE KEY UPDATE owner = :owner, information = :notes, weapClass = :weapClass, weapModel = :weapModel, image = :imageurl', { ['serial'] = serial, ['owner'] = owner, @@ -1053,7 +1060,6 @@ function CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) end exports('CreateWeaponInfo', CreateWeaponInfo) ---exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) RegisterNetEvent('mdt:server:getWeaponData', function(serial) if serial then @@ -1579,11 +1585,45 @@ function GetVehicleOwner(plate) return owner end end + -- Returns the source for the given citizenId QBCore.Functions.CreateCallback('mdt:server:GetPlayerSourceId', function(source, cb, targetCitizenId) local targetPlayer = QBCore.Functions.GetPlayerByCitizenId(targetCitizenId) local targetSource = targetPlayer.PlayerData.source cb(targetSource) + +end) + +QBCore.Functions.CreateCallback('getWeaponInfo', function(source, cb) + local Player = QBCore.Functions.GetPlayer(source) + local weaponInfo = nil + for _, item in pairs(Player.PlayerData.items) do + if item.type == "weapon" then + local invImage = ("https://cfx-nui-qb-inventory/html/images/%s"):format(item.image) + if invImage then + weaponInfo = { + serialnumber = item.info.serie, + owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, + weaponmodel = QBCore.Shared.Items[item.name].label, + weaponurl = invImage, + notes = "Self Registered", + weapClass = "Class 1", + + } + break + end + end + end + if weaponInfo then + TriggerClientEvent('QBCore:Notify', source, "Weapon has been added to police database. ") + else + TriggerClientEvent('QBCore:Notify', source, "Weapon already registered on database.") + end + + cb(weaponInfo) end) +RegisterNetEvent('mdt:server:registerweapon', function(serial, imageurl, notes, owner, weapClass, weapModel) + exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) +end) \ No newline at end of file From d00da35d9ef1effddfe38ceeda4fd9bd15f92168 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 18 Mar 2023 22:29:07 -0400 Subject: [PATCH 113/381] Added qb-target for self-register weapons.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 7e2016b3..e669575b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,14 @@ exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, we ``` ![image](https://user-images.githubusercontent.com/82112471/226144189-0cf7a87c-d9bc-4d1f-a9fb-6f14f92cb68b.png) +## Self Register Weapons +* Your citizens can self-register weapons found on their inventory. Event to trigger is below if you're using qb-target. +``` +ps-mdt:client:selfregister +``` + +https://user-images.githubusercontent.com/82112471/226150422-0c4776f0-0927-4b07-a272-972dd1c20077.mp4 + ## Inventory Edit | Automatic Add Weapons with images * [lj-inventory](https://github.com/loljoshie/lj-inventory) will come already with the changes needed for this to work. * [qb-inventory](https://github.com/qbcore-framework/qb-inventory) follow instructions below. From 364b091c80e253ef161c07a702b64d122c9c90ca Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 18 Mar 2023 22:35:26 -0400 Subject: [PATCH 114/381] Update README.md --- README.md | 49 +++---------------------------------------------- 1 file changed, 3 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index e669575b..ca9d6e21 100644 --- a/README.md +++ b/README.md @@ -37,50 +37,7 @@ https://user-images.githubusercontent.com/82112471/226150422-0c4776f0-0927-4b07- * [lj-inventory](https://github.com/loljoshie/lj-inventory) will come already with the changes needed for this to work. * [qb-inventory](https://github.com/qbcore-framework/qb-inventory) follow instructions below. -1. Add to qb-inventory > config.lua - -``` -Config.MDTWeaponImages = { - [1] = { - item = 'weapon_knife', - image = 'https://cfx-nui-qb-inventory/html/images/weapon_knife.png', - }, - [2] = { - item = 'weapon_bat', - image = 'https://cfx-nui-qb-inventory/html/images/weapon_bat.png', - }, - [3] = { - item = 'weapon_hatchet', - image = 'https://cfx-nui-qb-inventory/html/images/weapon_hatchet.png', - }, - [4] = { - item = 'weapon_pistol', - image = 'https://cfx-nui-qb-inventory/html/images/weapon_pistol.png', - }, - [5] = { - item = 'weapon_snspistol', - image = 'https://cfx-nui-qb-inventory/html/images/weapon_snspistol.png', - }, - [6] = { - item = 'weapon_vintagepistol', - image = 'https://cfx-nui-qb-inventory/html/images/weapon_vintagepistol.png', - } -} -``` -2. Add this function at the start of server > main.lua - -``` -function GetWeaponImageUrl(itemName) - for _, weaponImage in ipairs(Config.MDTWeaponImages) do - if weaponImage.item == itemName then - return weaponImage.image - end - end - return "img/not-found.webp" -end -``` - -3. Edit the following event +1. Edit the following event ``` RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, toInventory, fromSlot, toSlot, fromAmount, toAmount) ``` @@ -92,7 +49,7 @@ RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, to itemData.info.quality = 100 end local serial = itemData.info.serie - local imageurl = GetWeaponImageUrl(itemData.name) + local imageurl = ("https://cfx-nui-qb-inventory/html/images/%s"):format(item.image) local notes = "Purchased at Ammunation" local owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname local weapClass = 1 @@ -109,7 +66,7 @@ RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, to itemData.info.quality = 100 end local serial = itemData.info.serie - local imageurl = GetWeaponImageUrl(itemData.name) + local imageurl = ("https://cfx-nui-qb-inventory/html/images/%s"):format(item.image) local notes = "Purchased at Ammunation" local owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname local weapClass = 1 From 94cf3e3eb9d7cc22308cec8adf0e449449850436 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 19 Mar 2023 00:16:04 -0400 Subject: [PATCH 115/381] Updated credits --- README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ca9d6e21..23d8173b 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ https://youtu.be/w9PAVc3ER_c * DOC ![image](https://i.imgur.com/lFi4jDH.png) -## FAQ +# FAQ - **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". ![](https://i.imgur.com/WVEDLnJ.png) @@ -145,7 +145,15 @@ The below repos are direct forks of ps-mdt and have been edited to fit certain c * [US](https://github.com/OK1ez/ps-mdt/tree/main) Different layout and different colors. * [UK](https://github.com/Harraa/ps-mdt) -## EchoRP MDT QBCore Edit (WIP) - -EchoRP MDT Released by Flawws#9999 from Echo RP rewritten and restructured for QBCore. -This is no longer a fork so we are able to open issues on this repo. +# Credits +* Echo RP released by [Flawws#999](https://github.com/FlawwsX/erp_mdt) +* [JoeSzymkowicz](https://github.com/JoeSzymkowicz) +* [MonkeyWhisper](https://github.com/MonkeyWhisper), +* [Snipe](https://github.com/pushkart2) +* [BackSH00TER](https://github.com/BackSH00TER) +* [nggcasey](https://github.com/nggcasey) +* [OK1ez](https://github.com/OK1ez), +* [Crayons0814](https://github.com/Crayons0814) +* [LeSiiN](https://github.com/LeSiiN) +* [ImXirvin](https://github.com/ImXirvin) +* Everyone else that we may have missed, thank you! From 2499e5f083d66b2a9ba9a7271d1ff35082e4ddbc Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 19 Mar 2023 00:16:49 -0400 Subject: [PATCH 116/381] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 23d8173b..a5200f8a 100644 --- a/README.md +++ b/README.md @@ -146,13 +146,13 @@ The below repos are direct forks of ps-mdt and have been edited to fit certain c * [UK](https://github.com/Harraa/ps-mdt) # Credits -* Echo RP released by [Flawws#999](https://github.com/FlawwsX/erp_mdt) +* Originally Echo RP MDT released by [Flawws#999](https://github.com/FlawwsX/erp_mdt) * [JoeSzymkowicz](https://github.com/JoeSzymkowicz) -* [MonkeyWhisper](https://github.com/MonkeyWhisper), +* [MonkeyWhisper](https://github.com/MonkeyWhisper) * [Snipe](https://github.com/pushkart2) * [BackSH00TER](https://github.com/BackSH00TER) * [nggcasey](https://github.com/nggcasey) -* [OK1ez](https://github.com/OK1ez), +* [OK1ez](https://github.com/OK1ez) * [Crayons0814](https://github.com/Crayons0814) * [LeSiiN](https://github.com/LeSiiN) * [ImXirvin](https://github.com/ImXirvin) From 1342b0db68308679d46777a380fdaa71a478c395 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 19 Mar 2023 02:15:20 -0400 Subject: [PATCH 117/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 203a96ad..7ab4c0cb 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '1.8' +version '1.9' lua54 'yes' From 85eb16b7027721fac73d98700352830ea5861fd5 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 19 Mar 2023 14:03:24 -0400 Subject: [PATCH 118/381] Proper format for pulling images.md Forgot to include the proper format after updating lj-inventory --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5200f8a..0a50eb17 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, to itemData.info.quality = 100 end local serial = itemData.info.serie - local imageurl = ("https://cfx-nui-qb-inventory/html/images/%s"):format(item.image) + 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 @@ -66,7 +66,7 @@ RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, to itemData.info.quality = 100 end local serial = itemData.info.serie - local imageurl = ("https://cfx-nui-qb-inventory/html/images/%s"):format(item.image) + 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 From 6a0585c630956e99f1414fa29dcb874703805e5c Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:01:15 +0100 Subject: [PATCH 119/381] removed sendtojail ( added in mugshot.lua ) removed sendtojail ( added in mugshot.lua ) --- client/main.lua | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/client/main.lua b/client/main.lua index bbe46f69..dae16574 100644 --- a/client/main.lua +++ b/client/main.lua @@ -383,26 +383,6 @@ RegisterNUICallback("incidentSearchPerson", function(data, cb) cb(true) end) --- Handle sending the player to jail --- Uses QB-Core/qb-policejob function to send the player to jail --- If you use a different jail system, you will need to change this -RegisterNUICallback("sendToJail", function(data, cb) - local citizenId, sentence = data.citizenId, data.sentence - - -- Gets the player id from the citizenId - local p = promise.new() - QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) - p:resolve(result) - end, citizenId) - - local targetSourceId = Citizen.Await(p) - - if sentence > 0 then - -- Uses qb-policejob JailPlayer event - TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence) - end -end) - -- Handle sending a fine to a player -- Uses the QB-Core bill command to send a fine to a player -- If you use a different fine system, you will need to change this @@ -1046,4 +1026,4 @@ RegisterNetEvent('ps-mdt:client:selfregister', function() end end) end -end) \ No newline at end of file +end) From e22db782648c889cfd528c0bc5e42889d7c628b9 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:01:40 +0100 Subject: [PATCH 120/381] added cl_mugshot.lua added cl_mugshot.lua --- client/cl_mugshot.lua | 209 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 client/cl_mugshot.lua diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua new file mode 100644 index 00000000..f3a47e6b --- /dev/null +++ b/client/cl_mugshot.lua @@ -0,0 +1,209 @@ +QBCore = exports['qb-core']:GetCoreObject() +local PlayerData = {} +local mugshotInProgress, createdCamera, MugshotArray, playerData = false, 0, {}, nil +local handle, board, board_scaleform, overlay, ped, pedcoords, x, y, z, r, suspectheading, suspectx, suspecty, suspectz, board_pos +local MugShots = {} + +-- Mugshot location ( Position is the default QBCore Prison Interior ) + x = 1828.69 + y = 2581.72 + z = 46.3 + r = {x = 0.0, y = 0.0, z = 92.23} + suspectheading = 265.00 + suspectx = 1827.63 + suspecty = 2581.7 + suspectz = 44.89 + +-- Mugshot functions + +local function TakeMugShot() + exports['screenshot-basic']:requestScreenshotUpload(Config.Webhook, 'files[]', {encoding = 'jpg'}, function(data) + local resp = json.decode(data) + table.insert(MugshotArray, resp.attachments[1].url) + end) +end + +local function PhotoProcess(ped) + local rotation = suspectheading + for photo = 1, Config.MugPhotos, 1 do + Wait(1500) + TakeMugShot() + PlaySoundFromCoord(-1, "SHUTTER_FLASH", x, y, z, "CAMERA_FLASH_SOUNDSET", true, 5, 0) + Wait(1500) + rotation = rotation - 90.0 + SetEntityHeading(ped, rotation) + end +end + +local function MugShotCamera() + if createdCamera ~= 0 then + DestroyCam(createdCamera, 0) + createdCamera = 0 + end + local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", 1) + SetCamCoord(cam, x, y, z) + SetCamRot(cam, r.x, r.y, r.z, 2) + RenderScriptCams(1, 0, 0, 1, 1) + Wait(250) + createdCamera = cam + CreateThread(function() + FreezeEntityPosition(ped, true) + SetPauseMenuActive(false) + while mugshotInProgress do + DisableAllControlActions(0) + EnableControlAction(0, 249, true) + EnableControlAction(0, 46, true) + Wait(1) + end + end) +end + +local function CreateNamedRenderTargetForModel(name, model) + local handle = 0 + if not IsNamedRendertargetRegistered(name) then + RegisterNamedRendertarget(name, 0) + end + if not IsNamedRendertargetLinked(model) then + LinkNamedRendertarget(model) + end + if IsNamedRendertargetRegistered(name) then + handle = GetNamedRendertargetRenderId(name) + end + return handle +end + +local function LoadScaleform (scaleform) + local handle = RequestScaleformMovie(scaleform) + if handle ~= 0 then + while not HasScaleformMovieLoaded(handle) do + Wait(0) + end + end + return handle +end + +local function CallScaleformMethod (scaleform, method, ...) + local t + local args = { ... } + BeginScaleformMovieMethod(scaleform, method) + for k, v in ipairs(args) do + t = type(v) + if t == 'string' then + PushScaleformMovieMethodParameterString(v) + elseif t == 'number' then + if string.match(tostring(v), "%.") then + PushScaleformMovieFunctionParameterFloat(v) + else + PushScaleformMovieFunctionParameterInt(v) + end + elseif t == 'boolean' then + PushScaleformMovieMethodParameterBool(v) + end + end + EndScaleformMovieMethod() +end + +local function PrepBoard() + CreateThread(function() + board_scaleform = LoadScaleform("mugshot_board_01") + handle = CreateNamedRenderTargetForModel("ID_Text", `prop_police_id_text`) + while handle do + HideHudAndRadarThisFrame() + SetTextRenderId(handle) + Set_2dLayer(4) + SetScriptGfxDrawBehindPausemenu(1) + DrawScaleformMovie(board_scaleform, 0.405, 0.37, 0.81, 0.74, 255, 255, 255, 255, 0) + SetScriptGfxDrawBehindPausemenu(0) + SetTextRenderId(GetDefaultScriptRendertargetRenderId()) + SetScriptGfxDrawBehindPausemenu(1) + SetScriptGfxDrawBehindPausemenu(0) + Wait(0) + end + end) +end + +local function MakeBoard() + title = "Bolingbroke Penitentiary" + center = playerData.charinfo.firstname.. " ".. playerData.charinfo.lastname + footer = playerData.citizenid + header = playerData.charinfo.birthdate + CallScaleformMethod(board_scaleform, 'SET_BOARD', title, center, footer, header, 0, 1337, 116) +end + +local function PlayerBoard() + RequestModel(`prop_police_id_board`) + RequestModel(`prop_police_id_text`) + while not HasModelLoaded(`prop_police_id_board`) or not HasModelLoaded(`prop_police_id_text`) do + Wait(1) + end + board = CreateObject(`prop_police_id_board`, pedcoords, true, true, false) + overlay = CreateObject(`prop_police_id_text`, pedcoords, true, true, false) + AttachEntityToEntity(overlay, board, -1, 4103, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) + SetModelAsNoLongerNeeded(`prop_police_id_board`) + SetModelAsNoLongerNeeded(`prop_police_id_text`) + SetCurrentPedWeapon(ped, `weapon_unarmed`, 1) + ClearPedWetness(ped) + ClearPedBloodDamage(ped) + AttachEntityToEntity(board, ped, GetPedBoneIndex(ped, 28422), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 2, 1) +end + +local function DestoryCamera() + DestroyCam(createdCamera, 0) + RenderScriptCams(0, 0, 1, 1, 1) + SetFocusEntity(GetPlayerPed(ped)) + ClearPedTasksImmediately(ped) + FreezeEntityPosition(ped, false) + DeleteObject(overlay) + DeleteObject(board) + handle = nil + createdCamera = 0 +end + +RegisterNetEvent('cqc-mugshot:client:trigger', function() + ped = PlayerPedId() + pedcoords = GetEntityCoords(ped) + CreateThread(function() + playerData = QBCore.Functions.GetPlayerData() + MugshotArray, mugshotInProgress = {}, true + local citizenid = playerData.citizenid + local animDict = 'mp_character_creation@lineup@male_a' + QBCore.Functions.RequestAnimDict(animDict) + PrepBoard() + Wait(250) + MakeBoard() + MugShotCamera() + SetEntityCoords(ped, suspectx, suspecty, suspectz) + SetEntityHeading(ped, suspectheading) + PlayerBoard() + TaskPlayAnim(ped, animDict, "loop_raised", 8.0, 8.0, -1, 49, 0, false, false, false) + PhotoProcess(ped) + if createdCamera ~= 0 then + DestoryCamera() + SetEntityHeading(ped, suspectheading) + ClearPedSecondaryTask(GetPlayerPed(ped)) + end + TriggerServerEvent('psmdt-mugshot:server:MDTupload', playerData.citizenid, MugshotArray) + mugshotInProgress = false + end) +end) + +RegisterNUICallback("sendToJail", function(data, cb) + local citizenId, sentence = data.citizenId, data.sentence + + -- Gets the player id from the citizenId + local p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) + p:resolve(result) + end, citizenId) + + local targetSourceId = Citizen.Await(p) + + if sentence > 0 then + if Config.UseCQCMugshot then + TriggerServerEvent('cqc-mugshot:server:triggerSuspect', targetSourceId) + end + Citizen.Wait(5000) + -- Uses qb-policejob JailPlayer event + TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence) + end +end) \ No newline at end of file From fbf9c40a64a7159a67b4a4d5ce0b45f1dbced0e0 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:02:14 +0100 Subject: [PATCH 121/381] added cl_mugshot.lua added cl_mugshot.lua --- fxmanifest.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 7ab4c0cb..edf6c6a8 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -17,7 +17,8 @@ server_scripts { } client_scripts{ 'client/main.lua', - 'client/cl_impound.lua' + 'client/cl_impound.lua', + 'client/cl_mugshot.lua' } ui_page 'ui/dashboard.html' From e035fd38281f0449f5de3927359c7b3f140fcae4 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:04:29 +0100 Subject: [PATCH 122/381] added mugshot stuff added mugshot stuff --- server/main.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 4d0ba8a4..0c8bdbaf 100644 --- a/server/main.lua +++ b/server/main.lua @@ -384,6 +384,22 @@ RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName end end) +-- mugshot +RegisterNetEvent('cqc-mugshot:server:triggerSuspect', function(suspect) + TriggerClientEvent('cqc-mugshot:client:trigger', suspect, suspect) +end) + +RegisterNetEvent('psmdt-mugshot:server:MDTupload', function(citizenid, MugShotURLs) + MugShots[citizenid] = MugShotURLs + local cid = citizenid + MySQL.Async.insert('INSERT INTO mdt_data (cid, pfp, gallery, tags) VALUES (:cid, :pfp, :gallery, :tags) ON DUPLICATE KEY UPDATE cid = :cid, pfp = :pfp, tags = :tags, gallery = :gallery', { + cid = cid, + pfp = MugShotURLs[1], + tags = json.encode(tags), + gallery = json.encode(MugShotURLs), + }) +end) + RegisterNetEvent("mdt:server:updateLicense", function(cid, type, status) local src = source local Player = QBCore.Functions.GetPlayer(src) @@ -1626,4 +1642,4 @@ end) RegisterNetEvent('mdt:server:registerweapon', function(serial, imageurl, notes, owner, weapClass, weapModel) exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) -end) \ No newline at end of file +end) From 581ce3190e759e4f19e86df93b1e5dc5683bf955 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:07:01 +0100 Subject: [PATCH 123/381] adding config stuff for mugshot adding config stuff for mugshot --- shared/config.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/config.lua b/shared/config.lua index dcc25b98..e47f9e5f 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -4,6 +4,10 @@ Config.UsingDefaultQBApartments = true Config.OnlyShowOnDuty = true +Config.UseCQCMugshot = true +Config.MugPhotos = 1 -- Front, Back Side. Use 4 for both sides ( default is 1 ) +Config.Webhook = '' -- Images will be uploaded here ( add a discord webhook ) + Config.Fuel = "lj-fuel" -- "LegacyFuel", "lj-fuel" Config.RosterLink = { -- Google Docs Link @@ -670,4 +674,4 @@ function GetJobType(job) else return nil end -end \ No newline at end of file +end From 47af469fbde17eeffa45eb34d8f9aa7feabfa3dd Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:07:43 +0100 Subject: [PATCH 124/381] added Mugshot to fix the error added Mugshot to fix the error --- server/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/server/main.lua b/server/main.lua index 0c8bdbaf..608137a7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -3,6 +3,7 @@ local QBCore = exports['qb-core']:GetCoreObject() local incidents = {} local convictions = {} local bolos = {} +local MugShots = {} -- TODO make it departments compatible local activeUnits = {} From c7c4313dc02e5e679aafe538859ef6be4d5cb9b8 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:17:28 +0100 Subject: [PATCH 125/381] added credits for CQC-Scripting added credits for CQC-Scripting --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0a50eb17..2365d299 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,7 @@ The below repos are direct forks of ps-mdt and have been edited to fit certain c # Credits * Originally Echo RP MDT released by [Flawws#999](https://github.com/FlawwsX/erp_mdt) +* Mugshot Integration (https://github.com/CQC-Scripting/cqc-mugshot) * [JoeSzymkowicz](https://github.com/JoeSzymkowicz) * [MonkeyWhisper](https://github.com/MonkeyWhisper) * [Snipe](https://github.com/pushkart2) @@ -156,4 +157,5 @@ The below repos are direct forks of ps-mdt and have been edited to fit certain c * [Crayons0814](https://github.com/Crayons0814) * [LeSiiN](https://github.com/LeSiiN) * [ImXirvin](https://github.com/ImXirvin) +* [lenzh](https://github.com/lenzh) * Everyone else that we may have missed, thank you! From ad4eb675534e48112e359f62a9bc940feb534a3a Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 19 Mar 2023 21:25:14 +0100 Subject: [PATCH 126/381] changed credits changed credits --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2365d299..6064406f 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ The below repos are direct forks of ps-mdt and have been edited to fit certain c # Credits * Originally Echo RP MDT released by [Flawws#999](https://github.com/FlawwsX/erp_mdt) -* Mugshot Integration (https://github.com/CQC-Scripting/cqc-mugshot) +* [CQC-Scripting](https://github.com/CQC-Scripting) for their [cqc-mugshot](https://github.com/CQC-Scripting/cqc-mugshot) * [JoeSzymkowicz](https://github.com/JoeSzymkowicz) * [MonkeyWhisper](https://github.com/MonkeyWhisper) * [Snipe](https://github.com/pushkart2) From 474712e14bab0b6d1cd66eea0579a251f2f1bedb Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 19 Mar 2023 16:30:18 -0400 Subject: [PATCH 127/381] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6064406f..b3c05716 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,9 @@ ps-mdt:client:selfregister https://user-images.githubusercontent.com/82112471/226150422-0c4776f0-0927-4b07-a272-972dd1c20077.mp4 +# Automatic Mugshot Pictures +![image](https://user-images.githubusercontent.com/82112471/226207146-086c5508-7e6f-4345-a157-3ec2fd588138.png) + ## Inventory Edit | Automatic Add Weapons with images * [lj-inventory](https://github.com/loljoshie/lj-inventory) will come already with the changes needed for this to work. * [qb-inventory](https://github.com/qbcore-framework/qb-inventory) follow instructions below. From 8634b0765b4f0b2cf6c77af8a9716307c277e0d3 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 19 Mar 2023 16:30:34 -0400 Subject: [PATCH 128/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index edf6c6a8..eedd0bce 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '1.9' +version '2.0' lua54 'yes' From c19b1149d5043a5ec4d6a0b148931b19fca949b4 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Mon, 20 Mar 2023 15:59:33 +0100 Subject: [PATCH 129/381] added phone data added phone data --- server/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 4d0ba8a4..1e46628d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -272,6 +272,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb pp = ProfPic(target.charinfo.gender), licences = licencesdata, dob = target.charinfo.birthdate, + phone = target.charinfo.phone, mdtinfo = '', fingerprint = '', tags = {}, @@ -1626,4 +1627,4 @@ end) RegisterNetEvent('mdt:server:registerweapon', function(serial, imageurl, notes, owner, weapClass, weapModel) exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) -end) \ No newline at end of file +end) From f98f4468580c69657ace0318d75098021f879b08 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:00:12 +0100 Subject: [PATCH 130/381] added Phone Number html added Phone Number html --- ui/dashboard.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/dashboard.html b/ui/dashboard.html index 1b1e8151..18b69bd6 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -276,6 +276,9 @@
                DOB
                +
                Phone Number
                +
                +
                Profession
                From 6af66748528a4b4459c05bd14c51b264e02653b3 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:00:47 +0100 Subject: [PATCH 131/381] added phone data to js added phone data to js --- ui/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/app.js b/ui/app.js index 732b8b28..7d5aa5a7 100644 --- a/ui/app.js +++ b/ui/app.js @@ -194,6 +194,7 @@ $(document).ready(() => { $(".manage-profile-name-input-1").val(result["firstname"]); $(".manage-profile-name-input-2").val(result["lastname"]); $(".manage-profile-dob-input").val(result["dob"]); + $(".manage-profile-phonenumber-input").val(result["phone"]); $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); $(".manage-profile-apartment-input").val(`${result.apartment}`); $(".manage-profile-url-input").val(result["profilepic"] ?? ""); From ca4aa06ce8fc185c438841be5c2f77b2af910993 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:01:57 +0100 Subject: [PATCH 132/381] added phonenumber css added phonenumber css --- ui/style.css | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ui/style.css b/ui/style.css index 1f60e8e7..d79928bb 100644 --- a/ui/style.css +++ b/ui/style.css @@ -1159,6 +1159,23 @@ a { background-color: rgba(0, 0, 0, 0); } +.manage-profile-phonenumber { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-phonenumber-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + .manage-profile-job { color: white; margin-left: 10px; From 254f9a07af73a5bdf72fad2e1baff3cf6c16ca28 Mon Sep 17 00:00:00 2001 From: Annalouu <112778590+Annalouu@users.noreply.github.com> Date: Mon, 20 Mar 2023 23:24:40 +0000 Subject: [PATCH 133/381] yes --- server/main.lua | 2 +- ui/app.js | 10 +++++++++- ui/dashboard.html | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/server/main.lua b/server/main.lua index 608137a7..6a0f816d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -674,7 +674,7 @@ RegisterNetEvent('mdt:server:incidentSearchPerson', function(query) local Player = QBCore.Functions.GetPlayer(src) if Player then local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'doj' then + if JobType == 'police' or JobType == 'doj' or JobType == 'ambulance' then local function ProfPic(gender, profilepic) if profilepic then return profilepic end; if gender == "f" then return "img/female.png" end; diff --git a/ui/app.js b/ui/app.js index 732b8b28..11417e4a 100644 --- a/ui/app.js +++ b/ui/app.js @@ -3868,6 +3868,9 @@ $(document).ready(() => { $("#reports-officers-involved-tag-title").html( "Officers Involved" ); + $("#bolos-officers-involved-tag-tittle").html( + "Officers Involved" + ); $(".roster-iframe").attr("src", rosterLink); $(".manage-profile-save").css("display", "block"); @@ -3921,7 +3924,12 @@ $(document).ready(() => { $(".incidents-nav-item").hide(); $(".dmv-nav-item").hide(); $(".cams-nav-item").hide(); - $("#reports-officers-involved-tag-title").html("EMS Involved"); + $("#reports-officers-involved-tag-title").html( + "EMS Involved" + ); + $("#bolos-officers-involved-tag-tittle").html( + "EMS Involved" + ); $(".dispatch-title-ofsomesort").html("Dispatch"); $(".dispatch-comms-container").fadeIn(0); $(".manage-profile-name-input-1").attr("readonly", true); diff --git a/ui/dashboard.html b/ui/dashboard.html index 1b1e8151..9cbb197d 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -617,7 +617,7 @@
                -
                Officers Involved
                +
                Officers Involved
                From c2119347a705e1ad4c7fdedfee1aefb4d080cf81 Mon Sep 17 00:00:00 2001 From: Annalouu <112778590+Annalouu@users.noreply.github.com> Date: Tue, 21 Mar 2023 07:44:47 +0000 Subject: [PATCH 134/381] Title fix --- ui/app.js | 4 ++-- ui/dashboard.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/app.js b/ui/app.js index 11417e4a..b5cca1e3 100644 --- a/ui/app.js +++ b/ui/app.js @@ -3868,7 +3868,7 @@ $(document).ready(() => { $("#reports-officers-involved-tag-title").html( "Officers Involved" ); - $("#bolos-officers-involved-tag-tittle").html( + $("#bolos-officers-involved-tag-title").html( "Officers Involved" ); $(".roster-iframe").attr("src", rosterLink); @@ -3927,7 +3927,7 @@ $(document).ready(() => { $("#reports-officers-involved-tag-title").html( "EMS Involved" ); - $("#bolos-officers-involved-tag-tittle").html( + $("#bolos-officers-involved-tag-title").html( "EMS Involved" ); $(".dispatch-title-ofsomesort").html("Dispatch"); diff --git a/ui/dashboard.html b/ui/dashboard.html index 9cbb197d..c40ef6e6 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -617,7 +617,7 @@
                -
                Officers Involved
                +
                Officers Involved
                From 862dcb263926416507db69ad22b9073aeb3fe21d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 21 Mar 2023 06:19:28 -0400 Subject: [PATCH 135/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index eedd0bce..f6a6f1e4 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.0' +version '2.1' lua54 'yes' From 52a8208a1185fba7b8e4e38544aa0f272985f072 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Tue, 21 Mar 2023 17:33:39 +0100 Subject: [PATCH 136/381] app.js app.js --- ui/app.js | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/ui/app.js b/ui/app.js index 732b8b28..ba0438e0 100644 --- a/ui/app.js +++ b/ui/app.js @@ -415,6 +415,30 @@ $(document).ready(() => { $(".close-all").css("filter", "brightness(15%)"); }); + $(".manage-convictions-container").on("click", "", function () { + if ($(".manage-profile-citizenid-input").val()) { + document.addEventListener("mouseup", onMouseDownIncidents); + const source = "manage-convictions-container"; + $(".convictions-holder").attr("data-source", source); + $(".convictions-known-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + } else { + $(this).effect("shake", { times: 2, distance: 2 }, 500); + } + }); + + $(".manage-profile-incidents-container").on("click", "", function () { + if ($(".manage-profile-citizenid-input").val()) { + document.addEventListener("mouseup", onMouseDownIncidents); + const source = "manage-profile-incidents-container"; + $(".profile-incidents-holder").attr("data-source", source); + $(".incidents-known-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + } else { + $(this).effect("shake", { times: 2, distance: 2 }, 500); + } + }); + $(".gallery-add-btn").click(function () { if ($(".manage-profile-citizenid-input").val()) { if ($(".gallery-upload-input").css("display") == "none") { @@ -758,6 +782,7 @@ $(document).ready(() => { "pointer-events", "auto" ); + } ); $(".tags-add-btn").click(function () { @@ -1121,6 +1146,22 @@ $(document).ready(() => { $(".close-all").css("filter", "none"); } + if ( + $(".convictions-known-container").css("display") != "none" + ) { + shouldClose = false; + $(".convictions-known-container").fadeOut(250); + $(".close-all").css("filter", "none"); + } + + if ( + $(".incidents-known-container").css("display") != "none" + ) { + shouldClose = false; + $(".incidents-known-container").fadeOut(250); + $(".close-all").css("filter", "none"); + } + if ($(".incidents-charges-table").css("display") != "none") { shouldClose = false; $(".incidents-charges-table").slideUp(500); @@ -2101,6 +2142,24 @@ $(document).ready(() => { } ); + $(".convictions-known-container").hover( + function () { + mouse_is_inside = true; + }, + function () { + mouse_is_inside = false; + } + ); + + $(".incidents-known-container").hover( + function () { + mouse_is_inside = true; + }, + function () { + mouse_is_inside = false; + } + ); + $(".reports-search-refresh").click(function () { if (canRefreshReports == true) { canRefreshReports = false; @@ -4600,6 +4659,7 @@ $(document).ready(() => { "auto" ); + $("#manage-incidents-title-input").val(table["title"]); $(".manage-incidents-reports-content").val(table["details"]); @@ -5065,6 +5125,7 @@ $(document).ready(() => { "pointer-events", "auto" ); + } else if (eventData.type == "callDetach") { $(".active-calls-item") .filter("[data-id='" + eventData.callid + "']") @@ -5324,6 +5385,20 @@ function hideIncidentsMenu() { $(".incidents-person-search-container").fadeOut(250); $(".close-all").css("filter", "none"); } + if ( + $(".convictions-known-container").css("display") != "none" && + !mouse_is_inside + ) { + $(".convictions-known-container").fadeOut(250); + $(".close-all").css("filter", "none"); + } + if ( + $(".incidents-known-container").css("display") != "none" && + !mouse_is_inside + ) { + $(".incidents-known-container").fadeOut(250); + $(".close-all").css("filter", "none"); + } } function onMouseDownIncidents(e) { From 65c682048269ea9114252ed49f59684508b1a9ef Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Tue, 21 Mar 2023 17:33:54 +0100 Subject: [PATCH 137/381] dashboard.html dashboard.html --- ui/dashboard.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ui/dashboard.html b/ui/dashboard.html index e06e9eb4..0f0afc95 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -69,6 +69,22 @@
                + +
                +
                +
                Known Convictions
                +
                +
                +
                +
                + +
                +
                +
                Known Incidents
                +
                +
                +
                +
                -
                From 10e0e11dae88abf8a6d17718ffe49e1d9edf5bbd Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 22 Mar 2023 14:07:32 +0100 Subject: [PATCH 161/381] fingerprint js fingerprint js --- ui/app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/app.js b/ui/app.js index ef095e50..fc1f4f00 100644 --- a/ui/app.js +++ b/ui/app.js @@ -204,14 +204,13 @@ $(document).ready(() => { $(".manage-profile-name-input-1").val(result["firstname"]); $(".manage-profile-name-input-2").val(result["lastname"]); $(".manage-profile-dob-input").val(result["dob"]); + $(".manage-profile-fingerprint-input").val(result["fingerprint"]); $(".manage-profile-phonenumber-input").val(result["phone"]); $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); $(".manage-profile-apartment-input").val(`${result.apartment}`); $(".manage-profile-url-input").val(result["profilepic"] ?? ""); $(".manage-profile-info").val(result["mdtinfo"]); $(".manage-profile-info").removeAttr("disabled"); - $(".manage-profile-fingerprint").val(result["fingerprint"]); - $(".manage-profile-fingerprint").removeAttr("disabled"); $(".manage-profile-pic").attr("src", result["profilepic"] ?? "img/male.png"); $(".manage-profile-active-warrant").css("display", "none") if (result["warrant"]) { @@ -529,7 +528,6 @@ $(document).ready(() => { pfp = newpfp; } let description = $(".manage-profile-info").val(); - let fingerprint = $(".manage-profile-fingerprint").val(); let id = $(".manage-profile-citizenid-input").val(); $(".licenses-holder") From 46e5a7d941bd934f10d453581832807e71588f38 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 22 Mar 2023 14:08:36 +0100 Subject: [PATCH 162/381] server -> main.lua fingerprint stuff server -> main.lua fingerprint stuff --- server/main.lua | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/server/main.lua b/server/main.lua index 6217fe1f..24fe35ab 100644 --- a/server/main.lua +++ b/server/main.lua @@ -145,7 +145,7 @@ QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, if Player then local JobType = GetJobType(Player.PlayerData.job.name) if JobType ~= nil then - local people = MySQL.query.await("SELECT p.citizenid, p.charinfo, md.pfp FROM players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query OR LOWER(`fingerprint`) LIKE :query AND jobtype = :jobtype LIMIT 20", { query = string.lower('%'..sentData..'%'), jobtype = JobType }) + local people = MySQL.query.await("SELECT p.citizenid, p.charinfo, md.pfp FROM players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query AND jobtype = :jobtype LIMIT 20", { query = string.lower('%'..sentData..'%'), jobtype = JobType }) local citizenIds = {} local citizenIdIndexMap = {} if not next(people) then cb({}) return end @@ -273,9 +273,9 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb pp = ProfPic(target.charinfo.gender), licences = licencesdata, dob = target.charinfo.birthdate, + fingerprint = target.metadata.fingerprint, phone = target.charinfo.phone, mdtinfo = '', - fingerprint = '', tags = {}, vehicles = {}, properties = {}, @@ -348,40 +348,28 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local mdtData = GetPersonInformation(sentId, JobType) if mdtData then person.mdtinfo = mdtData.information - person.fingerprint = mdtData.fingerprint person.profilepic = mdtData.pfp person.tags = json.decode(mdtData.tags) person.gallery = json.decode(mdtData.gallery) end - local mdtData2 = GetPfpFingerPrintInformation(sentId) - if mdtData2 then - if mdtData2.fingerprint then - person.fingerprint = mdtData2.fingerprint - end - if mdtData2.pfp ~= "" then - person.profilepic = mdtData2.pfp - end - end - return cb(person) end) -RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, fingerprint, licenses) +RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, licenses) local src = source local Player = QBCore.Functions.GetPlayer(src) UpdateAllLicenses(cid, licenses) if Player then local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'doj' then JobType = 'police' end - MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery, fingerprint) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery, :fingerprint) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, tags = :tags, gallery = :gallery, fingerprint = :fingerprint', { + MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, tags = :tags, gallery = :gallery', { cid = cid, information = information, pfp = pfp, jobtype = JobType, tags = json.encode(tags), gallery = json.encode(gallery), - fingerprint = fingerprint, }) end end) From f186a92e792fa1514b83af698bb9d7a1c4864d39 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 22 Mar 2023 14:08:58 +0100 Subject: [PATCH 163/381] removed fingerprint stuff ( not needed anymore) removed fingerprint stuff ( not needed anymore) --- server/dbm.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/dbm.lua b/server/dbm.lua index 5b3fb9f7..e3000ac7 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -34,16 +34,11 @@ end -- idk what this is used for either function GetPersonInformation(cid, jobtype) - local result = MySQL.query.await('SELECT information, tags, gallery, pfp, fingerprint FROM mdt_data WHERE cid = ? and jobtype = ?', { cid, jobtype}) + local result = MySQL.query.await('SELECT information, tags, gallery, pfp FROM mdt_data WHERE cid = ? and jobtype = ?', { cid, jobtype}) return result[1] -- return exports.oxmysql:executeSync('SELECT information, tags, gallery FROM mdt WHERE cid= ? and type = ?', { cid, jobtype }) end -function GetPfpFingerPrintInformation(cid) - local result = MySQL.query.await('SELECT pfp, fingerprint FROM mdt_data WHERE cid = ?', { cid }) - return result[1] -end - function GetIncidentName(id) -- Should also be a scalar local result = MySQL.query.await('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) From 4bbf7b2d27fd9d1ea8633275955e9c72377d7d6f Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 22 Mar 2023 14:12:32 +0100 Subject: [PATCH 164/381] changed height off gallery container changed height off gallery container --- ui/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/style.css b/ui/style.css index c61b93d8..354a59a1 100644 --- a/ui/style.css +++ b/ui/style.css @@ -1526,7 +1526,7 @@ span.tag-input[contenteditable]:empty::before { width: 100%; border: 2px solid var(--color-3); margin-top: 5px; - height: 15vh; + height: 17vh; overflow: scroll; } From 4fdd72bcc2e6fd611026387a6fa1bba48dec69cc Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 22 Mar 2023 14:15:31 +0100 Subject: [PATCH 165/381] added fingerprint save back added fingerprint save back --- server/main.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/main.lua b/server/main.lua index 24fe35ab..34ca99df 100644 --- a/server/main.lua +++ b/server/main.lua @@ -356,20 +356,21 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb return cb(person) end) -RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, licenses) +RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, fingerprint, tags, gallery, licenses) local src = source local Player = QBCore.Functions.GetPlayer(src) UpdateAllLicenses(cid, licenses) if Player then local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'doj' then JobType = 'police' end - MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, tags = :tags, gallery = :gallery', { + MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, fingerprint, tags, gallery) VALUES (:cid, :information, :pfp, :jobtype, :fingerprint, :tags, :gallery) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, fingerprint = :fingerprint, tags = :tags, gallery = :gallery', { cid = cid, information = information, pfp = pfp, jobtype = JobType, tags = json.encode(tags), gallery = json.encode(gallery), + fingerprint = fingerprint, }) end end) From 6717aca1a948d5a34251e8e53a4da6270ec35c98 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 22 Mar 2023 16:16:30 +0100 Subject: [PATCH 166/381] changed fingerprints when got convictions above or equal 1 changed fingerprints when got convictions above or equal 1 --- ui/app.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ui/app.js b/ui/app.js index fc1f4f00..e36e6d64 100644 --- a/ui/app.js +++ b/ui/app.js @@ -199,12 +199,19 @@ $(document).ready(() => { .addClass("fa-plus"); } + const { vehicles, tags, gallery, convictions, incidents, properties } = result + $(".manage-profile-editing-title").html(`You are currently editing ${result["firstname"]} ${result["lastname"]}`); $(".manage-profile-citizenid-input").val(result['cid']); $(".manage-profile-name-input-1").val(result["firstname"]); $(".manage-profile-name-input-2").val(result["lastname"]); $(".manage-profile-dob-input").val(result["dob"]); - $(".manage-profile-fingerprint-input").val(result["fingerprint"]); + if (convictions.length >= 1) { + $(".manage-profile-fingerprint-input").val(result["fingerprint"]); + } + else { + $(".manage-profile-fingerprint-input").val("No Fingerprints found!"); + } $(".manage-profile-phonenumber-input").val(result["phone"]); $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); $(".manage-profile-apartment-input").val(`${result.apartment}`); @@ -217,8 +224,6 @@ $(document).ready(() => { $(".manage-profile-active-warrant").css("display", "block"); } - const { vehicles, tags, gallery, convictions, incidents, properties } = result - $(".licenses-holder").empty(); $(".tags-holder").empty(); $(".vehs-holder").empty(); From 05fd01e3773fc52a4ccfffddf54437c28c7ec0e7 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Wed, 22 Mar 2023 16:32:15 +0100 Subject: [PATCH 167/381] fixed convictions/incident problem when removing - we had a bug where when u deleted a incident, the convictions stayed and made a error when searching --- server/main.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/main.lua b/server/main.lua index 6217fe1f..694e38f7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -630,6 +630,7 @@ RegisterNetEvent('mdt:server:deleteIncidents', function(id) if Config.LogPerms[Player.PlayerData.job.name] then if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_convictions` WHERE `linkedincident` = :id", {id = id}) MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }, function(rowsChanged) if rowsChanged > 0 then TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") @@ -643,6 +644,7 @@ RegisterNetEvent('mdt:server:deleteIncidents', function(id) end end end) + RegisterNetEvent('mdt:server:deleteBolo', function(id) if id then local src = source From 10c9451a1097f605632a08d5beb7aed6d7e12a17 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 22 Mar 2023 16:32:36 -0400 Subject: [PATCH 168/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 3059e844..442570b1 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.2' +version '2.3.1' lua54 'yes' From ec9896ff15fb308fc789f0ca7beb9f8439791109 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 15:41:36 -0400 Subject: [PATCH 169/381] Fixed fingerprint is not defined when saving profile --- shared/config.lua | 2 +- ui/app.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index 8efabc54..83d271c2 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -678,4 +678,4 @@ function GetJobType(job) else return nil end -end +end \ No newline at end of file diff --git a/ui/app.js b/ui/app.js index e36e6d64..1a496ff6 100644 --- a/ui/app.js +++ b/ui/app.js @@ -560,7 +560,6 @@ $(document).ready(() => { sName: sName, tags: tags, gallery: gallery, - fingerprint: fingerprint, licenses: licenses }) ); From f6d126106eb0a7df03b80f4abf999037c0c60c3d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 15:44:01 -0400 Subject: [PATCH 170/381] Forgot to push server.lua for fingerprint --- server/main.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index fd989922..0cb40683 100644 --- a/server/main.lua +++ b/server/main.lua @@ -370,7 +370,6 @@ RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName jobtype = JobType, tags = json.encode(tags), gallery = json.encode(gallery), - fingerprint = fingerprint, }) end end) From 3a571402669dc49253c89aa1fbd1dd5411c4016f Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:21:55 -0400 Subject: [PATCH 171/381] Removed fingerprint from SQL insert --- server/dbm.lua | 7 +------ server/main.lua | 7 +++---- ui/app.js | 4 ++++ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/server/dbm.lua b/server/dbm.lua index e3000ac7..11e2babc 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -89,11 +89,6 @@ function GetPlayerDataById(id) -- return exports.oxmysql:executeSync('SELECT citizenid, charinfo, job FROM players WHERE citizenid = ? LIMIT 1', { id }) end --- Probs also best not to use ---[[ function GetImpoundStatus(vehicleid, cb) - cb( #(exports.oxmysql:executeSync('SELECT id FROM `impound` WHERE `vehicleid`=:vehicleid', {['vehicleid'] = vehicleid })) > 0 ) -end ]] - function GetBoloStatus(plate) local result = MySQL.scalar.await('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) return result @@ -181,4 +176,4 @@ function UpdateAllLicenses(identifier, incomingLicenses) end MySQL.query.await('UPDATE `players` SET `metadata` = @metadata WHERE citizenid = @citizenid', {['@metadata'] = json.encode(result), ['@citizenid'] = identifier}) end -end +end \ No newline at end of file diff --git a/server/main.lua b/server/main.lua index 0cb40683..50622871 100644 --- a/server/main.lua +++ b/server/main.lua @@ -297,7 +297,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local incident = GetIncidentName(id) incidents[#incidents + 1] = { id = id, - title = incident.title, + title = incidents.title, time = conv.time } @@ -356,15 +356,14 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb return cb(person) end) -RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, fingerprint, tags, gallery, licenses) +RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, licenses) local src = source local Player = QBCore.Functions.GetPlayer(src) UpdateAllLicenses(cid, licenses) if Player then local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'doj' then JobType = 'police' end - MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, fingerprint, tags, gallery) VALUES (:cid, :information, :pfp, :jobtype, :fingerprint, :tags, :gallery) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, fingerprint = :fingerprint, tags = :tags, gallery = :gallery', { - cid = cid, + MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, tags = :tags, gallery = :gallery', { cid = cid, information = information, pfp = pfp, jobtype = JobType, diff --git a/ui/app.js b/ui/app.js index 1a496ff6..e8fbd5c9 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5483,6 +5483,10 @@ function searchProfilesResults(result) { metadata = JSON.parse(metadata); } + if (!value.licences) { + value.licences = {}; + } + let name = charinfo.firstname + " " + charinfo.lastname; let warrant = "red-tag"; let convictions = "red-tag"; From 172d6ef30b928b894dc2b3d12cef0241354be87d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:22:23 -0400 Subject: [PATCH 172/381] Reverted back to default --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 50622871..7be496b0 100644 --- a/server/main.lua +++ b/server/main.lua @@ -297,7 +297,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local incident = GetIncidentName(id) incidents[#incidents + 1] = { id = id, - title = incidents.title, + title = incident.title, time = conv.time } From df1f068a5c0910885cf0652c2f268068c1e67db9 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:47:19 -0400 Subject: [PATCH 173/381] Instructions for attempt exploit abuse when jailing --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index b3c05716..1d204eac 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,19 @@ https://user-images.githubusercontent.com/82112471/226150422-0c4776f0-0927-4b07- # Automatic Mugshot Pictures ![image](https://user-images.githubusercontent.com/82112471/226207146-086c5508-7e6f-4345-a157-3ec2fd588138.png) +# Jailing & Community Service +* If you're getting kicked for attempted exploit abuse when jailing. Located the follow event below on qb-policejob > server > main.lua + +```lua +police:server:JailPlayer +``` + +* Then comment out around line [779](https://github.com/qbcore-framework/qb-policejob/blob/937499495aa73538710737c14bd1b26d233dd599/server/main.lua#L779) as seen below + +```lua +-- if #(playerCoords - targetCoords) > 2.5 then return DropPlayer(src, "Attempted exploit abuse") end +``` + ## Inventory Edit | Automatic Add Weapons with images * [lj-inventory](https://github.com/loljoshie/lj-inventory) will come already with the changes needed for this to work. * [qb-inventory](https://github.com/qbcore-framework/qb-inventory) follow instructions below. From b26990dacb3b9fbf0773fbe13e9b0470aaa8eb04 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:48:59 -0400 Subject: [PATCH 174/381] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d204eac..5ef31fe2 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ police:server:JailPlayer -- if #(playerCoords - targetCoords) > 2.5 then return DropPlayer(src, "Attempted exploit abuse") end ``` -## Inventory Edit | Automatic Add Weapons with images +# Inventory Edit | Automatic Add Weapons with images * [lj-inventory](https://github.com/loljoshie/lj-inventory) will come already with the changes needed for this to work. * [qb-inventory](https://github.com/qbcore-framework/qb-inventory) follow instructions below. From 716bd3e18d58b995e58d60a5f1b2ee4da5fd1bcb Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 16:49:52 -0400 Subject: [PATCH 175/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 442570b1..23b6f2f0 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.1' +version '2.3.2' lua54 'yes' From cad7d562ba9690815858d88e1c3e431b0120768b Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 17:06:48 -0400 Subject: [PATCH 176/381] Fixed for when deleting an incident title is nil --- server/main.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/server/main.lua b/server/main.lua index 7be496b0..51b353db 100644 --- a/server/main.lua +++ b/server/main.lua @@ -295,11 +295,14 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb -- Get the incident details local id = conv.linkedincident local incident = GetIncidentName(id) - incidents[#incidents + 1] = { - id = id, - title = incident.title, - time = conv.time - } + + if incident then + incidents[#incidents + 1] = { + id = id, + title = incident.title, + time = conv.time + } + end local charges = json.decode(conv.charges) for _, charge in pairs(charges) do From 9e5512445f418a5a22e5faffb554d2adf4f11fe5 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 17:22:56 -0400 Subject: [PATCH 177/381] Deletes warrants if an incident is deleted with an active warrant --- server/main.lua | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/server/main.lua b/server/main.lua index 51b353db..41164ad8 100644 --- a/server/main.lua +++ b/server/main.lua @@ -612,27 +612,24 @@ RegisterNetEvent('mdt:server:deleteReports', function(id) end) RegisterNetEvent('mdt:server:deleteIncidents', function(id) - local result = MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }) - - if id then - local src = source - local Player = QBCore.Functions.GetPlayer(src) - if Config.LogPerms[Player.PlayerData.job.name] then - if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then - local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.update("DELETE FROM `mdt_convictions` WHERE `linkedincident` = :id", {id = id}) - MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }, function(rowsChanged) - if rowsChanged > 0 then - TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") - end - end) - else - local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') - TriggerEvent('mdt:server:AddLog', fullname.." tryed to delete a Incident with the ID ("..id..")") - end - end - end + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Config.LogPerms[Player.PlayerData.job.name] then + if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_convictions` WHERE `linkedincident` = :id", {id = id}) + MySQL.update("UPDATE `mdt_convictions` SET `warrant` = '0' WHERE `linkedincident` = :id", {id = id}) -- Delete any outstanding warrants from incidents + MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }, function(rowsChanged) + if rowsChanged > 0 then + TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") + end + end) + else + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') + TriggerEvent('mdt:server:AddLog', fullname.." tried to delete an Incident with the ID ("..id..")") + end + end end) RegisterNetEvent('mdt:server:deleteBolo', function(id) From 18f632eaf5c3d6f7c9bc082cab8f6e656290364b Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 17:24:42 -0400 Subject: [PATCH 178/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 23b6f2f0..2ee8d0a1 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.2' +version '2.3.3' lua54 'yes' From 45a335ca93f08da4d0a1a996b516311449c8a843 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 21:59:22 -0400 Subject: [PATCH 179/381] Fixed licenses not saving properly --- client/main.lua | 4 ++-- ui/app.js | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/client/main.lua b/client/main.lua index cde9affa..604baa2e 100644 --- a/client/main.lua +++ b/client/main.lua @@ -295,10 +295,9 @@ RegisterNUICallback("saveProfile", function(data, cb) local sName = data.sName local tags = data.tags local gallery = data.gallery - local fingerprint = data.fingerprint local licenses = data.licenses - TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, fingerprint, licenses) + TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, licenses) cb(true) end) @@ -316,6 +315,7 @@ RegisterNUICallback("getProfileData", function(data, cb) local pP = nil local result = getProfileDataPromise(id) local vehicles = result.vehicles + local licenses = result.licences for i=1,#vehicles do local vehicle=result.vehicles[i] diff --git a/ui/app.js b/ui/app.js index e8fbd5c9..ca3b19ec 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5473,26 +5473,30 @@ function searchProfilesResults(result) { result.forEach((value) => { let charinfo = value.charinfo; - let metadata = value.licences; - + let metadata = value.metadata; + if (typeof value.charinfo == "string") { charinfo = JSON.parse(charinfo); } - + if (typeof value.metadata == "string") { metadata = JSON.parse(metadata); } - - if (!value.licences) { - value.licences = {}; + + if (!metadata) { + metadata = {}; } - + + if (!metadata.licences) { + metadata.licences = {}; + } + let name = charinfo.firstname + " " + charinfo.lastname; let warrant = "red-tag"; let convictions = "red-tag"; - + let licences = ""; - let licArr = Object.entries(value.licences); + let licArr = Object.entries(metadata.licences); if (licArr.length == 0 || licArr.length == undefined) { var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; From 28fe280f114b0c99c3ca6606cd71d9f0c2f1cb15 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Mar 2023 22:10:02 -0400 Subject: [PATCH 180/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 2ee8d0a1..03230628 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.3' +version '2.3.4' lua54 'yes' From 29869c04b49ac1db9e7fe5624970490a9bee66d0 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:42:02 -0400 Subject: [PATCH 181/381] Fixed tags not being saved when more than 1 --- client/main.lua | 3 ++- server/main.lua | 32 ++++++++++++++++++-------------- ui/app.js | 8 ++++---- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/client/main.lua b/client/main.lua index 604baa2e..d41662f2 100644 --- a/client/main.lua +++ b/client/main.lua @@ -296,11 +296,12 @@ RegisterNUICallback("saveProfile", function(data, cb) local tags = data.tags local gallery = data.gallery local licenses = data.licenses - + TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, licenses) cb(true) end) + RegisterNUICallback("getProfileData", function(data, cb) local id = data.id local p = nil diff --git a/server/main.lua b/server/main.lua index 41164ad8..42175be2 100644 --- a/server/main.lua +++ b/server/main.lua @@ -360,22 +360,26 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb end) RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, licenses) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - UpdateAllLicenses(cid, licenses) - if Player then - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'doj' then JobType = 'police' end - MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, tags = :tags, gallery = :gallery', { cid = cid, - information = information, - pfp = pfp, - jobtype = JobType, - tags = json.encode(tags), - gallery = json.encode(gallery), - }) - end + local src = source + local Player = QBCore.Functions.GetPlayer(src) + UpdateAllLicenses(cid, licenses) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'doj' then JobType = 'police' end + + MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, jobtype = :jobtype, tags = :tags, gallery = :gallery', { + cid = cid, + information = information, + pfp = pfp, + jobtype = JobType, + tags = json.encode(tags), + gallery = json.encode(gallery), + }, function() + end) + end end) + -- mugshot RegisterNetEvent('cqc-mugshot:server:triggerSuspect', function(suspect) TriggerClientEvent('cqc-mugshot:client:trigger', suspect, suspect) diff --git a/ui/app.js b/ui/app.js index ca3b19ec..0ffd6dc1 100644 --- a/ui/app.js +++ b/ui/app.js @@ -510,11 +510,11 @@ $(document).ready(() => { let licenses = {}; $(".tags-holder") - .find("div") + .find("span.tag-input, div.tag") .each(function () { - if ($(this).text() != "" && $(this).text() != "No Tags") { - tags.push($(this).text()); - } + if ($(this).text() != "" && $(this).text() != "No Tags") { + tags.push($(this).text()); + } }); $(".gallery-inner-container") From 92783fcca4864bed11da7f41bdcf49ac6ed16d37 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:44:51 -0400 Subject: [PATCH 182/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 03230628..c20755d5 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.4' +version '2.3.5' lua54 'yes' From 00e84bc95d336c34b95ea403f2f54e4e9ec1d4c8 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Mon, 27 Mar 2023 18:11:22 +0200 Subject: [PATCH 183/381] added Bill Variations added Bill Variations --- client/main.lua | 9 +++++++-- server/main.lua | 7 +++++++ shared/config.lua | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index cde9affa..008b06ed 100644 --- a/client/main.lua +++ b/client/main.lua @@ -393,8 +393,13 @@ RegisterNUICallback("sendFine", function(data, cb) local targetSourceId = Citizen.Await(p) if fine > 0 then - -- Uses QB-Core /bill command - ExecuteCommand(('bill %s %s'):format(targetSourceId, fine)) + if Config.BillVariation then + -- Useed QB-Core removeMoney Functions + TriggerServerEvent("mdt:server:removeMoney", citizenId, fine) + else + -- Uses QB-Core /bill command + ExecuteCommand(('bill %s %s'):format(targetSourceId, fine)) + end end end) diff --git a/server/main.lua b/server/main.lua index 6217fe1f..1c32383d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1647,3 +1647,10 @@ end) RegisterNetEvent('mdt:server:registerweapon', function(serial, imageurl, notes, owner, weapClass, weapModel) exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) end) + +RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine) + local src = source + local Player = QBCore.Functions.GetPlayerByCitizenId(citizenId) + TriggerClientEvent('QBCore:Notify', Player, fine.."$ were removed from your Bank Account.") + Player.Functions.RemoveMoney('bank', fine, 'lspd-fine') +end) \ No newline at end of file diff --git a/shared/config.lua b/shared/config.lua index 8efabc54..1a76af09 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -6,6 +6,7 @@ Config.OnlyShowOnDuty = true Config.UseCQCMugshot = true Config.MugPhotos = 1 -- Front, Back Side. Use 4 for both sides ( default is 1 ) Config.Webhook = '' -- Images will be uploaded here ( add a discord webhook ) +Config.BillVariation = true -- true = Fine gets automatically removed from Bank // false = the fine gets added to the invoice (can not be payed by the player) -- Set up your inventory to automatically retrieve images when a weapon is registered at a weapon shop or self-registered. -- If you're utilizing lj-inventory's latest version from GitHub, no further modifications are necessary. From c302fa2d1bed7bdc3e61f5983d4fe3345b12bd83 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Mon, 27 Mar 2023 18:14:15 +0200 Subject: [PATCH 184/381] little spelling :P little spelling :P --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 008b06ed..a9145b55 100644 --- a/client/main.lua +++ b/client/main.lua @@ -394,7 +394,7 @@ RegisterNUICallback("sendFine", function(data, cb) if fine > 0 then if Config.BillVariation then - -- Useed QB-Core removeMoney Functions + -- Uses QB-Core removeMoney Functions TriggerServerEvent("mdt:server:removeMoney", citizenId, fine) else -- Uses QB-Core /bill command From a984d26adeffbcfc67926063b716c477f19b36de Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 27 Mar 2023 12:35:35 -0400 Subject: [PATCH 185/381] Added better clarification --- shared/config.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/config.lua b/shared/config.lua index 3289bf43..757b62d0 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -6,7 +6,10 @@ Config.OnlyShowOnDuty = true Config.UseCQCMugshot = true Config.MugPhotos = 1 -- Front, Back Side. Use 4 for both sides ( default is 1 ) Config.Webhook = '' -- Images will be uploaded here ( add a discord webhook ) -Config.BillVariation = true -- true = Fine gets automatically removed from Bank // false = the fine gets added to the invoice (can not be payed by the player) + +-- If set to true = Fine gets automatically removed from bank automatically charging the player. +-- If set to false = The fine gets sent as an Invoice to their phone and it us to the player to pay for it, can remain unpaid and ignored. +Config.BillVariation = true -- Set up your inventory to automatically retrieve images when a weapon is registered at a weapon shop or self-registered. -- If you're utilizing lj-inventory's latest version from GitHub, no further modifications are necessary. From 3b897a07f8795f43ab5b29a27b2c2a8eb1a5d22a Mon Sep 17 00:00:00 2001 From: Lenzh Date: Mon, 27 Mar 2023 22:15:16 +0200 Subject: [PATCH 186/381] Added clockin system on toggle duty button --- client/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/client/main.lua b/client/main.lua index a932f078..97f50a3f 100644 --- a/client/main.lua +++ b/client/main.lua @@ -758,6 +758,7 @@ end) RegisterNUICallback("toggleDuty", function(data, cb) TriggerServerEvent('QBCore:ToggleDuty') + TriggerServerEvent('ps-mdt:server:ClockSystem') cb(true) end) From a13fcad52f70657c30af0ea5d1e46588552a3f5a Mon Sep 17 00:00:00 2001 From: Lenzh Date: Mon, 27 Mar 2023 22:15:50 +0200 Subject: [PATCH 187/381] Update config.lua --- shared/config.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/config.lua b/shared/config.lua index 757b62d0..0d0fbf26 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -6,6 +6,8 @@ Config.OnlyShowOnDuty = true Config.UseCQCMugshot = true Config.MugPhotos = 1 -- Front, Back Side. Use 4 for both sides ( default is 1 ) Config.Webhook = '' -- Images will be uploaded here ( add a discord webhook ) +Config.ClockinWebhook = '' -- Clockin data will be send here ( add a discord webhook ) + -- If set to true = Fine gets automatically removed from bank automatically charging the player. -- If set to false = The fine gets sent as an Invoice to their phone and it us to the player to pay for it, can remain unpaid and ignored. @@ -682,4 +684,4 @@ function GetJobType(job) else return nil end -end \ No newline at end of file +end From fd5f0185aaf06e7e2c3487dd12f801ae5271836c Mon Sep 17 00:00:00 2001 From: Lenzh Date: Mon, 27 Mar 2023 22:17:01 +0200 Subject: [PATCH 188/381] added Clockin system to toggleDuty botton --- server/main.lua | 57 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 95684066..949323db 100644 --- a/server/main.lua +++ b/server/main.lua @@ -111,6 +111,39 @@ RegisterNetEvent("ps-mdt:server:ToggleDuty", function() end end) +RegisterNetEvent("ps-mdt:server:ClockSystem", function() + local src = source + local PlayerData = GetPlayerData(src) + local time = os.date("%Y-%m-%d %H:%M:%S") + local firstName = PlayerData.charinfo.firstname:sub(1,1):upper()..PlayerData.charinfo.firstname:sub(2) + local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) + if PlayerData.job.onduty then + + TriggerClientEvent('QBCore:Notify', source, "You're clocked-in", 'success') + MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, clock_in_time) VALUES (:user_id, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, clock_in_time = :clock_in_time', { + user_id = PlayerData.citizenid, + clock_in_time = time + }, function() + end) + + --discord webhook Config.ClockinWebhook + sendToDiscord(16753920, "MDT Clock-in System", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nStatus: **On Duty**', "ps-mdt") + else + TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') + MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + local res = tostring(result) + local time_formatted = format_time(res) + --discord webhook Config.ClockinWebhook + sendToDiscord(16753920, "MDT Clock-in System", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt") + end +end) + RegisterNetEvent('mdt:server:openMDT', function() local src = source local PlayerData = GetPlayerData(src) @@ -1646,4 +1679,26 @@ RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine) local Player = QBCore.Functions.GetPlayerByCitizenId(citizenId) TriggerClientEvent('QBCore:Notify', Player, fine.."$ were removed from your Bank Account.") Player.Functions.RemoveMoney('bank', fine, 'lspd-fine') -end) \ No newline at end of file +end) + +function sendToDiscord(color, name, message, footer) + local embed = { + { + color = color, + title = "**".. name .."**", + description = message, + footer = { + text = footer, + }, + } + } + + PerformHttpRequest(Config.ClockinWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + end + + function format_time(time) + local hours = math.floor(time / 3600) + local minutes = math.floor((time % 3600) / 60) + local seconds = time % 60 + return string.format('%02d:%02d:%02d', hours, minutes, seconds) +end From 635c934d326d12ddc58a37c640efb72a40a11cfc Mon Sep 17 00:00:00 2001 From: Lenzh Date: Mon, 27 Mar 2023 22:17:28 +0200 Subject: [PATCH 189/381] clockin db --- mdt.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mdt.sql b/mdt.sql index a1cb125b..78fb20c9 100644 --- a/mdt.sql +++ b/mdt.sql @@ -121,3 +121,13 @@ CREATE TABLE IF NOT EXISTS `mdt_impound` ( `time` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE if not exists `mdt_clocking` ( + `id` INT(10) NOT NULL AUTO_INCREMENT, + `user_id` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci', + `clock_in_time` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci', + `clock_out_time` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci', + `total_time` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci', + PRIMARY KEY (`user_id`) USING BTREE, + INDEX `id` (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; From 2185475de984d129243fa60d0c429f9886485cbf Mon Sep 17 00:00:00 2001 From: Lenzh Date: Mon, 27 Mar 2023 22:19:16 +0200 Subject: [PATCH 190/381] Update main.lua --- client/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/client/main.lua b/client/main.lua index 97f50a3f..803dd2c2 100644 --- a/client/main.lua +++ b/client/main.lua @@ -40,6 +40,7 @@ end) RegisterNetEvent("QBCore:Client:SetDuty", function(job, state) if AllowedJob(job) then TriggerServerEvent("ps-mdt:server:ToggleDuty") + TriggerServerEvent("ps-mdt:server:ClockSystem") TriggerServerEvent('QBCore:ToggleDuty') if PlayerData.job.name == "police" or PlayerData.job.type == "leo" then TriggerServerEvent("police:server:UpdateCurrentCops") From 05058c75064c1d83e1d5e214424638cf13f54d44 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:36:21 -0400 Subject: [PATCH 191/381] Added Clock In/Out Feature and Leaderboard --- server/main.lua | 143 ++++++++++++++++++++++++++++------------------ shared/config.lua | 20 +++++-- 2 files changed, 100 insertions(+), 63 deletions(-) diff --git a/server/main.lua b/server/main.lua index 949323db..c652f621 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1,13 +1,9 @@ local QBCore = exports['qb-core']:GetCoreObject() --- Maybe cache? local incidents = {} local convictions = {} local bolos = {} local MugShots = {} - --- TODO make it departments compatible local activeUnits = {} - local impound = {} local dispatchMessages = {} local isDispatchRunning = false @@ -80,24 +76,43 @@ RegisterNetEvent("ps-mdt:server:OnPlayerUnload", function() end end) -AddEventHandler("playerDropped", function(reason) - --// Delete player from the MDT on logout - local src = source - local player = QBCore.Functions.GetPlayer(src) - if player ~= nil then - if GetActiveData(player.PlayerData.citizenid) then - activeUnits[player.PlayerData.citizenid] = nil - end - else - local license = QBCore.Functions.GetIdentifier(src, "license") - local citizenids = GetCitizenID(license) +AddEventHandler('playerDropped', function(reason) + local src = source + local PlayerData = GetPlayerData(src) + local time = os.date("%Y-%m-%d %H:%M:%S") + local firstName = PlayerData.charinfo.firstname:sub(1,1):upper()..PlayerData.charinfo.firstname:sub(2) + local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) - for _, v in pairs(citizenids) do - if GetActiveData(v.citizenid) then - activeUnits[v.citizenid] = nil - end - end - end + -- Auto clock out if the player is off duty + if PlayerData.job.onduty then + MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + local res = tostring(result) + local time_formatted = format_time(res) + + sendToDiscord(16753920, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Disconnected - Auto Clocked Out**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") + end + + -- Delete player from the MDT on logout + if PlayerData ~= nil then + if GetActiveData(PlayerData.citizenid) then + activeUnits[PlayerData.citizenid] = nil + end + else + local license = QBCore.Functions.GetIdentifier(src, "license") + local citizenids = GetCitizenID(license) + + for _, v in pairs(citizenids) do + if GetActiveData(v.citizenid) then + activeUnits[v.citizenid] = nil + end + end + end end) RegisterNetEvent("ps-mdt:server:ToggleDuty", function() @@ -111,36 +126,61 @@ RegisterNetEvent("ps-mdt:server:ToggleDuty", function() end end) +QBCore.Commands.Add("mdtleaderboard", "Show MDT leaderboard", {}, false, function(source, args) + local PlayerData = GetPlayerData(source) + local job = PlayerData.job.name + + if not IsPoliceOrEms(job) then + TriggerClientEvent('QBCore:Notify', source, "You don't have permission to use this command.", 'error') + return + end + + local result = MySQL.Sync.fetchAll('SELECT firstname, lastname, total_time FROM mdt_clocking ORDER BY total_time DESC') + + local leaderboard_message = '**MDT Leaderboard**\n\n' + + for i, record in ipairs(result) do + local firstName = record.firstname:sub(1,1):upper()..record.firstname:sub(2) + local lastName = record.lastname:sub(1,1):upper()..record.lastname:sub(2) + local total_time = format_time(record.total_time) + + leaderboard_message = leaderboard_message .. i .. '. **' .. firstName .. ' ' .. lastName .. '** - ' .. total_time .. '\n' + end + + sendToDiscord(16753920, "MDT Leaderboard", leaderboard_message, "ps-mdt | Made by Project Sloth") + TriggerClientEvent('QBCore:Notify', source, "MDT leaderboard sent to Discord!", 'success') +end) + RegisterNetEvent("ps-mdt:server:ClockSystem", function() local src = source local PlayerData = GetPlayerData(src) local time = os.date("%Y-%m-%d %H:%M:%S") - local firstName = PlayerData.charinfo.firstname:sub(1,1):upper()..PlayerData.charinfo.firstname:sub(2) - local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) + local firstName = PlayerData.charinfo.firstname:sub(1,1):upper()..PlayerData.charinfo.firstname:sub(2) + local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) if PlayerData.job.onduty then - + TriggerClientEvent('QBCore:Notify', source, "You're clocked-in", 'success') - MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, clock_in_time) VALUES (:user_id, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, clock_in_time = :clock_in_time', { - user_id = PlayerData.citizenid, - clock_in_time = time - }, function() - end) - - --discord webhook Config.ClockinWebhook - sendToDiscord(16753920, "MDT Clock-in System", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nStatus: **On Duty**', "ps-mdt") + MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, firstname, lastname, clock_in_time) VALUES (:user_id, :firstname, :lastname, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, firstname = :firstname, lastname = :lastname, clock_in_time = :clock_in_time', { + user_id = PlayerData.citizenid, + firstname = firstName, + lastname = lastName, + clock_in_time = time + }, function() + end) + sendToDiscord(65280, "MDT Clock-In", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **On Duty**', "ps-mdt | Made by Project Sloth") else TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { ['@user_id'] = PlayerData.citizenid }) - local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { - ['@user_id'] = PlayerData.citizenid - }) - local res = tostring(result) - local time_formatted = format_time(res) - --discord webhook Config.ClockinWebhook - sendToDiscord(16753920, "MDT Clock-in System", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt") + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + local res = tostring(result) + local time_formatted = format_time(res) + + sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") end end) @@ -149,9 +189,6 @@ RegisterNetEvent('mdt:server:openMDT', function() local PlayerData = GetPlayerData(src) if not PermCheck(src, PlayerData) then return end local Radio = Player(src).state.radioChannel or 0 - --[[ if Radio > 100 then - Radio = 0 - end ]] activeUnits[PlayerData.citizenid] = { cid = PlayerData.citizenid, @@ -166,9 +203,7 @@ RegisterNetEvent('mdt:server:openMDT', function() local JobType = GetJobType(PlayerData.job.name) local bulletin = GetBulletins(JobType) local calls = exports['ps-dispatch']:GetDispatchCalls() - --TriggerClientEvent('mdt:client:dashboardbulletin', src, bulletin) TriggerClientEvent('mdt:client:open', src, bulletin, activeUnits, calls, PlayerData.citizenid) - --TriggerClientEvent('mdt:client:GetActiveUnits', src, activeUnits) end) QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, sentData) @@ -276,7 +311,6 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb if not target or not next(target) then return cb({}) end - -- Convert to string because bad code, yes? if type(target.job) == 'string' then target.job = json.decode(target.job) end if type(target.charinfo) == 'string' then target.charinfo = json.decode(target.charinfo) end if type(target.metadata) == 'string' then target.metadata = json.decode(target.metadata) end @@ -352,7 +386,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb for _,v in ipairs(person.convictions2) do if (not hash[v]) then - person.convictions[#person.convictions+1] = v -- found this dedupe method on sourceforge somewhere, copy+pasta dev, needs to be refined later + person.convictions[#person.convictions+1] = v hash[v] = true end end @@ -376,9 +410,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb coords = tostring(Coords[index]["coords"]["enter"]["x"]..",".. Coords[index]["coords"]["enter"]["y"].. ",".. Coords[index]["coords"]["enter"]["z"]), } end - -- if properties then person.properties = Houses - -- end end local mdtData = GetPersonInformation(sentId, JobType) @@ -413,7 +445,7 @@ RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName end) --- mugshot +-- Mugshotd RegisterNetEvent('cqc-mugshot:server:triggerSuspect', function(suspect) TriggerClientEvent('cqc-mugshot:client:trigger', suspect, suspect) end) @@ -441,7 +473,6 @@ end) -- Incidents - RegisterNetEvent('mdt:server:getAllIncidents', function() local src = source local Player = QBCore.Functions.GetPlayer(src) @@ -890,7 +921,6 @@ QBCore.Functions.CreateCallback('mdt:server:SearchVehicles', function(source, cb value.owner = ownerResult['firstname'] .. " " .. ownerResult['lastname'] end - -- idk if this works or I have to call cb first then return :shrug: return cb(vehicles) end @@ -936,7 +966,7 @@ RegisterNetEvent('mdt:server:getVehicleData', function(plate) vehicle[1]['stolen'] = info['stolen'] end - if vehicle[1]['image'] == nil then vehicle[1]['image'] = "img/not-found.webp" end -- Image + if vehicle[1]['image'] == nil then vehicle[1]['image'] = "img/not-found.webp" end end TriggerClientEvent('mdt:client:getVehicleData', src, vehicle) @@ -982,7 +1012,7 @@ RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, n fee = fee, time = os.time() + (time * 60) }, function(res) - -- notify? + local data = { vehicleid = data['id'], plate = plate, @@ -1440,7 +1470,6 @@ RegisterNetEvent('mdt:server:sendMessage', function(message, time) } dispatchMessages[#dispatchMessages+1] = Item TriggerClientEvent('mdt:client:dashboardMessage', -1, Item) - -- Send to all clients, for auto updating stuff, ya dig. end) end end @@ -1503,7 +1532,7 @@ local function isRequestVehicle(vehId) end return found end -exports('isRequestVehicle', isRequestVehicle) -- exports['erp_mdt']:isRequestVehicle() +exports('isRequestVehicle', isRequestVehicle) RegisterNetEvent('mdt:server:impoundVehicle', function(sentInfo, sentVehicle) local src = source @@ -1696,9 +1725,9 @@ function sendToDiscord(color, name, message, footer) PerformHttpRequest(Config.ClockinWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) end - function format_time(time) +function format_time(time) local hours = math.floor(time / 3600) local minutes = math.floor((time % 3600) / 60) local seconds = time % 60 return string.format('%02d:%02d:%02d', hours, minutes, seconds) -end +end \ No newline at end of file diff --git a/shared/config.lua b/shared/config.lua index 0d0fbf26..d3b7b222 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -1,12 +1,18 @@ Config = Config or {} Config.UsingDefaultQBApartments = true - Config.OnlyShowOnDuty = true Config.UseCQCMugshot = true -Config.MugPhotos = 1 -- Front, Back Side. Use 4 for both sides ( default is 1 ) -Config.Webhook = '' -- Images will be uploaded here ( add a discord webhook ) -Config.ClockinWebhook = '' -- Clockin data will be send here ( add a discord webhook ) + +-- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. +Config.MugPhotos = 1 + +-- Images for mug shots will be uploaded here. Add a Discord webhook. +Config.Webhook = '' + +-- Clock-in notifications for duty. Add a Discord webhook. +-- Command /mdtleaderboard, will display top players per clock-in hours. +Config.ClockinWebhook = 'https://discord.com/api/webhooks/1090119068901711873/JzbcE10s3zzzmPKQJ9gTQrtEryGBNniYwZcrqqU7YyszP1hnaiMhlzMk4gicDzRqj5Yg' -- If set to true = Fine gets automatically removed from bank automatically charging the player. @@ -18,9 +24,11 @@ Config.BillVariation = true -- However, if you're using a different inventory system, please refer to the "Inventory Edit | Automatic Add Weapons with images" section in ps-mdt's README. Config.InventoryForWeaponsImages = "lj-inventory" -Config.Fuel = "lj-fuel" -- "LegacyFuel", "lj-fuel" +-- "LegacyFuel", "lj-fuel" +Config.Fuel = "lj-fuel" -Config.RosterLink = { -- Google Docs Link +-- Google Docs Link +Config.RosterLink = { ['police'] = '', ['ambulance'] = '', ['bcso'] = '', From 9ef0b431a8200f302c054132b103a203f02a9fcf Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:42:33 -0400 Subject: [PATCH 192/381] 2.3.6 Version --- fxmanifest.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index c20755d5..91abf0ac 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.5' +version '2.3.6' lua54 'yes' @@ -29,4 +29,4 @@ files { 'ui/dashboard.html', 'ui/app.js', 'ui/style.css', -} +} \ No newline at end of file From 73c72b655c41798f5b48a4e86616e2e4fda32e1e Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 00:45:28 -0400 Subject: [PATCH 193/381] Added pic for leaderboard --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5ef31fe2..4843957b 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ https://user-images.githubusercontent.com/82112471/226150422-0c4776f0-0927-4b07- # Automatic Mugshot Pictures ![image](https://user-images.githubusercontent.com/82112471/226207146-086c5508-7e6f-4345-a157-3ec2fd588138.png) +# Clock In/Out & Leaderboard +* Triggers when officers Toggle Duty from inside the mdt. +![image](https://user-images.githubusercontent.com/82112471/228130546-6366ed1e-f5a8-428c-8680-0c384d2cff52.png) + # Jailing & Community Service * If you're getting kicked for attempted exploit abuse when jailing. Located the follow event below on qb-policejob > server > main.lua From e8eb39f047ab8b46a304ab6e2d23197f4144f888 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 02:18:49 -0400 Subject: [PATCH 194/381] Update mdt.sql --- mdt.sql | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/mdt.sql b/mdt.sql index 78fb20c9..2ce2cc2f 100644 --- a/mdt.sql +++ b/mdt.sql @@ -122,12 +122,14 @@ CREATE TABLE IF NOT EXISTS `mdt_impound` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -CREATE TABLE if not exists `mdt_clocking` ( - `id` INT(10) NOT NULL AUTO_INCREMENT, - `user_id` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci', - `clock_in_time` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci', - `clock_out_time` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci', - `total_time` VARCHAR(50) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci', - PRIMARY KEY (`user_id`) USING BTREE, - INDEX `id` (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +CREATE TABLE IF NOT EXISTS `mdt_clocking` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `user_id` varchar(50) NOT NULL DEFAULT '', + `firstname` varchar(255) NOT NULL DEFAULT '', + `lastname` varchar(255) NOT NULL DEFAULT '', + `clock_in_time` varchar(255) NOT NULL DEFAULT '', + `clock_out_time` varchar(50) DEFAULT NULL, + `total_time` varchar(50) NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`) USING BTREE, + KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; From ba0f6d8ef98f971ea08cd2c54b738dbded39e0f5 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:18:45 +0200 Subject: [PATCH 195/381] adding stafflogs/leaderboard addition adding stafflogs/leaderboard addition https://i.imgur.com/TpAgsmU.png --- shared/config.lua | 2 +- ui/app.js | 6 ++-- ui/dashboard.html | 20 ++++++++++- ui/style.css | 85 ++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 107 insertions(+), 6 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index d3b7b222..887873c5 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -12,7 +12,7 @@ Config.Webhook = '' -- Clock-in notifications for duty. Add a Discord webhook. -- Command /mdtleaderboard, will display top players per clock-in hours. -Config.ClockinWebhook = 'https://discord.com/api/webhooks/1090119068901711873/JzbcE10s3zzzmPKQJ9gTQrtEryGBNniYwZcrqqU7YyszP1hnaiMhlzMk4gicDzRqj5Yg' +Config.ClockinWebhook = '' -- If set to true = Fine gets automatically removed from bank automatically charging the player. diff --git a/ui/app.js b/ui/app.js index 0ffd6dc1..9a174a4b 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5176,10 +5176,10 @@ $(document).ready(() => { .html(eventData.data); } else if (eventData.type == "getAllLogs") { let table = eventData.data; - $(".stafflogs-container").empty(); + $(".stafflogs-box").empty(); $.each(table, function (index, value) { - $(".stafflogs-container").append( - `

                • ${value.text + $(".stafflogs-box").append( + `

                ► ${value.text } (${timeAgo( Number(value.time) )})

                ` diff --git a/ui/dashboard.html b/ui/dashboard.html index 512d34fd..30ce2f77 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -861,7 +861,25 @@
                -
                +
                +
                Logs
                +
                +
                +
                +
                Activity Leaderboard
                +
                +
                ► 1st: XYZ (CALLSIGN) 00:00:00
                +
                ► 2nd: XYZ (CALLSIGN) 00:00:00
                +
                ► 3rd: XYZ (CALLSIGN) 00:00:00
                +
                ► 4th: XYZ (CALLSIGN) 00:00:00
                +
                ► 5th: XYZ (CALLSIGN) 00:00:00
                +
                ► 6th: XYZ (CALLSIGN) 00:00:00
                +
                ► 7th: XYZ (CALLSIGN) 00:00:00
                +
                ► 8th: XYZ (CALLSIGN) 00:00:00
                +
                ► 9th: XYZ (CALLSIGN) 00:00:00
                +
                ► 10th: XYZ (CALLSIGN) 00:00:00
                +
                +
                diff --git a/ui/style.css b/ui/style.css index 354a59a1..274175ff 100644 --- a/ui/style.css +++ b/ui/style.css @@ -4966,22 +4966,105 @@ span.tag-reports-input[contenteditable]:empty::before { .stafflogs-container { background-color: var(--color-1); border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 66%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; + overflow: auto; +} + +.stafflogs-box { display: flex; flex-direction: column; height: 74.7vh; width: 100%; + margin-top: 2px; + margin-left: 1px; + margin-right: 1px; + overflow: auto; +} + +.stafflogs-box > p { + color: white; + font-size: 1.3vh; + padding-left: 1vh; +} + +.stafflogs-box-title { + align-self: center; + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; margin-top: 10px; + margin-bottom: 0px; margin-left: 10px; margin-right: 10px; + width: 97.5%; + height: 25px; + align-items: center; + user-select: none; +} + +.leaderboard-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 74.7vh; + width: 33%; + margin-top: 10px; + margin-left: 4px; + margin-right: 10px; + overflow: auto; +} + +.leaderboard-box { + display: flex; + flex-direction: column; + height: 74.7vh; + width: 100%; + margin-top: 2px; + margin-left: 1px; + margin-right: 1px; overflow: auto; } -.stafflogs-container > p { +.leaderboard-box-test { + margin: 0; + padding-top:0.8vh; color: white; font-size: 1.3vh; padding-left: 1vh; } +.leaderboard-title { + align-self: center; + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-left: 10px; + margin-right: 10px; + width: 95.5%; + height: 25px; + align-items: center; + user-select: none; +} + /* Vehicle Colors :( so long lol */ .black-color { From 01b58393727f3dd0e18139727e0ee3b2d98ea44d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:05:54 -0400 Subject: [PATCH 196/381] Added Officers Activity Leaderboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added backend code, front end code added by 𝕷𝖊𝕾𝖎𝖎𝕹 --- client/main.lua | 15 +++++++++++++++ server/main.lua | 26 +++++++++++++++++++++++++- ui/app.js | 23 +++++++++++++++++++++++ ui/dashboard.html | 12 +----------- 4 files changed, 64 insertions(+), 12 deletions(-) diff --git a/client/main.lua b/client/main.lua index 803dd2c2..deee09f7 100644 --- a/client/main.lua +++ b/client/main.lua @@ -91,6 +91,7 @@ RegisterCommand('mdt', function() if not PlayerData.metadata["isdead"] and not PlayerData.metadata["inlaststand"] and not PlayerData.metadata["ishandcuffed"] and not IsPauseMenuActive() then if GetJobType(PlayerData.job.name) ~= nil then TriggerServerEvent('mdt:server:openMDT') + TriggerServerEvent('mdt:requestOfficerData') end else QBCore.Functions.Notify("Can't do that!", "error") @@ -1030,3 +1031,17 @@ RegisterNetEvent('ps-mdt:client:selfregister', function() end) end end) + +--==================================================================================== +------------------------------------------ +-- STAFF LOGS PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNetEvent("mdt:receiveOfficerData") +AddEventHandler("mdt:receiveOfficerData", function(officerData) + SendNUIMessage({ + action = "updateOfficerData", + data = officerData + }) +end) \ No newline at end of file diff --git a/server/main.lua b/server/main.lua index c652f621..d79bfd11 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1710,6 +1710,30 @@ RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine) Player.Functions.RemoveMoney('bank', fine, 'lspd-fine') end) +function getTopOfficers(callback) + local result = {} + local query = 'SELECT * FROM mdt_clocking ORDER BY total_time DESC LIMIT 10' + MySQL.Async.fetchAll(query, {}, function(officers) + for k, officer in ipairs(officers) do + table.insert(result, { + rank = k, + name = officer.firstname .. " " .. officer.lastname, + callsign = officer.user_id, + totalTime = format_time(officer.total_time) + }) + end + callback(result) + end) +end + +RegisterServerEvent("mdt:requestOfficerData") +AddEventHandler("mdt:requestOfficerData", function() + local src = source + getTopOfficers(function(officerData) + TriggerClientEvent("mdt:receiveOfficerData", src, officerData) + end) +end) + function sendToDiscord(color, name, message, footer) local embed = { { @@ -1723,7 +1747,7 @@ function sendToDiscord(color, name, message, footer) } PerformHttpRequest(Config.ClockinWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) - end +end function format_time(time) local hours = math.floor(time / 3600) diff --git a/ui/app.js b/ui/app.js index 9a174a4b..881a46c8 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5553,6 +5553,29 @@ function searchProfilesResults(result) { $(".profile-items").html(profileHTML); } +window.addEventListener('message', (event) => { + if (event.data.action === 'updateOfficerData') { + updateOfficerData(event.data.data); + } +}); + +function updateOfficerData(officerData) { + const leaderboardBox = document.querySelector('.leaderboard-box'); + leaderboardBox.innerHTML = ''; + + officerData.forEach((officer, index) => { + const position = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th'][index]; + const officerDiv = document.createElement('div'); + officerDiv.className = 'leaderboard-box-test'; + officerDiv.style.fontSize = '1.3vh'; + officerDiv.style.fontWeight = 'lighter'; + officerDiv.style.color = index < 3 ? 'white' : 'grey'; + + officerDiv.innerHTML = `► ${position}: ${officer.name} (${officer.callsign})${officer.totalTime}`; + leaderboardBox.appendChild(officerDiv); + }); +} + window.addEventListener("load", function () { document .getElementById("offenses-search") diff --git a/ui/dashboard.html b/ui/dashboard.html index 30ce2f77..c3d8e4b6 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -866,18 +866,8 @@
                -
                Activity Leaderboard
                +
                Officers Activity
                -
                ► 1st: XYZ (CALLSIGN) 00:00:00
                -
                ► 2nd: XYZ (CALLSIGN) 00:00:00
                -
                ► 3rd: XYZ (CALLSIGN) 00:00:00
                -
                ► 4th: XYZ (CALLSIGN) 00:00:00
                -
                ► 5th: XYZ (CALLSIGN) 00:00:00
                -
                ► 6th: XYZ (CALLSIGN) 00:00:00
                -
                ► 7th: XYZ (CALLSIGN) 00:00:00
                -
                ► 8th: XYZ (CALLSIGN) 00:00:00
                -
                ► 9th: XYZ (CALLSIGN) 00:00:00
                -
                ► 10th: XYZ (CALLSIGN) 00:00:00
                From fff6db691e6525839c8a2bbe03c55e4141ea0d08 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:16:07 -0400 Subject: [PATCH 197/381] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4843957b..44453a6c 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ https://user-images.githubusercontent.com/82112471/226150422-0c4776f0-0927-4b07- # Clock In/Out & Leaderboard * Triggers when officers Toggle Duty from inside the mdt. ![image](https://user-images.githubusercontent.com/82112471/228130546-6366ed1e-f5a8-428c-8680-0c384d2cff52.png) +![image](https://user-images.githubusercontent.com/82112471/228330602-1a914461-5d61-4e12-80d4-154c8da3dee1.png) + # Jailing & Community Service * If you're getting kicked for attempted exploit abuse when jailing. Located the follow event below on qb-policejob > server > main.lua From 109ae09362aa0c6d641880bf9713b626fd9090b3 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:16:25 -0400 Subject: [PATCH 198/381] Update fxmanifest.lua --- fxmanifest.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 91abf0ac..69294f48 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.6' +version '2.3.7' lua54 'yes' @@ -29,4 +29,4 @@ files { 'ui/dashboard.html', 'ui/app.js', 'ui/style.css', -} \ No newline at end of file +} From 7bd8d08362ca6ac57e1ec35c89b95903d6513729 Mon Sep 17 00:00:00 2001 From: Rian Date: Tue, 28 Mar 2023 20:46:43 +0200 Subject: [PATCH 199/381] Added SOPs Page --- client/main.lua | 4 ++-- shared/config.lua | 13 +++++++++++++ ui/app.js | 5 +++++ ui/dashboard.html | 49 +++++++++++++++++++++++++++++++++++++++++++++++ ui/style.css | 30 +++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index deee09f7..96866400 100644 --- a/client/main.lua +++ b/client/main.lua @@ -144,14 +144,14 @@ end local function EnableGUI(enable) SetNuiFocus(enable, enable) - SendNUIMessage({ type = "show", enable = enable, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name] }) + SendNUIMessage({ type = "show", enable = enable, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name], sopLink = Config.sopLink[PlayerData.job.name] }) isOpen = enable doAnimation() end local function RefreshGUI() SetNuiFocus(false, false) - SendNUIMessage({ type = "show", enable = false, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name] }) + SendNUIMessage({ type = "show", enable = false, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name], sopLink = Config.sopLink[PlayerData.job.name] }) isOpen = false end diff --git a/shared/config.lua b/shared/config.lua index 887873c5..ac7e6697 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -27,6 +27,19 @@ Config.InventoryForWeaponsImages = "lj-inventory" -- "LegacyFuel", "lj-fuel" Config.Fuel = "lj-fuel" +-- Google Docs Link +Config.sopLink = { + ['police'] = '', + ['ambulance'] = '', + ['bcso'] = '', + ['doj'] = '', + ['sast'] = '', + ['sasp'] = '', + ['doc'] = '', + ['lssd'] = '', + ['sapr'] = '', +} + -- Google Docs Link Config.RosterLink = { ['police'] = '', diff --git a/ui/app.js b/ui/app.js index 881a46c8..ad386576 100644 --- a/ui/app.js +++ b/ui/app.js @@ -23,6 +23,8 @@ var LastName = ""; var DispatchNum = 0; var playerJob = ""; let rosterLink = ""; +let sopLink = ""; + //Set this to false if you don't want to show the send to community service button on the incidents page const canSendToCommunityService = true @@ -3957,6 +3959,7 @@ $(document).ready(() => { "Officers Involved" ); $(".roster-iframe").attr("src", rosterLink); + $(".sop-iframe").attr("src", sopLink); $(".manage-profile-save").css("display", "block"); $(".manage-profile-editing-title").css("display", "block"); @@ -4045,6 +4048,7 @@ $(document).ready(() => { $(".manage-profile-name-input-2").attr("readonly", false); $("#home-warrants-container").css("height", "98%"); $(".roster-iframe").attr("src", rosterLink); + $(".sop-iframe").attr("src", sopLink); $(".manage-profile-save").css("display", "none"); $(".manage-profile-editing-title").css("display", "none"); @@ -4070,6 +4074,7 @@ $(document).ready(() => { if (eventData.type == "show") { if (eventData.enable == true) { rosterLink = eventData.rosterLink; + sopLink = eventData.sopLink; playerJob = eventData.job; JobColors(playerJob); $(".quote-span").html(randomizeQuote()); diff --git a/ui/dashboard.html b/ui/dashboard.html index c3d8e4b6..bcbb24e2 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -132,6 +132,7 @@ + @@ -165,6 +166,7 @@ + @@ -258,6 +260,7 @@ + @@ -377,6 +380,7 @@ + @@ -482,6 +486,7 @@ + @@ -577,6 +582,7 @@ + @@ -671,6 +677,7 @@ + @@ -681,6 +688,43 @@ +
                +
                + +
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                +
                +
                +
                Loading...
                +
                00:00
                +
                +
                +
                Welcome, Loading... +
                +
                +
                +
                +
                + +
                + +
                +
                +
                @@ -707,6 +751,7 @@ + @@ -788,6 +833,7 @@ + @@ -856,6 +902,7 @@ + @@ -898,6 +945,7 @@ + @@ -970,6 +1018,7 @@ + diff --git a/ui/style.css b/ui/style.css index 274175ff..ee0cc7e4 100644 --- a/ui/style.css +++ b/ui/style.css @@ -103,6 +103,17 @@ input::-webkit-inner-spin-button { display: none; } +.sop-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + .dmv-page-container { background-color: var(--color-9); border-radius: 15px; @@ -1922,6 +1933,25 @@ span.tag-input[contenteditable]:empty::before { outline: none; } +.sop-embed { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 96.5%; + width: 85%; + margin: auto; + overflow: hidden; +} + +.sop-embed iframe { + height: 96.5%; + width: 98%; + margin: auto; + border: none; + outline: none; +} + .incidents-container { background-color: var(--color-1); border: 2px solid var(--color-3); From 0a82076483ea5f9c7fb49c73a3ba6b615dd419f0 Mon Sep 17 00:00:00 2001 From: Rian Date: Tue, 28 Mar 2023 20:48:43 +0200 Subject: [PATCH 200/381] Fixed Config Spacing (OCD) lul --- shared/config.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/shared/config.lua b/shared/config.lua index ac7e6697..fd2eb0d1 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -14,7 +14,6 @@ Config.Webhook = '' -- Command /mdtleaderboard, will display top players per clock-in hours. Config.ClockinWebhook = '' - -- If set to true = Fine gets automatically removed from bank automatically charging the player. -- If set to false = The fine gets sent as an Invoice to their phone and it us to the player to pay for it, can remain unpaid and ignored. Config.BillVariation = true From 945f35ffa8fe779731047b8d7603d9cfd4afaf4c Mon Sep 17 00:00:00 2001 From: Rian Date: Tue, 28 Mar 2023 20:50:04 +0200 Subject: [PATCH 201/381] Fixed iFrame --- ui/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/app.js b/ui/app.js index ad386576..29219b37 100644 --- a/ui/app.js +++ b/ui/app.js @@ -4023,6 +4023,7 @@ $(document).ready(() => { $(".manage-profile-name-input-1").attr("readonly", true); $(".manage-profile-name-input-2").attr("readonly", true); $(".roster-iframe").attr("src", rosterLink); + $(".sop-iframe").attr("src", sopLink); $(".manage-profile-save").css("display", "block"); $(".manage-profile-editing-title").css("display", "block"); From e5402540065f2cc85dadb3e4536f9bca26115a20 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Tue, 28 Mar 2023 22:01:15 +0200 Subject: [PATCH 202/381] fixed issue --- server/main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/main.lua b/server/main.lua index d79bfd11..cc12141d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -92,7 +92,7 @@ AddEventHandler('playerDropped', function(reason) local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { ['@user_id'] = PlayerData.citizenid }) - local res = tostring(result) + local res = tonumber(result) local time_formatted = format_time(res) sendToDiscord(16753920, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Disconnected - Auto Clocked Out**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") @@ -177,7 +177,7 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { ['@user_id'] = PlayerData.citizenid }) - local res = tostring(result) + local res = tonumber(result) local time_formatted = format_time(res) sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") @@ -1754,4 +1754,4 @@ function format_time(time) local minutes = math.floor((time % 3600) / 60) local seconds = time % 60 return string.format('%02d:%02d:%02d', hours, minutes, seconds) -end \ No newline at end of file +end From ad57ed61005d0485a6f8e727b718d1768f8b9421 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 21:28:43 -0400 Subject: [PATCH 203/381] Fixed nil value on local time and pushed fix for nil check --- server/main.lua | 53 ++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/server/main.lua b/server/main.lua index d79bfd11..ddbf0a25 100644 --- a/server/main.lua +++ b/server/main.lua @@ -85,18 +85,18 @@ AddEventHandler('playerDropped', function(reason) -- Auto clock out if the player is off duty if PlayerData.job.onduty then - MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { - ['@user_id'] = PlayerData.citizenid - }) - - local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { - ['@user_id'] = PlayerData.citizenid - }) - local res = tostring(result) - local time_formatted = format_time(res) - - sendToDiscord(16753920, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Disconnected - Auto Clocked Out**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") - end + MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + if result then + local time_formatted = format_time(tonumber(result)) + sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") + end + end -- Delete player from the MDT on logout if PlayerData ~= nil then @@ -159,8 +159,8 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) if PlayerData.job.onduty then - TriggerClientEvent('QBCore:Notify', source, "You're clocked-in", 'success') - MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, firstname, lastname, clock_in_time) VALUES (:user_id, :firstname, :lastname, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, firstname = :firstname, lastname = :lastname, clock_in_time = :clock_in_time', { + TriggerClientEvent('QBCore:Notify', source, "You're clocked-in", 'success') + MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, firstname, lastname, clock_in_time) VALUES (:user_id, :firstname, :lastname, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, firstname = :firstname, lastname = :lastname, clock_in_time = :clock_in_time', { user_id = PlayerData.citizenid, firstname = firstName, lastname = lastName, @@ -168,20 +168,19 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() }, function() end) sendToDiscord(65280, "MDT Clock-In", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **On Duty**', "ps-mdt | Made by Project Sloth") - else - TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') - MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { - ['@user_id'] = PlayerData.citizenid - }) - - local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { - ['@user_id'] = PlayerData.citizenid - }) - local res = tostring(result) - local time_formatted = format_time(res) - + else + TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') + MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + local time_formatted = format_time(tonumber(result)) + sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") - end + end end) RegisterNetEvent('mdt:server:openMDT', function() From 216336fe94dbf172ca1fd4144447a8283bd3f642 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Mar 2023 21:29:46 -0400 Subject: [PATCH 204/381] Revert "Fixed nil value on local time and pushed fix for nil check" This reverts commit ad57ed61005d0485a6f8e727b718d1768f8b9421. --- server/main.lua | 53 +++++++++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/server/main.lua b/server/main.lua index ddbf0a25..d79bfd11 100644 --- a/server/main.lua +++ b/server/main.lua @@ -85,18 +85,18 @@ AddEventHandler('playerDropped', function(reason) -- Auto clock out if the player is off duty if PlayerData.job.onduty then - MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { - ['@user_id'] = PlayerData.citizenid - }) - - local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { - ['@user_id'] = PlayerData.citizenid - }) - if result then - local time_formatted = format_time(tonumber(result)) - sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") - end - end + MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + local res = tostring(result) + local time_formatted = format_time(res) + + sendToDiscord(16753920, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Disconnected - Auto Clocked Out**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") + end -- Delete player from the MDT on logout if PlayerData ~= nil then @@ -159,8 +159,8 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) if PlayerData.job.onduty then - TriggerClientEvent('QBCore:Notify', source, "You're clocked-in", 'success') - MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, firstname, lastname, clock_in_time) VALUES (:user_id, :firstname, :lastname, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, firstname = :firstname, lastname = :lastname, clock_in_time = :clock_in_time', { + TriggerClientEvent('QBCore:Notify', source, "You're clocked-in", 'success') + MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, firstname, lastname, clock_in_time) VALUES (:user_id, :firstname, :lastname, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, firstname = :firstname, lastname = :lastname, clock_in_time = :clock_in_time', { user_id = PlayerData.citizenid, firstname = firstName, lastname = lastName, @@ -168,19 +168,20 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() }, function() end) sendToDiscord(65280, "MDT Clock-In", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **On Duty**', "ps-mdt | Made by Project Sloth") - else - TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') - MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { - ['@user_id'] = PlayerData.citizenid - }) - - local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { - ['@user_id'] = PlayerData.citizenid - }) - local time_formatted = format_time(tonumber(result)) - + else + TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') + MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + local res = tostring(result) + local time_formatted = format_time(res) + sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") - end + end end) RegisterNetEvent('mdt:server:openMDT', function() From 924aa32c136bbeed20570055f7861b0889d39f97 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 29 Mar 2023 09:04:26 -0400 Subject: [PATCH 205/381] Fixed nil value on local time and pushed fix for nil check --- server/main.lua | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/server/main.lua b/server/main.lua index cc12141d..2db700f8 100644 --- a/server/main.lua +++ b/server/main.lua @@ -84,19 +84,19 @@ AddEventHandler('playerDropped', function(reason) local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) -- Auto clock out if the player is off duty - if PlayerData.job.onduty then - MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { - ['@user_id'] = PlayerData.citizenid - }) - - local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { - ['@user_id'] = PlayerData.citizenid - }) - local res = tonumber(result) - local time_formatted = format_time(res) - - sendToDiscord(16753920, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Disconnected - Auto Clocked Out**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") - end + if PlayerData.PlayerData.job.onduty then + MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.PlayerData.citizenid + }) + if result then + local time_formatted = format_time(tonumber(result)) + sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") + end + end -- Delete player from the MDT on logout if PlayerData ~= nil then @@ -160,7 +160,7 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() if PlayerData.job.onduty then TriggerClientEvent('QBCore:Notify', source, "You're clocked-in", 'success') - MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, firstname, lastname, clock_in_time) VALUES (:user_id, :firstname, :lastname, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, firstname = :firstname, lastname = :lastname, clock_in_time = :clock_in_time', { + MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, firstname, lastname, clock_in_time) VALUES (:user_id, :firstname, :lastname, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, firstname = :firstname, lastname = :lastname, clock_in_time = :clock_in_time', { user_id = PlayerData.citizenid, firstname = firstName, lastname = lastName, @@ -169,16 +169,15 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() end) sendToDiscord(65280, "MDT Clock-In", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **On Duty**', "ps-mdt | Made by Project Sloth") else - TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') - MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { - ['@user_id'] = PlayerData.citizenid - }) - - local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { - ['@user_id'] = PlayerData.citizenid - }) - local res = tonumber(result) - local time_formatted = format_time(res) + TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') + MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + local time_formatted = format_time(tonumber(result)) sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") end From 88a9d76158284544670e44671c427e88bb134d0a Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 29 Mar 2023 09:05:27 -0400 Subject: [PATCH 206/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 69294f48..2c12d4d1 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.7' +version '2.3.8' lua54 'yes' From fe0b72e140476617d6b061e8be54e495fcc204b6 Mon Sep 17 00:00:00 2001 From: Rian <74205343+complexza@users.noreply.github.com> Date: Wed, 29 Mar 2023 17:05:45 +0200 Subject: [PATCH 207/381] Added Explanation for Roster / SOPs Setup. --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index 44453a6c..acf9bfa4 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,39 @@ https://youtu.be/w9PAVc3ER_c ![image](https://i.imgur.com/6maboG3.png) ![image](https://i.imgur.com/DkhQxDq.png) +# Roster and SOPs Setup + +* You need a Google Document / Sheet link that is viewable. + +Paste the link you got in the config here: +``` +-- 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'] = '', +} +``` + # Preview ![image](https://user-images.githubusercontent.com/82112471/217596976-5147fefa-24e2-4b98-b167-4e151b8a9a8c.png) ![image](https://user-images.githubusercontent.com/82112471/217597024-2c1493fc-4439-4b56-abbd-f9149e987b9e.png) From 285f977f29f95ec1bfc526962f1e25db8b31d49e Mon Sep 17 00:00:00 2001 From: Rian Date: Wed, 29 Mar 2023 17:37:41 +0200 Subject: [PATCH 208/381] Fixed PlayerData Error --- server/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/main.lua b/server/main.lua index 2db700f8..fd4b034e 100644 --- a/server/main.lua +++ b/server/main.lua @@ -84,17 +84,17 @@ AddEventHandler('playerDropped', function(reason) local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) -- Auto clock out if the player is off duty - if PlayerData.PlayerData.job.onduty then + if PlayerData.job.onduty then MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { - ['@user_id'] = PlayerData.PlayerData.citizenid + ['@user_id'] = PlayerData.citizenid }) local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { - ['@user_id'] = PlayerData.PlayerData.citizenid + ['@user_id'] = PlayerData.citizenid }) if result then local time_formatted = format_time(tonumber(result)) - sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") + sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") end end From 1731a8a510b388d535e76086348af0aa32324f45 Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Wed, 29 Mar 2023 23:27:49 +0200 Subject: [PATCH 209/381] Update config.lua --- shared/config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index fd2eb0d1..22edd210 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -23,8 +23,8 @@ Config.BillVariation = true -- However, if you're using a different inventory system, please refer to the "Inventory Edit | Automatic Add Weapons with images" section in ps-mdt's README. Config.InventoryForWeaponsImages = "lj-inventory" --- "LegacyFuel", "lj-fuel" -Config.Fuel = "lj-fuel" +-- "LegacyFuel", "lj-fuel", "ps-fuel" +Config.Fuel = "ps-fuel" -- Google Docs Link Config.sopLink = { From e29076b8596ce8d95959e2842973411ffbc29533 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 29 Mar 2023 17:48:57 -0400 Subject: [PATCH 210/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 2c12d4d1..6b39bd1f 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.8' +version '2.3.9' lua54 'yes' From 752c47cb6058b206e66f60e5c0686b274b5b55b4 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 30 Mar 2023 00:18:44 +0200 Subject: [PATCH 211/381] Added versionchecker Thanks for the ox_lib's format --- server/versioncheck.lua | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 server/versioncheck.lua diff --git a/server/versioncheck.lua b/server/versioncheck.lua new file mode 100644 index 00000000..46c6ebf2 --- /dev/null +++ b/server/versioncheck.lua @@ -0,0 +1,41 @@ +function versionCheck(repository) + local resource = GetInvokingResource() or GetCurrentResourceName() + + local currentVersion = GetResourceMetadata(resource, 'version', 0) + + if currentVersion then + currentVersion = currentVersion:match('%d+%.%d+%.%d+') + end + + if not currentVersion then return print(("^1Unable to determine current resource version for '%s' ^0"):format(resource)) end + + SetTimeout(1000, function() + PerformHttpRequest(('https://api.github.com/repos/%s/releases/latest'):format(repository), function(status, response) + if status ~= 200 then return end + + response = json.decode(response) + + if response.prerelease then return end + + local latestVersion = response.tag_name:match('%d+%.%d+%.%d+') + if not latestVersion or latestVersion == currentVersion then return end + + local cv = { string.strsplit('.', currentVersion) } + local lv = { string.strsplit('.', latestVersion) } + + for i = 1, #cv do + local current, minimum = tonumber(cv[i]), tonumber(lv[i]) + if current ~= minimum then + if current < minimum then + print("^0____________________________________________________________\n") + print(('^6Your %s is outdated (your version: %s)\r\nMake sure to update: %s^0'):format(resource, currentVersion, response.html_url)) + print('^2'..response.body) + print("^0____________________________________________________________\n") + else break end + end + end + end, 'GET') + end) +end + +versionCheck('Project-Sloth/ps-mdt') From cb34adf1da09d22244ad63b433537dc5e0b2f1a8 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 30 Mar 2023 00:19:44 +0200 Subject: [PATCH 212/381] Update fxmanifest.lua --- fxmanifest.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 6b39bd1f..69cb7d7d 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -13,7 +13,8 @@ server_scripts { '@oxmysql/lib/MySQL.lua', 'server/utils.lua', 'server/dbm.lua', - 'server/main.lua' + 'server/main.lua', + 'server/versioncheck.lua' } client_scripts{ 'client/main.lua', From 0dd1c74af7012a21ce6141d996dee581b402284b Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 30 Mar 2023 00:52:23 +0200 Subject: [PATCH 213/381] Update versioncheck.lua --- server/versioncheck.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/versioncheck.lua b/server/versioncheck.lua index 46c6ebf2..18c2be6f 100644 --- a/server/versioncheck.lua +++ b/server/versioncheck.lua @@ -27,10 +27,13 @@ function versionCheck(repository) local current, minimum = tonumber(cv[i]), tonumber(lv[i]) if current ~= minimum then if current < minimum then - print("^0____________________________________________________________\n") + print("^0.-------------------------------------------------------------.") + print(" ___ ____ ____ _ ____ ____ ___ ____ _ ____ ___ _ _") + print(" |--' |--< [__] ___| |=== |___ | ==== |___ [__] | |--|") + print("^0'-------------------------------------------------------------'") print(('^6Your %s is outdated (your version: %s)\r\nMake sure to update: %s^0'):format(resource, currentVersion, response.html_url)) print('^2'..response.body) - print("^0____________________________________________________________\n") + else break end end end From 0cbad806c34c9f4bf6ab1507dd430caa4cbce9bd Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 30 Mar 2023 01:04:16 +0200 Subject: [PATCH 214/381] sorry monkey i llike this better --- server/versioncheck.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/versioncheck.lua b/server/versioncheck.lua index 18c2be6f..601b57da 100644 --- a/server/versioncheck.lua +++ b/server/versioncheck.lua @@ -29,10 +29,10 @@ function versionCheck(repository) if current < minimum then print("^0.-------------------------------------------------------------.") print(" ___ ____ ____ _ ____ ____ ___ ____ _ ____ ___ _ _") - print(" |--' |--< [__] ___| |=== |___ | ==== |___ [__] | |--|") - print("^0'-------------------------------------------------------------'") + print(" |--' |--< [__] ___| |=== |___ | ==== |___ [__] | |--|\n") print(('^6Your %s is outdated (your version: %s)\r\nMake sure to update: %s^0'):format(resource, currentVersion, response.html_url)) print('^2'..response.body) + print("^0'-------------------------------------------------------------'") else break end end From 5a81eabc899601877c6e7c1f9e2275ef478707a8 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 30 Mar 2023 01:07:20 +0200 Subject: [PATCH 215/381] monkey didnt like --- server/versioncheck.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/versioncheck.lua b/server/versioncheck.lua index 601b57da..ae5e5a65 100644 --- a/server/versioncheck.lua +++ b/server/versioncheck.lua @@ -27,13 +27,11 @@ function versionCheck(repository) local current, minimum = tonumber(cv[i]), tonumber(lv[i]) if current ~= minimum then if current < minimum then - print("^0.-------------------------------------------------------------.") - print(" ___ ____ ____ _ ____ ____ ___ ____ _ ____ ___ _ _") - print(" |--' |--< [__] ___| |=== |___ | ==== |___ [__] | |--|\n") + print("^0.-----------------------------------------------.") + print("^0| Project Sloth |") + print("^0'-----------------------------------------------'") print(('^6Your %s is outdated (your version: %s)\r\nMake sure to update: %s^0'):format(resource, currentVersion, response.html_url)) - print('^2'..response.body) - print("^0'-------------------------------------------------------------'") - + print('^2'..response.body) else break end end end From 01caed5b4656e78b202bdf63c004c23c4eabfc24 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 30 Mar 2023 01:23:19 +0200 Subject: [PATCH 216/381] removed big indent --- server/versioncheck.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/versioncheck.lua b/server/versioncheck.lua index ae5e5a65..dc93e25b 100644 --- a/server/versioncheck.lua +++ b/server/versioncheck.lua @@ -27,11 +27,14 @@ function versionCheck(repository) local current, minimum = tonumber(cv[i]), tonumber(lv[i]) if current ~= minimum then if current < minimum then + print("^0.-----------------------------------------------.") - print("^0| Project Sloth |") + print("^0| Project Sloth |") print("^0'-----------------------------------------------'") print(('^6Your %s is outdated (your version: %s)\r\nMake sure to update: %s^0'):format(resource, currentVersion, response.html_url)) - print('^2'..response.body) + print('^2'..response.body:gsub("\r\n\r\n\r", "")) + + else break end end end From 6749175f69108a707eb00554d12cfe54ddacce81 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 30 Mar 2023 01:24:22 +0200 Subject: [PATCH 217/381] Update versioncheck.lua --- server/versioncheck.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/versioncheck.lua b/server/versioncheck.lua index dc93e25b..daf15428 100644 --- a/server/versioncheck.lua +++ b/server/versioncheck.lua @@ -32,7 +32,7 @@ function versionCheck(repository) print("^0| Project Sloth |") print("^0'-----------------------------------------------'") print(('^6Your %s is outdated (your version: %s)\r\nMake sure to update: %s^0'):format(resource, currentVersion, response.html_url)) - print('^2'..response.body:gsub("\r\n\r\n\r", "")) + print('^2'..response.body:gsub("\r\n\r\n\r", "^0")) else break end From 22dbdb7ed788867a244432a6875a13080c71e08c Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 30 Mar 2023 02:33:24 +0200 Subject: [PATCH 218/381] made it a local function --- server/versioncheck.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/versioncheck.lua b/server/versioncheck.lua index daf15428..3d933946 100644 --- a/server/versioncheck.lua +++ b/server/versioncheck.lua @@ -1,4 +1,4 @@ -function versionCheck(repository) +local function versionCheck(repository) local resource = GetInvokingResource() or GetCurrentResourceName() local currentVersion = GetResourceMetadata(resource, 'version', 0) From 1e8f1a525b6a88c71562d62a5ffb9e29fcbf44f6 Mon Sep 17 00:00:00 2001 From: Rian <74205343+complexza@users.noreply.github.com> Date: Thu, 30 Mar 2023 20:39:19 +0200 Subject: [PATCH 219/381] Added Instructions for CQC Mugshot. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index acf9bfa4..82f62cfa 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,22 @@ https://user-images.githubusercontent.com/82112471/226150422-0c4776f0-0927-4b07- # Automatic Mugshot Pictures ![image](https://user-images.githubusercontent.com/82112471/226207146-086c5508-7e6f-4345-a157-3ec2fd588138.png) +## Setup for Automatic Mugshot +* Set Config.UseCQCMugshot to true, It is true by default. (Line 5 in Config.lua) +```lua +Config.UseCQCMugshot = true +``` +* Choose what photos you want by changing this: (Line 8 in Config.lua) +```lua +-- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. +Config.MugPhotos = 1 +``` +* Create a Discord Webhook and paste it here: (Line 11 in Config.lua) +```lua +-- Images for mug shots will be uploaded here. Add a Discord webhook. +Config.Webhook = '' +``` + # Clock In/Out & Leaderboard * Triggers when officers Toggle Duty from inside the mdt. ![image](https://user-images.githubusercontent.com/82112471/228130546-6366ed1e-f5a8-428c-8680-0c384d2cff52.png) From 16034817625ac393f3850ba5008d87f4824b425e Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 8 Apr 2023 17:46:28 -0400 Subject: [PATCH 220/381] Added rich text editors in textarea's (#275) (#280) * added CDNs for MD * added MD to textarea's Added richtext editor for the textareas of: BOLOs, ICU reports, Indicent Reports and Reports * kept latest format! * Proper format for incident --------- Co-authored-by: Lenzh --- ui/app.js | 116 +++++++++++++++++++++++++++++++++++++++------- ui/dashboard.html | 9 ++++ 2 files changed, 109 insertions(+), 16 deletions(-) diff --git a/ui/app.js b/ui/app.js index 29219b37..6eb2ee78 100644 --- a/ui/app.js +++ b/ui/app.js @@ -589,9 +589,7 @@ $(document).ready(() => { // Title, information, tags, officers involved, civs involved, evidence const title = $("#manage-incidents-title-input").val(); - const information = $( - ".manage-incidents-reports-content" - ).val(); + const information = $(".manage-incidents-reports-content").val(); const dbid = $(".manage-incidents-editing-title").data("id"); let tags = new Array(); @@ -746,12 +744,26 @@ $(document).ready(() => { "click", ".manage-incidents-create", function () { - let tempalte = - "📝 Summary:\n\n[Insert Report Summary Here]\n\n🧍 Hostage: [Name Here]\n\n🔪 Weapons/Items Confiscated:\n\n· [Insert List Here]\n\n-----\n💸 Fine:\n⌚ Sentence:\n-----"; + let template = '

                📝 Summary:

                [Insert Report Summary Here]

                 

                🧍 Hostage: [Name Here]

                 

                🔪 Weapons/Items Confiscated:

                · [Insert List Here]

                 

                -----

                💸 Fine:

                 

                ⌚ Sentence:

                -----

                '; $("#manage-incidents-title-input").val( "Name - Charge - " + $(".date").html() ); - $(".manage-incidents-reports-content").val(tempalte); + $(".manage-incidents-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-incidents-reports-content").trumbowyg('html', template); $(".manage-incidents-tags-holder").empty(); $(".manage-incidents-officers-holder").empty(); @@ -1305,9 +1317,7 @@ $(document).ready(() => { //} else { var template = ""; if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - template = - "ICU Room #: [ # ]\n\nReport ID: [ Report ID ]\n\nTime Admitted: [ Date and Time Here ]\n\nSurgery: [Yes/No]\n\nInjuries/Ailments:\n - [ Enter List Of Injuries Here ]\n\n\nAdditional Attending:\n - [ List Any Other Staff Here ]\n\n\n🧑‍🤝‍🧑 Additional Emergency Contacts:\n - [ Name And Number ]\n\n\nNotes:\n[Additional Notes Here]"; - } + template = '

                📝 ICU Room #: [ # ]

                Report ID: [ Report ID ]


                🧍Time Admitted: [ Date and Time Here ] 

                Surgery: [Yes/No]

                Injuries/Ailments:

                · [Enter List Of Injuries Here]

                 

                -----

                Additional Attending:

                · [ List Any Other Staff Here ]

                🧑‍🤝‍🧑 Additional Emergency Contacts:

                · [ Name And Number ]

                Notes:

                · [Additional Notes Here]

                -----

                '} $(".manage-bolos-editing-title").html( "You are currently creating a new BOLO" ); @@ -1315,7 +1325,22 @@ $(document).ready(() => { $(".manage-bolos-input-plate").val(""); $(".manage-bolos-input-owner").val(""); $(".manage-bolos-input-individual").val(""); - $(".manage-bolos-reports-content").val(template); + $(".manage-bolos-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-bolos-reports-content").trumbowyg('html', template); $(".manage-bolos-tags-holder").empty(); $(".bolo-gallery-inner-container").empty(); $(".manage-officers-tags-holder").empty(); @@ -2354,14 +2379,28 @@ $(document).ready(() => { let template = ""; if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { template = - "Submitted to ICU?: [Yes/No]\n\nIncident Report:\n[ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]\n\n\nList of Injuries:\n- [ State what injury or injuries occurred ]\n\n\n💉 Surgical Report:\n[ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]\n\n\nAttending:\n- [ List Any Attending Here ]\n\n\nMedications Applied:\n- [ List Any Attending Here ]\n\n\nNotes:\n[ Additional Notes Here ]"; - } + "

                Submitted to ICU?: [Yes/No]

                Incident Report:

                · [ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]

                List of Injuries:

                · [ State what injury or injuries occurred ]

                Surgical Report:

                · [ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]

                -----

                Attending:

                · [ List Any Attending Here ]

                Medications Applied:

                · [ List Any Attending Here ]

                -----



                Notes:

                [ Additional Notes Here ]

                "} $(".manage-reports-editing-title").html( "You are currently creating a new report" ); $(".manage-reports-input-title").val(""); $(".manage-reports-input-type").val(""); - $(".manage-reports-reports-content").val(template); + $(".manage-reports-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-reports-reports-content").trumbowyg('html', template); $(".manage-reports-tags-holder").empty(); $(".reports-gallery-inner-container").empty(); $(".reports-officers-tags-holder").empty(); @@ -4701,7 +4740,22 @@ $(document).ready(() => { $("#manage-incidents-title-input").val(table["title"]); - $(".manage-incidents-reports-content").val(table["details"]); + $(".manage-incidents-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-incidents-reports-content").trumbowyg('html', table["details"]); $(".manage-incidents-tags-holder").empty(); $.each(table["tags"], function (index, value) { @@ -4872,7 +4926,22 @@ $(document).ready(() => { $(".manage-bolos-input-owner").val(table["owner"]); $(".manage-bolos-input-individual").val(table["individual"]); - $(".manage-bolos-reports-content").val(table["detail"]); + $(".manage-bolos-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-bolos-reports-content").trumbowyg('html', table["detail"]); $(".manage-bolos-tags-holder").empty(); $.each(table["tags"], function (index, value) { @@ -5012,7 +5081,22 @@ $(document).ready(() => { $(".manage-reports-input-title").val(table["title"]); $(".manage-reports-input-type").val(table["type"]); - $(".manage-reports-reports-content").val(table["details"]); + $(".manage-reports-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-reports-reports-content").trumbowyg('html', table["details"]); $(".manage-reports-tags-holder").empty(); $.each(table["tags"], function (index, value) { diff --git a/ui/dashboard.html b/ui/dashboard.html index bcbb24e2..60ffb561 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -14,6 +14,15 @@ + + + + + + + + + From e5c8bf131b6ec7f148a812f5b7504fa2ec807f63 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 9 Apr 2023 00:01:25 +0200 Subject: [PATCH 221/381] Implementation of Traffic Stop Alert via Radialmenu (#267) * Implementation of Traffic Stop Alert via Radialmenu - Grabs the Front Plate and Vehicle Name when Plate Reader is active. - Sends a Traffic Stop Alert to all Cops - added cooldown for Alert - changed Readme * Update README.md Update README.md * Updated read me --------- Co-authored-by: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> --- README.md | 36 ++++++++++++++++++++++++- client/main.lua | 72 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82f62cfa..73a20a4f 100644 --- a/README.md +++ b/README.md @@ -136,7 +136,7 @@ Plate reader automatically locks and alerts Police if: This reduces the plate reader events to player's vehicles and doesn't query the database for hundreds of NPC vehicles -**Video Demonstration** +### Video Demonstration https://youtu.be/w9PAVc3ER_c ![image](https://i.imgur.com/KZPMHQX.png) @@ -144,6 +144,40 @@ https://youtu.be/w9PAVc3ER_c ![image](https://i.imgur.com/6maboG3.png) ![image](https://i.imgur.com/DkhQxDq.png) +### Traffic Stop Radialmenu Alert + +* When initiating a traffic stop allows you to notify your fellow officers of your location and provide details about the current location and stopped vehicle through the radial menu. + + +1. Add the following code right above `function READER:Main()` on `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) +``` + +2. Add the following into `cl_plate_reader.lua` after `local veh = UTIL:GetVehicleInDirection( PLY.veh, start, offset )` on the function `function READER:Main()` +``` + if i == 1 then + Vehicle = veh + end +``` + +* Should look like this after completing the above steps. +![image](https://i.imgur.com/ryefT3n.png) + +3. Add **ps-mdt:client:trafficStop** into the Radialmenu + +* Preview: +image.png + # Roster and SOPs Setup * You need a Google Document / Sheet link that is viewable. diff --git a/client/main.lua b/client/main.lua index 96866400..f6e86ef6 100644 --- a/client/main.lua +++ b/client/main.lua @@ -10,6 +10,9 @@ local tabletProp = `prop_cs_tablet` local tabletBone = 60309 local tabletOffset = vector3(0.03, 0.002, -0.0) local tabletRot = vector3(10.0, 160.0, 0.0) +local coolDown = false +local lastVeh = nil +local lastPlate = nil CreateThread(function() if GetResourceState('ps-dispatch') == 'started' then @@ -1044,4 +1047,71 @@ AddEventHandler("mdt:receiveOfficerData", function(officerData) action = "updateOfficerData", data = officerData }) -end) \ No newline at end of file +end) + +--==================================================================================== +------------------------------------------ +-- TRAFFIC STOP STUFF -- +------------------------------------------ +--==================================================================================== + +local function vehicleData(vehicle) + local vData = { + name = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))), + } + return vData +end + +function getStreetandZone(coords) + local zone = GetLabelText(GetNameOfZone(coords.x, coords.y, coords.z)) + local currentStreetHash = GetStreetNameAtCoord(coords.x, coords.y, coords.z) + currentStreetName = GetStreetNameFromHashKey(currentStreetHash) + playerStreetsLocation = currentStreetName .. ", " .. zone + return playerStreetsLocation +end + +if Config.UseWolfknightRadar == true then + RegisterNetEvent("ps-mdt:client:trafficStop") + AddEventHandler("ps-mdt:client:trafficStop", function() + local plyData = QBCore.Functions.GetPlayerData() + local currentPos = GetEntityCoords(PlayerPedId()) + local locationInfo = getStreetandZone(currentPos) + if not IsPedInAnyPoliceVehicle(PlayerPedId()) then + QBCore.Functions.Notify("Not in any Police Vehicle!", "error") + return + end + local data, vData, vehicle = exports["wk_wars2x"]:GetFrontPlate(), {} + if not coolDown then + if data.veh ~= nil and data.veh ~= 0 then + lastVeh = data.veh + lastPlate = data.plate + vehicle = vehicleData(data.veh) + exports["ps-dispatch"]:CustomAlert({ + coords = { + x = currentPos.x, + y = currentPos.y, + z = currentPos.z + }, + message = "Ongoing Traffic Stop", + dispatchCode = "10-11", + description = "Ongoing Traffic Stop", + firstStreet = locationInfo, + model = vehicle.name, + plate = lastPlate, + name = plyData.job.grade.name.. ", " ..plyData.charinfo.firstname:sub(1, 1):upper() .. plyData.charinfo.firstname:sub(2) .. " " .. plyData.charinfo.lastname:sub(1, 1):upper() .. plyData.charinfo.lastname:sub(2), + radius = 0, + sprite = 60, + color = 3, + scale = 1.0, + length = 3, + }) + end + coolDown = true + SetTimeout(15000, function() + coolDown = false + end) + else + QBCore.Functions.Notify("Traffic Stop Cooldown active!", "error") + end + end) +end \ No newline at end of file From fc79e39656738d9e1befc25d710942e2734dfc32 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 8 Apr 2023 18:12:33 -0400 Subject: [PATCH 222/381] Update README.md (#281) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73a20a4f..3e5a2e42 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ end exports("GetFrontPlate", GetFrontPlate) 3. Add **ps-mdt:client:trafficStop** into the Radialmenu * Preview: -image.png +![image](https://user-images.githubusercontent.com/82112471/230744641-72480046-966f-4145-a4a3-ad7fd329870c.png) # Roster and SOPs Setup From 213f2738720803b32466cd8a8aaaf313eca3c211 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 8 Apr 2023 18:14:48 -0400 Subject: [PATCH 223/381] 2.4.0.lua (#282) --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 69cb7d7d..182c3c2e 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.3.9' +version '2.4.0' lua54 'yes' From cc9f233b7e1d54b10e87219ee312a5d31ab395b4 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 9 Apr 2023 02:55:27 +0200 Subject: [PATCH 224/381] Smaller Header for more Information Space (#279) * Smaller Header for more Information Space - Smaller Header for more Information Space * Removed not needed CSS Removed not needed CSS * ambulance fix for profile search ambulance fix for profile search --- ui/app.js | 19 ++--- ui/dashboard.html | 172 ++++++++++++++++++++++------------------------ ui/style.css | 112 +++++++++++++----------------- 3 files changed, 143 insertions(+), 160 deletions(-) diff --git a/ui/app.js b/ui/app.js index 6eb2ee78..d6e64bb6 100644 --- a/ui/app.js +++ b/ui/app.js @@ -208,11 +208,16 @@ $(document).ready(() => { $(".manage-profile-name-input-1").val(result["firstname"]); $(".manage-profile-name-input-2").val(result["lastname"]); $(".manage-profile-dob-input").val(result["dob"]); - if (convictions.length >= 1) { + if (AmbulanceJobs[playerJob] !== undefined) { $(".manage-profile-fingerprint-input").val(result["fingerprint"]); } else { - $(".manage-profile-fingerprint-input").val("No Fingerprints found!"); + if (convictions.length >= 1) { + $(".manage-profile-fingerprint-input").val(result["fingerprint"]); + } + else { + $(".manage-profile-fingerprint-input").val("No Fingerprints found!"); + } } $(".manage-profile-phonenumber-input").val(result["phone"]); $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); @@ -432,10 +437,10 @@ $(document).ready(() => { $(".close-all").css("filter", "brightness(15%)"); }); - $(".manage-convictions-container").on("click", "", function () { + $(".convictions-title").on("click", "", function () { if ($(".manage-profile-citizenid-input").val()) { document.addEventListener("mouseup", onMouseDownIncidents); - const source = "manage-convictions-container"; + const source = "convictions-title"; $(".convictions-holder").attr("data-source", source); $(".convictions-known-container").fadeIn(250); // makes the container visible $(".close-all").css("filter", "brightness(15%)"); @@ -444,10 +449,10 @@ $(document).ready(() => { } }); - $(".manage-profile-incidents-container").on("click", "", function () { + $(".profile-incidents-title").on("click", "", function () { if ($(".manage-profile-citizenid-input").val()) { document.addEventListener("mouseup", onMouseDownIncidents); - const source = "manage-profile-incidents-container"; + const source = "profile-incidents-title"; $(".profile-incidents-holder").attr("data-source", source); $(".incidents-known-container").fadeIn(250); // makes the container visible $(".close-all").css("filter", "brightness(15%)"); @@ -4120,8 +4125,6 @@ $(document).ready(() => { $(".quote-span").html(randomizeQuote()); if (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined) { $(".manage-profile-licenses-container").removeClass("display_hidden"); - $(".manage-convictions-container").removeClass("display_hidden"); - $(".manage-profile-incidents-container").removeClass("display_hidden"); $(".manage-profile-vehs-container").removeClass("display_hidden"); $(".manage-profile-houses-container").removeClass("display_hidden"); } diff --git a/ui/dashboard.html b/ui/dashboard.html index 60ffb561..12c95c90 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -118,17 +118,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -153,17 +153,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -247,17 +247,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -352,14 +352,8 @@
                - -
                -
                Show Convictions
                -
                - -
                -
                Show Incidents
                -
                +
                Show Convictions
                +
                Show Incidents
                @@ -367,17 +361,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -425,6 +419,19 @@
                +
                +
                +
                Evidence
                +
                +
                +
                +
                +
                +
                +
                +
                +
                +
                Associated
                Officers Involved
                @@ -443,19 +450,6 @@
                -
                -
                -
                Evidence
                -
                -
                -
                -
                -
                -
                -
                -
                -
                -
                Associated
                Criminals Involved
                @@ -473,17 +467,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -538,15 +532,6 @@
                -
                Officers Involved
                @@ -561,6 +546,15 @@
                +
                @@ -569,17 +563,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -640,6 +634,13 @@
                +
                +
                +
                Officers Involved
                +
                +
                +
                +
                -
                -
                -
                Officers Involved
                -
                -
                -
                -
                @@ -664,17 +658,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -701,17 +695,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -738,17 +732,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -820,17 +814,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -889,17 +883,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -932,17 +926,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                @@ -1005,17 +999,17 @@
                -
                SAN ANDREAS STATE POLICE
                -
                Mobile Database Terminal
                +
                SAN ANDREAS STATE POLICE
                +
                Mobile Database Terminal
                Loading...
                00:00
                -
                Welcome, Loading... +
                Welcome, Loading...
                -
                +
                diff --git a/ui/style.css b/ui/style.css index ee0cc7e4..8a57e7ee 100644 --- a/ui/style.css +++ b/ui/style.css @@ -45,7 +45,9 @@ input::-webkit-inner-spin-button { } .badge-logo { - margin-left: 1vh + margin-left: 1vh; + width: 12vh; + height: 12vh; } .profile-page-container { @@ -160,14 +162,14 @@ input::-webkit-inner-spin-button { } .header { - height: 7vh; + height: 4vh; background-color: var(--color-1); border: 5px solid #393B39; border-top-right-radius: 50px; border-bottom-right-radius: 50px; width: 96.5%; position: absolute; - top: 5.5vh; + top: 4vh; display: flex; align-items: center; user-select: none; @@ -184,17 +186,20 @@ input::-webkit-inner-spin-button { .header-middle { background-color: var(--color-2); border-radius: 15px; + border: 5px solid #393B39; width: fit-content; - height: fit-content; - padding: 10px; + height: 3.5vh; + padding: 8px; padding-left: 20px; padding-right: 20px; display: flex; flex-direction: column; text-align: center; + align-items: normal; color: white; margin: auto; - font-size: 20px; + margin-top: -10px; + font-size: 15px; } .header-right { @@ -209,7 +214,7 @@ input::-webkit-inner-spin-button { .main-container { border-top: 5px solid var(--color-3); width: 100%; - height: 79.5%; + height: 86%; position: absolute; display: flex; bottom: 0; @@ -248,7 +253,7 @@ input::-webkit-inner-spin-button { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -390,7 +395,7 @@ input::-webkit-inner-spin-button { height: 100%; width: 50vh; margin-top: 10px; - margin-bottom: 8px; + margin-bottom: 10px; margin-left: 10px; user-select: none; overflow: hidden; @@ -499,7 +504,7 @@ span.bulletin-item-info[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -879,7 +884,7 @@ a { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -1025,7 +1030,7 @@ a { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -1277,7 +1282,7 @@ a { background-color: var(--color-1); width: 100%; border: 2px solid var(--color-3); - height: 13%; + height: 20%; } .license-title { @@ -1326,7 +1331,7 @@ a { flex-direction: column; background-color: var(--color-1); width: 100%; - height: 18%; + height: 20%; border: 2px solid var(--color-3); margin-top: 5px; min-height: 100px; @@ -1427,7 +1432,7 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - height: 18%; + height: 20%; border: 2px solid var(--color-3); margin-top: 5px; max-height: 150px; @@ -1481,7 +1486,7 @@ span.tag-input[contenteditable]:empty::before { flex-direction: column; background-color: var(--color-1); width: 100%; - height: 18%; + height: 20%; border: 2px solid var(--color-3); margin-top: 5px; max-height: 150px; @@ -1537,7 +1542,7 @@ span.tag-input[contenteditable]:empty::before { width: 100%; border: 2px solid var(--color-3); margin-top: 5px; - height: 17vh; + height: 20%; overflow: scroll; } @@ -1626,18 +1631,9 @@ span.tag-input[contenteditable]:empty::before { user-select: none; } -.manage-convictions-container { - display: flex; - flex-direction: column; +.convictions-title { background-color: var(--color-1); - width: 49%; - height: 5.4%; border: 2px solid var(--color-3); - margin-top: 5px; -} - -.convictions-title { - background-color: var(--color-4); color: white; font-size: 18px; font-weight: bolder; @@ -1647,7 +1643,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-top: 5px; margin-bottom: 0px; - width: 95%; + width: 98%; align-items: center; user-select: none; } @@ -1665,19 +1661,9 @@ span.tag-input[contenteditable]:empty::before { user-select: none; } -.manage-profile-incidents-container { - display: flex; - flex-direction: column; +.profile-incidents-title { background-color: var(--color-1); - width: 50%; - height: 5.4%; border: 2px solid var(--color-3); - margin-top: -9.2%; - margin-left: 50%; -} - -.profile-incidents-title { - background-color: var(--color-4); color: white; font-size: 18px; font-weight: bolder; @@ -1687,7 +1673,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-top: 5px; margin-bottom: 0px; - width: 95%; + width: 98%; align-items: center; user-select: none; } @@ -1957,7 +1943,7 @@ span.tag-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -2099,8 +2085,8 @@ span.tag-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; + height: 80.7vh; + max-height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -2532,7 +2518,7 @@ span.tag-incident-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -3005,7 +2991,7 @@ span.tag-incident-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -3088,8 +3074,8 @@ span.tag-incident-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; + height: 80.7vh; + max-height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -3661,7 +3647,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -3966,8 +3952,8 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; + height: 80.7vh; + max-height: 80.7vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -4539,7 +4525,7 @@ span.tag-reports-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50%; margin-top: 10px; margin-left: 10px; @@ -4630,7 +4616,7 @@ span.tag-reports-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50%; margin-top: 10px; margin-left: 10px; @@ -4998,7 +4984,7 @@ span.tag-reports-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 66%; margin-top: 10px; margin-left: 10px; @@ -5009,7 +4995,7 @@ span.tag-reports-input[contenteditable]:empty::before { .stafflogs-box { display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 100%; margin-top: 2px; margin-left: 1px; @@ -5048,7 +5034,7 @@ span.tag-reports-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 33%; margin-top: 10px; margin-left: 4px; @@ -5059,7 +5045,7 @@ span.tag-reports-input[contenteditable]:empty::before { .leaderboard-box { display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 100%; margin-top: 2px; margin-left: 1px; @@ -6057,7 +6043,7 @@ span.tag-reports-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 100%; margin-top: 10px; margin-left: 10px; @@ -6105,7 +6091,7 @@ span.tag-reports-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50%; margin-top: 10px; margin-left: 10px; @@ -6176,7 +6162,7 @@ span.tag-reports-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 50%; margin-top: 10px; margin-left: 10px; @@ -6618,7 +6604,7 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 30%; margin-top: 10px; margin-left: 10px; @@ -6678,7 +6664,7 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 74.7vh; + height: 80.7vh; width: 70%; margin-top: 10px; margin-left: 10px; @@ -6729,9 +6715,9 @@ input[type="range"].vehicle-info-points-input::-moz-range-track { border: 2px solid var(--color-3); position: absolute; width: 58%; - height: 86%; + height: 88.5%; left: 40.6%; - top: 10.5%; + top: 8%; margin-bottom: 15px; } From 8c1e6abba25e2f70822835d5d2090580b2b62eed Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 8 Apr 2023 20:56:52 -0400 Subject: [PATCH 225/381] Update README.md (#283) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e5a2e42..a3b8ffee 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,8 @@ end exports("GetFrontPlate", GetFrontPlate) 3. Add **ps-mdt:client:trafficStop** into the Radialmenu -* Preview: +* Preview. + ![image](https://user-images.githubusercontent.com/82112471/230744641-72480046-966f-4145-a4a3-ad7fd329870c.png) # Roster and SOPs Setup From 16e282d42f06055f00cee6068cc70cb109846123 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 8 Apr 2023 20:57:09 -0400 Subject: [PATCH 226/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 182c3c2e..c7de3d65 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.4.0' +version '2.4.1' lua54 'yes' From 05b7ad6099a7216f0354c3820db456d2b18eb645 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:23:51 -0400 Subject: [PATCH 227/381] Aligned Containers --- ui/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/style.css b/ui/style.css index 8a57e7ee..46ebda2e 100644 --- a/ui/style.css +++ b/ui/style.css @@ -1643,7 +1643,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-top: 5px; margin-bottom: 0px; - width: 98%; + width: 100%; align-items: center; user-select: none; } @@ -1673,7 +1673,7 @@ span.tag-input[contenteditable]:empty::before { margin: auto; margin-top: 5px; margin-bottom: 0px; - width: 98%; + width: 100%; align-items: center; user-select: none; } From 9b1f4008e485a539f94989ce0afa2e914f60df0e Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:27:49 -0400 Subject: [PATCH 228/381] Aligned containers --- ui/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/style.css b/ui/style.css index 46ebda2e..203f1e1e 100644 --- a/ui/style.css +++ b/ui/style.css @@ -504,7 +504,7 @@ span.bulletin-item-info[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 80.7vh; + height: 81.1vh; width: 50vh; margin-top: 10px; margin-left: 10px; @@ -3666,7 +3666,7 @@ span.officer-tag-bolo-input[contenteditable]:empty::before { border: 2px solid var(--color-3); display: flex; flex-direction: column; - height: 45.5%; + height: 46.5%; width: 50vh; margin-top: 1vh; margin-left: 10px; From fa3991b785bd15eb0abca09f00b180288f147dd0 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Sat, 15 Apr 2023 11:17:28 +0200 Subject: [PATCH 229/381] Fixed issue other jobs on clockin This fixes the issue if you had a police job and got a new job it would register to the discord webhook on playerdrop --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index fd4b034e..ae579199 100644 --- a/server/main.lua +++ b/server/main.lua @@ -84,7 +84,7 @@ AddEventHandler('playerDropped', function(reason) local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) -- Auto clock out if the player is off duty - if PlayerData.job.onduty then + if IsPoliceOrEms(job) and PlayerData.job.onduty then MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { ['@user_id'] = PlayerData.citizenid }) From 18be15248e52c323e39e2d2a0c516b65e415f838 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 19 Apr 2023 20:03:11 -0400 Subject: [PATCH 230/381] Fixed only grabbing first weapon when selfregistering Added a command option Added the name of the weapon being registered while sending the notification Remove the police check --- client/main.lua | 41 +++++++++++++++++++++++++++++------------ server/main.lua | 44 +++++++++++++++++++------------------------- 2 files changed, 48 insertions(+), 37 deletions(-) diff --git a/client/main.lua b/client/main.lua index f6e86ef6..f57f5cfe 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1014,27 +1014,44 @@ RegisterNetEvent('mdt:client:statusImpound', function(data, plate) SendNUIMessage({ type = "statusImpound", data = data, plate = plate }) end) -function GetPlayerWeaponInfo(cb) - QBCore.Functions.TriggerCallback('getWeaponInfo', function(weaponInfo) - cb(weaponInfo) +function GetPlayerWeaponInfos(cb) + QBCore.Functions.TriggerCallback('getWeaponInfo', function(weaponInfos) + cb(weaponInfos) end) end --3rd Eye Trigger Event -RegisterNetEvent('ps-mdt:client:selfregister', function() - local playerData = QBCore.Functions.GetPlayerData() - if GetJobType(playerData.job.name) == 'police' then - GetPlayerWeaponInfo(function(weaponInfo) - if weaponInfo then +RegisterNetEvent('registerAllWeapons') +AddEventHandler('registerAllWeapons', function() + GetPlayerWeaponInfos(function(weaponInfos) + if weaponInfos and #weaponInfos > 0 then + for _, weaponInfo in ipairs(weaponInfos) do TriggerServerEvent('mdt:server:registerweapon', weaponInfo.serialnumber, weaponInfo.weaponurl, weaponInfo.notes, weaponInfo.owner, weaponInfo.weapClass, weaponInfo.weaponmodel) + TriggerEvent('QBCore:Notify', "Weapon " .. weaponInfo.weaponmodel .. " has been added to police database.") --print("Weapon added to database") - else - --print("No weapons found") end - end) - end + else + -- print("No weapons found") + end + end) end) +-- Uncomment if you want to use this instead. + +--[[ RegisterCommand('registerweapon', function(source) + GetPlayerWeaponInfos(function(weaponInfos) + if weaponInfos and #weaponInfos > 0 then + for _, weaponInfo in ipairs(weaponInfos) do + TriggerServerEvent('mdt:server:registerweapon', weaponInfo.serialnumber, weaponInfo.weaponurl, weaponInfo.notes, weaponInfo.owner, weaponInfo.weapClass, weaponInfo.weaponmodel) + TriggerEvent('QBCore:Notify', "Weapon " .. weaponInfo.weaponmodel .. " has been added to police database.") + print("Weapon added to database") + end + else + print("No weapons found") + end + end) +end, false) ]] + --==================================================================================== ------------------------------------------ -- STAFF LOGS PAGE -- diff --git a/server/main.lua b/server/main.lua index ae579199..59abe24e 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1671,31 +1671,25 @@ QBCore.Functions.CreateCallback('mdt:server:GetPlayerSourceId', function(source, end) QBCore.Functions.CreateCallback('getWeaponInfo', function(source, cb) - local Player = QBCore.Functions.GetPlayer(source) - local weaponInfo = nil - for _, item in pairs(Player.PlayerData.items) do - if item.type == "weapon" then - local invImage = ("https://cfx-nui-%s/html/images/%s"):format(Config.InventoryForWeaponsImages, item.image) - if invImage then - weaponInfo = { - serialnumber = item.info.serie, - owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, - weaponmodel = QBCore.Shared.Items[item.name].label, - weaponurl = invImage, - notes = "Self Registered", - weapClass = "Class 1", - } - break - end - end -end - if weaponInfo then - TriggerClientEvent('QBCore:Notify', source, "Weapon has been added to police database. ") - else - TriggerClientEvent('QBCore:Notify', source, "Weapon already registered on database.") - end - - cb(weaponInfo) + local Player = QBCore.Functions.GetPlayer(source) + local weaponInfos = {} + for _, item in pairs(Player.PlayerData.items) do + if item.type == "weapon" then + local invImage = ("https://cfx-nui-%s/html/images/%s"):format(Config.InventoryForWeaponsImages, item.image) + if invImage then + local weaponInfo = { + serialnumber = item.info.serie, + owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, + weaponmodel = QBCore.Shared.Items[item.name].label, + weaponurl = invImage, + notes = "Self Registered", + weapClass = "Class 1", + } + table.insert(weaponInfos, weaponInfo) + end + end + end + cb(weaponInfos) end) RegisterNetEvent('mdt:server:registerweapon', function(serial, imageurl, notes, owner, weapClass, weapModel) From 3ae2cb74cf9bf6ce9e21b6255ff6d402f207b088 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 19 Apr 2023 20:04:56 -0400 Subject: [PATCH 231/381] Modified to match the read me command --- README.md | 2 +- client/main.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a3b8ffee..1270b93a 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, we ![image](https://user-images.githubusercontent.com/82112471/226144189-0cf7a87c-d9bc-4d1f-a9fb-6f14f92cb68b.png) ## Self Register Weapons -* Your citizens can self-register weapons found on their inventory. Event to trigger is below if you're using qb-target. +* Your citizens can self-register weapons found on their inventory. Event to trigger is below if you're using qb-target. There's also a command available named `registerweapon` but you'll need to uncomment if you want to use it. ``` ps-mdt:client:selfregister ``` diff --git a/client/main.lua b/client/main.lua index f57f5cfe..ee53b12e 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1021,8 +1021,8 @@ function GetPlayerWeaponInfos(cb) end --3rd Eye Trigger Event -RegisterNetEvent('registerAllWeapons') -AddEventHandler('registerAllWeapons', function() +RegisterNetEvent('ps-mdt:client:selfregister') +AddEventHandler('ps-mdt:client:selfregister', function() GetPlayerWeaponInfos(function(weaponInfos) if weaponInfos and #weaponInfos > 0 then for _, weaponInfo in ipairs(weaponInfos) do From 1fc3b3f0d58bd04deb9e4fb0b269e8b89f6c3758 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 19 Apr 2023 20:06:55 -0400 Subject: [PATCH 232/381] 2.4.2 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index c7de3d65..d1461e2c 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.4.1' +version '2.4.2' lua54 'yes' From 5b53434085282ccdea126acff13af581f636e3ca Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 22 Apr 2023 13:31:18 -0400 Subject: [PATCH 233/381] Properly Formatted Time Alter table to proper handle the new entries Formatted time as days hours minutes seconds Added top 25 officers --- mdt.sql | 4 ++-- server/main.lua | 25 +++++++++++++++++++++---- ui/app.js | 5 ++++- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/mdt.sql b/mdt.sql index 2ce2cc2f..81647cc6 100644 --- a/mdt.sql +++ b/mdt.sql @@ -129,7 +129,7 @@ CREATE TABLE IF NOT EXISTS `mdt_clocking` ( `lastname` varchar(255) NOT NULL DEFAULT '', `clock_in_time` varchar(255) NOT NULL DEFAULT '', `clock_out_time` varchar(50) DEFAULT NULL, - `total_time` varchar(50) NOT NULL DEFAULT '0', + `total_time` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`) USING BTREE, KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; \ No newline at end of file diff --git a/server/main.lua b/server/main.lua index 59abe24e..3099981d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1705,7 +1705,7 @@ end) function getTopOfficers(callback) local result = {} - local query = 'SELECT * FROM mdt_clocking ORDER BY total_time DESC LIMIT 10' + local query = 'SELECT * FROM mdt_clocking ORDER BY total_time DESC LIMIT 25' MySQL.Async.fetchAll(query, {}, function(officers) for k, officer in ipairs(officers) do table.insert(result, { @@ -1743,8 +1743,25 @@ function sendToDiscord(color, name, message, footer) end function format_time(time) + local days = math.floor(time / 86400) + time = time % 86400 local hours = math.floor(time / 3600) - local minutes = math.floor((time % 3600) / 60) + time = time % 3600 + local minutes = math.floor(time / 60) local seconds = time % 60 - return string.format('%02d:%02d:%02d', hours, minutes, seconds) -end + + local formattedTime = "" + if days > 0 then + formattedTime = string.format("%d day%s ", days, days == 1 and "" or "s") + end + if hours > 0 then + formattedTime = formattedTime .. string.format("%d hour%s ", hours, hours == 1 and "" or "s") + end + if minutes > 0 then + formattedTime = formattedTime .. string.format("%d minute%s ", minutes, minutes == 1 and "" or "s") + end + if seconds > 0 then + formattedTime = formattedTime .. string.format("%d second%s", seconds, seconds == 1 and "" or "s") + end + return formattedTime +end \ No newline at end of file diff --git a/ui/app.js b/ui/app.js index d6e64bb6..cb9cc674 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5656,8 +5656,10 @@ function updateOfficerData(officerData) { const leaderboardBox = document.querySelector('.leaderboard-box'); leaderboardBox.innerHTML = ''; + const positions = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th', '15th', '16th', '17th', '18th', '19th', '20th', '21th', '22th', '23th', '24th', '25th']; + officerData.forEach((officer, index) => { - const position = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th'][index]; + const position = positions[index]; const officerDiv = document.createElement('div'); officerDiv.className = 'leaderboard-box-test'; officerDiv.style.fontSize = '1.3vh'; @@ -5669,6 +5671,7 @@ function updateOfficerData(officerData) { }); } + window.addEventListener("load", function () { document .getElementById("offenses-search") From 9ab93e5de13d7a946e5ffe98093edc71e7d69cfa Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 22 Apr 2023 13:32:47 -0400 Subject: [PATCH 234/381] 2.4.3 - NEW VERSION READ BELOW --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index d1461e2c..9388a392 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.4.2' +version '2.4.3' lua54 'yes' From 0776b4db18c5eda822cd2c0757d02f5be32b1c79 Mon Sep 17 00:00:00 2001 From: Jacob Bernard Allen Date: Sun, 23 Apr 2023 23:02:11 -0400 Subject: [PATCH 235/381] Issue 303 fix EMS MDT - Weapons Tab should be hidden from EMS view FIX --- ui/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/app.js b/ui/app.js index cb9cc674..1d857347 100644 --- a/ui/app.js +++ b/ui/app.js @@ -4018,6 +4018,7 @@ $(document).ready(() => { $(".manage-incidents-title ").css("margin-right", "0px") $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); } else if (AmbulanceJobs[sentJob] !== undefined) { + $(".weapons-nav-item").hide() $("#home-warrants-container").fadeOut(0); $("#home-reports-container").fadeIn(0); if (sentJob == "ambulance") { From 476da444f7b89f5ae01b38be3017f0f4649a5c60 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 26 Apr 2023 15:34:38 -0400 Subject: [PATCH 236/381] Added Fingerprint saving & search by fingerprint --- client/main.lua | 10 ++-- server/dbm.lua | 20 +------- server/main.lua | 76 ++++++++++++++++------------- ui/app.js | 118 +++++++++++++++++----------------------------- ui/dashboard.html | 2 +- 5 files changed, 93 insertions(+), 133 deletions(-) diff --git a/client/main.lua b/client/main.lua index ee53b12e..0fc64deb 100644 --- a/client/main.lua +++ b/client/main.lua @@ -288,8 +288,8 @@ RegisterNUICallback("searchProfiles", function(data, cb) end) -RegisterNetEvent('mdt:client:searchProfile', function(sentData, isLimited) - SendNUIMessage({ type = "profiles", data = sentData, isLimited = isLimited }) +RegisterNetEvent('mdt:client:searchProfile', function(sentData, isLimited, fingerprint) + SendNUIMessage({ action = "updateFingerprintData", fingerprint = fingerprint }) end) RegisterNUICallback("saveProfile", function(data, cb) @@ -301,8 +301,8 @@ RegisterNUICallback("saveProfile", function(data, cb) local tags = data.tags local gallery = data.gallery local licenses = data.licenses - - TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, licenses) + local fingerprint = data.fingerprint + TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, licenses, fingerprint) cb(true) end) @@ -335,6 +335,8 @@ RegisterNUICallback("getProfileData", function(data, cb) end end p = nil + + result['fingerprint'] = result['searchFingerprint'] return cb(result) end) diff --git a/server/dbm.lua b/server/dbm.lua index 11e2babc..c85be6da 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -13,13 +13,10 @@ end -- (Start) Opening the MDT and sending data function AddLog(text) - --print(text) return MySQL.insert.await('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (?,?)', {text, os.time() * 1000}) - -- return exports.oxmysql:execute('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (:text, :time)', { text = text, time = os.time() * 1000 }) end function GetNameFromId(cid) - -- Should be a scalar? local result = MySQL.scalar.await('SELECT charinfo FROM players WHERE citizenid = @citizenid', { ['@citizenid'] = cid }) if result ~= nil then local charinfo = json.decode(result) @@ -29,37 +26,29 @@ function GetNameFromId(cid) --print('Player does not exist') return nil end - -- return exports.oxmysql:executeSync('SELECT firstname, lastname FROM `users` WHERE id = :id LIMIT 1', { id = cid }) end --- idk what this is used for either function GetPersonInformation(cid, jobtype) - local result = MySQL.query.await('SELECT information, tags, gallery, pfp FROM mdt_data WHERE cid = ? and jobtype = ?', { cid, jobtype}) - return result[1] - -- return exports.oxmysql:executeSync('SELECT information, tags, gallery FROM mdt WHERE cid= ? and type = ?', { cid, jobtype }) + local result = MySQL.query.await('SELECT information, tags, gallery, pfp, fingerprint FROM mdt_data WHERE cid = ? and jobtype = ?', { cid, jobtype}) + return result[1] end function GetIncidentName(id) - -- Should also be a scalar local result = MySQL.query.await('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) return result[1] - -- return exports.oxmysql:executeSync('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) end function GetConvictions(cids) return MySQL.query.await('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) - -- return exports.oxmysql:executeSync('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) end function GetLicenseInfo(cid) local result = MySQL.query.await('SELECT * FROM `licenses` WHERE `cid` = ?', { cid }) return result - -- return exports.oxmysql:executeSync('SELECT * FROM `licenses` WHERE `cid`=:cid', { cid = cid }) end function CreateUser(cid, tableName) AddLog("A user was created with the CID: "..cid) - -- return exports.oxmysql:insert("INSERT INTO `"..dbname.."` (cid) VALUES (:cid)", { cid = cid }) return MySQL.insert.await("INSERT INTO `"..tableName.."` (cid) VALUES (:cid)", { cid = cid }) end @@ -69,7 +58,6 @@ end function GetBulletins(JobType) return MySQL.query.await('SELECT * FROM `mdt_bulletin` WHERE `jobtype` = ? LIMIT 10', { JobType }) - -- return exports.oxmysql:executeSync('SELECT * FROM `mdt_bulletin` WHERE `type`= ? LIMIT 10', { JobType }) end function GetPlayerProperties(cid, cb) @@ -85,20 +73,16 @@ function GetPlayerDataById(id) else return MySQL.single.await('SELECT citizenid, charinfo, job, metadata FROM players WHERE citizenid = ? LIMIT 1', { id }) end - - -- return exports.oxmysql:executeSync('SELECT citizenid, charinfo, job FROM players WHERE citizenid = ? LIMIT 1', { id }) end function GetBoloStatus(plate) local result = MySQL.scalar.await('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) return result - -- return exports.oxmysql:scalarSync('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) end function GetOwnerName(cid) local result = MySQL.scalar.await('SELECT charinfo FROM `players` WHERE LOWER(`citizenid`) = ? LIMIT 1', {cid}) return result - -- return exports.oxmysql:scalarSync('SELECT charinfo FROM `players` WHERE id=:cid LIMIT 1', { cid = cid}) end function GetVehicleInformation(plate, cb) diff --git a/server/main.lua b/server/main.lua index 3099981d..70260455 100644 --- a/server/main.lua +++ b/server/main.lua @@ -206,43 +206,48 @@ RegisterNetEvent('mdt:server:openMDT', function() end) QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, sentData) - if not sentData then return cb({}) end - local src = source - local Player = QBCore.Functions.GetPlayer(src) - if Player then - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType ~= nil then - local people = MySQL.query.await("SELECT p.citizenid, p.charinfo, md.pfp FROM players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query AND jobtype = :jobtype LIMIT 20", { query = string.lower('%'..sentData..'%'), jobtype = JobType }) - local citizenIds = {} - local citizenIdIndexMap = {} - if not next(people) then cb({}) return end - - for index, data in pairs(people) do - people[index]['warrant'] = false - people[index]['convictions'] = 0 - people[index]['licences'] = GetPlayerLicenses(data.citizenid) - people[index]['pp'] = ProfPic(data.gender, data.pfp) - citizenIds[#citizenIds+1] = data.citizenid - citizenIdIndexMap[data.citizenid] = index - end - - local convictions = GetConvictions(citizenIds) + if not sentData then return cb({}) end + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType ~= nil then + local people = MySQL.query.await("SELECT p.citizenid, p.charinfo, md.pfp, md.fingerprint FROM players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query OR LOWER(md.fingerprint) LIKE :query AND jobtype = :jobtype LIMIT 20", { query = string.lower('%'..sentData..'%'), jobtype = JobType }) + local citizenIds = {} + local citizenIdIndexMap = {} + if not next(people) then cb({}) return end + + for index, data in pairs(people) do + people[index]['warrant'] = false + people[index]['convictions'] = 0 + people[index]['licences'] = GetPlayerLicenses(data.citizenid) + people[index]['pp'] = ProfPic(data.gender, data.pfp) + if data.fingerprint and data.fingerprint ~= "" then + people[index]['fingerprint'] = data.fingerprint + else + people[index]['fingerprint'] = "" + end + citizenIds[#citizenIds+1] = data.citizenid + citizenIdIndexMap[data.citizenid] = index + end - if next(convictions) then - for _, conv in pairs(convictions) do - if conv.warrant == "1" then people[citizenIdIndexMap[conv.cid]].warrant = true end + local convictions = GetConvictions(citizenIds) - local charges = json.decode(conv.charges) - people[citizenIdIndexMap[conv.cid]].convictions = people[citizenIdIndexMap[conv.cid]].convictions + #charges - end - end + if next(convictions) then + for _, conv in pairs(convictions) do + if conv.warrant == "1" then people[citizenIdIndexMap[conv.cid]].warrant = true end + local charges = json.decode(conv.charges) + people[citizenIdIndexMap[conv.cid]].convictions = people[citizenIdIndexMap[conv.cid]].convictions + #charges + end + end + TriggerClientEvent('mdt:client:searchProfile', src, people, false, people[1].fingerprint) - return cb(people) - end - end + return cb(people) + end + end - return cb({}) + return cb({}) end) QBCore.Functions.CreateCallback("mdt:server:getWarrants", function(source, cb) @@ -418,12 +423,14 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb person.profilepic = mdtData.pfp person.tags = json.decode(mdtData.tags) person.gallery = json.decode(mdtData.gallery) + person.fingerprint = mdtData.fingerprint + print("Fetched fingerprint from mdt_data:", mdtData.fingerprint) end return cb(person) end) -RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, licenses) +RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, licenses, fingerprint) local src = source local Player = QBCore.Functions.GetPlayer(src) UpdateAllLicenses(cid, licenses) @@ -431,13 +438,14 @@ RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'doj' then JobType = 'police' end - MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, jobtype = :jobtype, tags = :tags, gallery = :gallery', { + MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery, fingerprint) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery, :fingerprint) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, jobtype = :jobtype, tags = :tags, gallery = :gallery, fingerprint = :fingerprint', { cid = cid, information = information, pfp = pfp, jobtype = JobType, tags = json.encode(tags), gallery = json.encode(gallery), + fingerprint = fingerprint, }, function() end) end diff --git a/ui/app.js b/ui/app.js index 1d857347..47da883e 100644 --- a/ui/app.js +++ b/ui/app.js @@ -171,6 +171,14 @@ $(document).ready(() => { $(".profile-items").on("click", ".profile-item", async function () { let id = $(this).data("id"); + let profileFingerprint = $(this).data("fingerprint"); + + if (profileFingerprint && profileFingerprint !== "") { + $(".manage-profile-fingerprint-input").val(profileFingerprint); + } else { + $(".manage-profile-fingerprint-input").val(""); + } + let result = await $.post( `https://${GetParentResourceName()}/getProfileData`, JSON.stringify({ @@ -201,24 +209,13 @@ $(document).ready(() => { .addClass("fa-plus"); } - const { vehicles, tags, gallery, convictions, incidents, properties } = result + const { vehicles, tags, gallery, convictions, incidents, properties, fingerprint } = result; $(".manage-profile-editing-title").html(`You are currently editing ${result["firstname"]} ${result["lastname"]}`); $(".manage-profile-citizenid-input").val(result['cid']); $(".manage-profile-name-input-1").val(result["firstname"]); $(".manage-profile-name-input-2").val(result["lastname"]); $(".manage-profile-dob-input").val(result["dob"]); - if (AmbulanceJobs[playerJob] !== undefined) { - $(".manage-profile-fingerprint-input").val(result["fingerprint"]); - } - else { - if (convictions.length >= 1) { - $(".manage-profile-fingerprint-input").val(result["fingerprint"]); - } - else { - $(".manage-profile-fingerprint-input").val("No Fingerprints found!"); - } - } $(".manage-profile-phonenumber-input").val(result["phone"]); $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); $(".manage-profile-apartment-input").val(`${result.apartment}`); @@ -332,7 +329,6 @@ $(document).ready(() => { $(".gallery-inner-container").html(galleryHTML); $(".houses-holder").html(propertyHTML); }); - //
                ID: ${BulletinId}
                $(".bulletin-add-btn").click(function () { if (canCreateBulletin == 0) { @@ -567,7 +563,8 @@ $(document).ready(() => { sName: sName, tags: tags, gallery: gallery, - licenses: licenses + licenses: licenses, + fingerprint: $(".manage-profile-fingerprint-input").val() }) ); $(".manage-profile-pic").attr("src", newpfp); @@ -4114,7 +4111,7 @@ $(document).ready(() => { } } {/*
                ID: ${value.id}
                */} - window.addEventListener("message", function (event) { +window.addEventListener("message", function (event) { let eventData = event.data; $(".dispatch-msg-notif").fadeIn(500); if (eventData.type == "show") { @@ -4130,26 +4127,6 @@ $(document).ready(() => { $(".manage-profile-houses-container").removeClass("display_hidden"); } - /* if (PoliceJobs[playerJob] !== undefined || AmbulanceJobs[playerJob] !== undefined) { - $(".manage-profile-save").css("display", "block"); - $(".manage-profile-editing-title").css("display", "block"); - $(".manage-incidents-create").css("display", "block"); - $(".manage-incidents-save").css("display", "block"); - $(".manage-incidents-editing-title").css("display", "block"); - $(".manage-reports-new").css("display", "block"); - $(".manage-reports-save").css("display", "block"); - $(".manage-reports-editing-title").css("display", "block"); - } else if (DojJobs[playerJob] !== undefined) { - $(".manage-profile-save").css("display", "none"); - $(".manage-profile-editing-title").css("display", "none"); - $(".manage-incidents-create").css("display", "none"); - $(".manage-incidents-save").css("display", "none"); - $(".manage-incidents-editing-title").css("display", "none"); - $(".manage-reports-new").css("display", "none"); - $(".manage-reports-save").css("display", "none"); - $(".manage-reports-editing-title").css("display", "none"); - } */ - $("body").fadeIn(0); $(".close-all").css("filter", "none"); $(".close-all").fadeOut(0); @@ -4234,9 +4211,6 @@ $(document).ready(() => { } else if (AmbulanceJobs[unit.unitType] !== undefined) { activeInfoJob = `
                Ambulance
                ` emsCount++; - /* } else if (DojJobs[unit.unitType] !== undefined) { - activeInfoJob = `
                FIRE
                ` - fireCount++; */ } else if (DojJobs[unit.unitType] !== undefined) { activeInfoJob = `
                DOJ
                ` dojCount++; @@ -4260,22 +4234,7 @@ $(document).ready(() => { $("#bcso-count").html(bcsoCount); $("#ems-count").html(emsCount); $("#doj-count").html(dojCount); - /* $("#fire-count").html(fireCount); */ - /* } else if (eventData.type == "bulletin") { - $(".bulletin-items-continer").empty(); - $.each(eventData.data, function (index, value) { - $( - ".bulletin-items-continer" - ).prepend(`
                -
                ${value.title}
                -
                ${value.desc}
                -
                -
                ID: ${value.id}
                -
                ${value.author - } - ${timeAgo(Number(value.time))}
                -
                -
                `); - }); */ + } else if (eventData.type == "newBulletin") { const value = eventData.data; $(".bulletin-items-continer") @@ -5623,33 +5582,40 @@ function searchProfilesResults(result) { } profileHTML += ` -
                - -
                -
                -
                ${name}
                -
                - ${licences} -
                -
                - ${value.warrant ? "Active" : "No"} Warrant - ${value.convictions} Convictions -
                -
                -
                -
                Citizen ID: ${value.citizenid}
                  -
                -
                -
                - `; +
                + +
                +
                +
                ${name}
                +
                + ${licences} +
                +
                + ${value.warrant ? "Active" : "No"} Warrant + ${value.convictions} Convictions +
                +
                +
                +
                Citizen ID: ${value.citizenid}
                  +
                +
                +
                +`; }); $(".profile-items").html(profileHTML); } -window.addEventListener('message', (event) => { - if (event.data.action === 'updateOfficerData') { - updateOfficerData(event.data.data); +window.addEventListener("message", (event) => { + if (event.data.action === "updateOfficerData") { + updateOfficerData(event.data.data); + } else if (event.data.action === "updateFingerprintData") { + const { fingerprint } = event.data; + if (fingerprint && fingerprint !== "") { + $(".manage-profile-fingerprint-input").val(fingerprint); + } else { + $(".manage-profile-fingerprint-input").val(""); + } } }); diff --git a/ui/dashboard.html b/ui/dashboard.html index 12c95c90..8661bffa 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -305,7 +305,7 @@
                Fingerprint
                -
                +
                Phone Number
                From 5248a396a08a0bfee33a9a814fcc1551ec6a04c3 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 26 Apr 2023 16:25:25 -0400 Subject: [PATCH 237/381] Removed version check --- client/main.lua | 4 ++-- fxmanifest.lua | 5 ++--- server/versioncheck.lua | 45 ----------------------------------------- shared/config.lua | 2 +- 4 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 server/versioncheck.lua diff --git a/client/main.lua b/client/main.lua index 0fc64deb..c138c878 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1046,10 +1046,10 @@ end) for _, weaponInfo in ipairs(weaponInfos) do TriggerServerEvent('mdt:server:registerweapon', weaponInfo.serialnumber, weaponInfo.weaponurl, weaponInfo.notes, weaponInfo.owner, weaponInfo.weapClass, weaponInfo.weaponmodel) TriggerEvent('QBCore:Notify', "Weapon " .. weaponInfo.weaponmodel .. " has been added to police database.") - print("Weapon added to database") + --print("Weapon added to database") end else - print("No weapons found") + --print("No weapons found") end end) end, false) ]] diff --git a/fxmanifest.lua b/fxmanifest.lua index 9388a392..1b7e90cb 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -13,8 +13,7 @@ server_scripts { '@oxmysql/lib/MySQL.lua', 'server/utils.lua', 'server/dbm.lua', - 'server/main.lua', - 'server/versioncheck.lua' + 'server/main.lua' } client_scripts{ 'client/main.lua', @@ -30,4 +29,4 @@ files { 'ui/dashboard.html', 'ui/app.js', 'ui/style.css', -} +} \ No newline at end of file diff --git a/server/versioncheck.lua b/server/versioncheck.lua deleted file mode 100644 index 3d933946..00000000 --- a/server/versioncheck.lua +++ /dev/null @@ -1,45 +0,0 @@ -local function versionCheck(repository) - local resource = GetInvokingResource() or GetCurrentResourceName() - - local currentVersion = GetResourceMetadata(resource, 'version', 0) - - if currentVersion then - currentVersion = currentVersion:match('%d+%.%d+%.%d+') - end - - if not currentVersion then return print(("^1Unable to determine current resource version for '%s' ^0"):format(resource)) end - - SetTimeout(1000, function() - PerformHttpRequest(('https://api.github.com/repos/%s/releases/latest'):format(repository), function(status, response) - if status ~= 200 then return end - - response = json.decode(response) - - if response.prerelease then return end - - local latestVersion = response.tag_name:match('%d+%.%d+%.%d+') - if not latestVersion or latestVersion == currentVersion then return end - - local cv = { string.strsplit('.', currentVersion) } - local lv = { string.strsplit('.', latestVersion) } - - for i = 1, #cv do - local current, minimum = tonumber(cv[i]), tonumber(lv[i]) - if current ~= minimum then - if current < minimum then - - print("^0.-----------------------------------------------.") - print("^0| Project Sloth |") - print("^0'-----------------------------------------------'") - print(('^6Your %s is outdated (your version: %s)\r\nMake sure to update: %s^0'):format(resource, currentVersion, response.html_url)) - print('^2'..response.body:gsub("\r\n\r\n\r", "^0")) - - - else break end - end - end - end, 'GET') - end) -end - -versionCheck('Project-Sloth/ps-mdt') diff --git a/shared/config.lua b/shared/config.lua index 22edd210..70ca8cab 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -704,4 +704,4 @@ function GetJobType(job) else return nil end -end +end \ No newline at end of file From bf58900844eea208854b1f4722b5198260ea58f6 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 26 Apr 2023 16:34:27 -0400 Subject: [PATCH 238/381] 2.4.5 --- fxmanifest.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 1b7e90cb..5039167d 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.4.3' +version '2.4.5' lua54 'yes' @@ -29,4 +29,4 @@ files { 'ui/dashboard.html', 'ui/app.js', 'ui/style.css', -} \ No newline at end of file +} From d3039e90215d5d21caf6e454068deb60b49feeb3 Mon Sep 17 00:00:00 2001 From: xFutte Date: Wed, 26 Apr 2023 23:46:31 +0200 Subject: [PATCH 239/381] Added fingerprint to SQL query --- mdt.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/mdt.sql b/mdt.sql index 81647cc6..c4836e72 100644 --- a/mdt.sql +++ b/mdt.sql @@ -6,6 +6,7 @@ CREATE TABLE IF NOT EXISTS `mdt_data` ( `gallery` TEXT NOT NULL, `jobtype` VARCHAR(25) DEFAULT 'police', `pfp` TEXT DEFAULT NULL, + `fingerprint` VARCHAR(50) DEFAULT NULL, PRIMARY KEY (`cid`), KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; From 00ec9935d4dbb82de67573c30b6eec74b28dbb7c Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 26 Apr 2023 16:25:25 -0400 Subject: [PATCH 240/381] Removed version check --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 5039167d..4a489a15 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -29,4 +29,4 @@ files { 'ui/dashboard.html', 'ui/app.js', 'ui/style.css', -} +} \ No newline at end of file From f466739b1d47e055008d77da82f3117a4c4e0c30 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 26 Apr 2023 22:32:28 -0400 Subject: [PATCH 241/381] Reports for police and ambulanced changed to white --- ui/app.js | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/ui/app.js b/ui/app.js index 47da883e..e0d6c84d 100644 --- a/ui/app.js +++ b/ui/app.js @@ -746,7 +746,23 @@ $(document).ready(() => { "click", ".manage-incidents-create", function () { - let template = '

                📝 Summary:

                [Insert Report Summary Here]

                 

                🧍 Hostage: [Name Here]

                 

                🔪 Weapons/Items Confiscated:

                · [Insert List Here]

                 

                -----

                💸 Fine:

                 

                ⌚ Sentence:

                -----

                '; + let template = ` +
                +

                📝 Summary:

                +

                [Insert Report Summary Here]

                +

                 

                +

                🧍 Hostage: [Name Here]

                +

                 

                +

                🔪 Weapons/Items Confiscated:

                +

                · [Insert List Here]

                +

                 

                +

                -----

                +

                💸 Fine:

                +

                 

                +

                ⌚ Sentence:

                +

                -----

                +
                + `; $("#manage-incidents-title-input").val( "Name - Charge - " + $(".date").html() ); @@ -1314,12 +1330,29 @@ $(document).ready(() => { "click", ".manage-bolos-new", function () { - //if ($(".manage-bolos-editing-title").html() == 'You are currently creating a new BOLO') { - //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) - //} else { var template = ""; if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - template = '

                📝 ICU Room #: [ # ]

                Report ID: [ Report ID ]


                🧍Time Admitted: [ Date and Time Here ] 

                Surgery: [Yes/No]

                Injuries/Ailments:

                · [Enter List Of Injuries Here]

                 

                -----

                Additional Attending:

                · [ List Any Other Staff Here ]

                🧑‍🤝‍🧑 Additional Emergency Contacts:

                · [ Name And Number ]

                Notes:

                · [Additional Notes Here]

                -----

                '} + template = ` +
                +

                📝 ICU Room #: [ # ]

                +

                Report ID: [ Report ID ]

                +


                +

                🧍Time Admitted: [ Date and Time Here ] 

                +

                Surgery: [Yes/No]

                +

                Injuries/Ailments:

                +

                · [Enter List Of Injuries Here]

                +

                 

                +

                -----

                +

                Additional Attending:

                +

                · [ List Any Other Staff Here ]

                +

                🧑‍🤝‍🧑 Additional Emergency Contacts:

                +

                · [ Name And Number ]

                +

                Notes:

                +

                · [Additional Notes Here]

                +

                -----

                +
                + `; + } $(".manage-bolos-editing-title").html( "You are currently creating a new BOLO" ); From ebc71692606eeacc5f232a2e763fc5a6f54f4781 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 27 Apr 2023 04:20:48 -0400 Subject: [PATCH 242/381] Corrected search functions and template white --- server/main.lua | 61 +++++++++++++++++++++++++++---------------------- ui/app.js | 25 ++++++++++++++++---- 2 files changed, 54 insertions(+), 32 deletions(-) diff --git a/server/main.lua b/server/main.lua index 70260455..829f3baf 100644 --- a/server/main.lua +++ b/server/main.lua @@ -735,34 +735,41 @@ end) RegisterNetEvent('mdt:server:incidentSearchPerson', function(query) if query then - local src = source - local Player = QBCore.Functions.GetPlayer(src) - if Player then - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'doj' or JobType == 'ambulance' then - local function ProfPic(gender, profilepic) - if profilepic then return profilepic end; - if gender == "f" then return "img/female.png" end; - return "img/male.png" - end + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'doj' or JobType == 'ambulance' then + local function ProfPic(gender, profilepic) + if profilepic then return profilepic end; + if gender == "f" then return "img/female.png" end; + return "img/male.png" + end - local result = MySQL.query.await("SELECT p.citizenid, p.charinfo, p.metadata, md.pfp from players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query AND `jobtype` = :jobtype LIMIT 30", { - query = string.lower('%'..query..'%'), -- % wildcard, needed to search for all alike results - jobtype = JobType - }) - local data = {} - for i=1, #result do - local charinfo = json.decode(result[i].charinfo) - local metadata = json.decode(result[i].metadata) - data[i] = { - id = result[i].citizenid, - firstname = charinfo.firstname, - lastname = charinfo.lastname, - profilepic = ProfPic(charinfo.gender, result[i].pfp), - callsign = metadata.callsign - } - end - TriggerClientEvent('mdt:client:incidentSearchPerson', src, data) + local firstname, lastname = query:match("^(%S+)%s*(%S*)$") + firstname = firstname or query + lastname = lastname or query + + local result = MySQL.query.await("SELECT p.citizenid, p.charinfo, p.metadata, md.pfp from players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE (LOWER(JSON_UNQUOTE(JSON_EXTRACT(`charinfo`, '$.firstname'))) LIKE :firstname AND LOWER(JSON_UNQUOTE(JSON_EXTRACT(`charinfo`, '$.lastname'))) LIKE :lastname) OR LOWER(`citizenid`) LIKE :citizenid AND `jobtype` = :jobtype LIMIT 30", { + firstname = string.lower('%' .. firstname .. '%'), + lastname = string.lower('%' .. lastname .. '%'), + citizenid = string.lower('%' .. query .. '%'), + jobtype = JobType + }) + + local data = {} + for i=1, #result do + local charinfo = json.decode(result[i].charinfo) + local metadata = json.decode(result[i].metadata) + data[i] = { + id = result[i].citizenid, + firstname = charinfo.firstname, + lastname = charinfo.lastname, + profilepic = ProfPic(charinfo.gender, result[i].pfp), + callsign = metadata.callsign + } + end + TriggerClientEvent('mdt:client:incidentSearchPerson', src, data) end end end diff --git a/ui/app.js b/ui/app.js index e0d6c84d..289543ee 100644 --- a/ui/app.js +++ b/ui/app.js @@ -2408,13 +2408,28 @@ $(document).ready(() => { "click", ".manage-reports-new", function () { - //if ($(".manage-bolos-editing-title").html() == 'You are currently creating a new BOLO') { - //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) - //} else { let template = ""; if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { - template = - "

                Submitted to ICU?: [Yes/No]

                Incident Report:

                · [ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]

                List of Injuries:

                · [ State what injury or injuries occurred ]

                Surgical Report:

                · [ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]

                -----

                Attending:

                · [ List Any Attending Here ]

                Medications Applied:

                · [ List Any Attending Here ]

                -----



                Notes:

                [ Additional Notes Here ]

                "} + template = ` +
                +

                Submitted to ICU?: [Yes/No]

                +

                Incident Report:

                +

                · [ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]

                +

                List of Injuries:

                +

                · [ State what injury or injuries occurred ]

                +

                Surgical Report:

                +

                · [ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]

                +

                -----

                +

                Attending:

                +

                · [ List Any Attending Here ]

                +

                Medications Applied:

                +

                · [ List Any Attending Here ]

                +

                -----

                +
                +

                Notes:

                +

                [ Additional Notes Here ]

                +
                +`;} $(".manage-reports-editing-title").html( "You are currently creating a new report" ); From 1281915d9c2d03ced3dffd5faeec7906221ff5f4 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Sun, 23 Apr 2023 20:08:13 +0200 Subject: [PATCH 243/381] Forgot to add job local for got to add job local to work with IsPoliceOrEms(job) --- server/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 829f3baf..4ec8b749 100644 --- a/server/main.lua +++ b/server/main.lua @@ -80,6 +80,7 @@ AddEventHandler('playerDropped', function(reason) local src = source local PlayerData = GetPlayerData(src) local time = os.date("%Y-%m-%d %H:%M:%S") + local job = PlayerData.job.name local firstName = PlayerData.charinfo.firstname:sub(1,1):upper()..PlayerData.charinfo.firstname:sub(2) local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) @@ -1779,4 +1780,4 @@ function format_time(time) formattedTime = formattedTime .. string.format("%d second%s", seconds, seconds == 1 and "" or "s") end return formattedTime -end \ No newline at end of file +end From ed5e54b62627a580b262f522fa6b5eacc6df77cd Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 23 Apr 2023 14:03:24 +0200 Subject: [PATCH 244/381] addition to the fine button in incidents addition to the fine button in incidents --- README.md | 21 +++++++++++++++++++++ client/main.lua | 4 ++-- server/main.lua | 32 +++++++++++++++++++++++++++++--- ui/app.js | 7 ++++--- ui/img/citation.png | Bin 0 -> 5502 bytes ui/style.css | 5 +++-- 6 files changed, 59 insertions(+), 10 deletions(-) create mode 100644 ui/img/citation.png diff --git a/README.md b/README.md index 1270b93a..f4145ced 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,27 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl * Download ZIP * Drag and drop resource into your server files, make sure to remove -main in the folder name * Run the attached SQL script (mdt.sql) +* Add the following code to [qb-core](https://github.com/qbcore-framework/qb-core) shared > items.lua: +``` + ['ps-mdt:citation'] = {['name'] = 'ps-mdt:citation', ['label'] = 'Citation', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'citation.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Citation from a Police Officer!'}, +``` +* Then add this: +``` + } else if (itemData.name == "ps-mdt:citation") { + $(".item-info-title").html("

                " + itemData.label + "

                "); + $(".item-info-description").html('

                Citizen ID: ' + itemData.info.citizenId + '

                Fine: ' + itemData.info.fine + '

                Citation Date: ' + itemData.info.date + '

                Incident ID: ' + itemData.info.incidentId + '

                Involved Officer: ' + itemData.info.officer + '

                '); +``` +* to your inventory (qb/lj) script under +``` + } else if (itemData.name == "markedbills") { + $(".item-info-title").html("

                " + itemData.label + "

                "); + $(".item-info-description").html( + "

                Worth: $" + + itemData.info.worth + + "

                " + ); +``` +* Put the citation.png which is found in ui > img into inventory > html > images * Start resource through server.cfg * Restart your server. diff --git a/client/main.lua b/client/main.lua index c138c878..8dff622b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -390,7 +390,7 @@ end) -- Uses the QB-Core bill command to send a fine to a player -- If you use a different fine system, you will need to change this RegisterNUICallback("sendFine", function(data, cb) - local citizenId, fine = data.citizenId, data.fine + local citizenId, fine, incidentId = data.citizenId, data.fine, data.incidentId -- Gets the player id from the citizenId local p = promise.new() @@ -403,7 +403,7 @@ RegisterNUICallback("sendFine", function(data, cb) if fine > 0 then if Config.BillVariation then -- Uses QB-Core removeMoney Functions - TriggerServerEvent("mdt:server:removeMoney", citizenId, fine) + TriggerServerEvent("mdt:server:removeMoney", citizenId, fine, incidentId) else -- Uses QB-Core /bill command ExecuteCommand(('bill %s %s'):format(targetSourceId, fine)) diff --git a/server/main.lua b/server/main.lua index 4ec8b749..b19450d7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -7,6 +7,7 @@ local activeUnits = {} local impound = {} local dispatchMessages = {} local isDispatchRunning = false +local antiSpam = false local function GetActiveData(cid) local player = type(cid) == "string" and cid or tostring(cid) @@ -1712,11 +1713,36 @@ RegisterNetEvent('mdt:server:registerweapon', function(serial, imageurl, notes, exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) end) -RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine) +RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine, incidentId) local src = source local Player = QBCore.Functions.GetPlayerByCitizenId(citizenId) - TriggerClientEvent('QBCore:Notify', Player, fine.."$ were removed from your Bank Account.") - Player.Functions.RemoveMoney('bank', fine, 'lspd-fine') + local Officer = QBCore.Functions.GetPlayer(src) + local fullname = '(' .. Officer.PlayerData.metadata.callsign .. ') ' .. Officer.PlayerData.charinfo.firstname .. ' ' .. Officer.PlayerData.charinfo.lastname + if not antiSpam then + local date = os.date("%Y-%m-%d %H:%M") + if Player.Functions.RemoveMoney('bank', fine, 'lspd-fine') then + TriggerClientEvent('QBCore:Notify', src, citizenId.." got a Citation!") + TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, fine.."$ were removed from your Bank Account.") + local info = { + citizenId = citizenId, + fine = "$"..fine, + date = date, + incidentId = "#"..incidentId, + officer = fullname, + } + Player.Functions.AddItem('ps-mdt:citation', 1, false, info) + TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['ps-mdt:citation'], "add") + TriggerEvent('mdt:server:AddLog', "A Fine was writen by "..fullname.." and was sent to "..citizenId..", the Amount was $".. fine ..". (ID: "..incidentId.. ")") + else + TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, "Something went wrong!") + end + antiSpam = true + SetTimeout(60000, function() + antiSpam = false + end) + else + TriggerClientEvent('QBCore:Notify', src, "On Cooldown!") + end end) function getTopOfficers(callback) diff --git a/ui/app.js b/ui/app.js index 289543ee..59bc95cf 100644 --- a/ui/app.js +++ b/ui/app.js @@ -1948,7 +1948,8 @@ $(document).ready(() => { const citizenId = $(this).data("id"); const fine = $(".fine-amount").filter(`[data-id=${citizenId}]`).val(); const recommendFine = $(".fine-recommended-amount").filter(`[data-id=${citizenId}]`).val(); - sendFine(citizenId, fine, recommendFine); + const incidentId = $(".manage-incidents-editing-title").data("id"); + sendFine(citizenId, fine, recommendFine, incidentId); }); $('.incidents-ghost-holder').on('click', '#community-service-button', function() { @@ -5411,15 +5412,15 @@ function sendToCommunityService(citizenId, customSentence, recommendedSentence) // Use the customFine if defined, otherwise use the recommendedFine // This uses the assumption that customFine will be 0 if not defined -function sendFine(citizenId, customFine, recommendedFine) { +function sendFine(citizenId, customFine, recommendedFine, incidentId) { const fine = Number(customFine) || Number(recommendedFine); $.post(`https://${GetParentResourceName()}/sendFine`, JSON.stringify({ citizenId, fine, + incidentId, })); } - // Context menu var menu = document.querySelector(".contextmenu"); diff --git a/ui/img/citation.png b/ui/img/citation.png new file mode 100644 index 0000000000000000000000000000000000000000..2e453072f5d7905c5801e966e9d2bc1c1c9d60fc GIT binary patch literal 5502 zcmV-^6@luBP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D6%$EBK~#8N?OkVc zTUUC1&?^BF0IMictP)i$xvY1+UU?mRCdpse$)8ES=D%bnnPevMhs|s@yLN2LvSq7F zmMD>60UHX@Tb}1!KmsXIqGSo+5O_34_uPBRy*TfA+i64(J@n8+4?XnILk~Ul&_fU1 z4O`>-R#C6l!@T^nb@yW2ymJ%9-5f?IPNI}AU~6X^4x0o1fEUr&FtX_#WQzq<%XQT4 zHaKl{)T%Xv`UkL{NWklMV{U#H8|y3B*h-;PtHNz_A{L9Hn9n1?d_&Oz{&0KajR)dC zY&P4!H{xwWy9hGIOWeA9F~0xtD)PxR9<3y>yPLs08`oyHlL&d7otwkI{mZ}N%%w}n zrFIY;io#YXBe|W%XMg)Su3fu=?d@G$ICmQV`#*od*vSd(q%!FDdr>SEQLEc9MneDk zgZBd0hvVdED$oGw%Kr|8|Q7Yt+9pv*x z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6_wOJQ9mctZc{8`MLKAd2HfUCz*X7{VY`FN&1yfF9 zh-FQ@iRLq1pTb%JFTcXvHOk20`{RHA(af=okB>3^DZ!LSdkxF&aP4AayZ;emMgO*iALMV_sL|><*E&633(E zI9zP}(a{(Zo7={74g~$kWU}nZ6isX_uQz~9dI$bc7+dR`7>I?A;3B^{%xTy&b8}`Yc|W>h3U^IYxOZO`1I4?n!Sajjrn4UDiO106#BuA;nL&BxcdDM zCbv$`u2a;xoDLKVIZ8+uylyA9lWB~M4r8>XqjZ&HsJ|y@cGE?&f^mp{Sjg;~?1o5TM|wBD2;ga1q7`F}Z>=hb?XK zy3lx)#Nn$Vkw|oGq1=(+5PgOYH?u~3tv`*YKcDwYdy6ckh|a z{YMcRTs-!py}ZP)UAtzy;}=1`gS_Rv&}Z%yJ%@V2p015LuZpfv>XPM$k>?_Yjz?;S zY$lEC*M7v^JNNML=S3ve*XhgL!=s-cnm^*QL0{(KgNIm-uk0zO@H+aV(`XxqFvPXp zxYbg69;Ap{tszYo$$69stTTVL5JJy1nCSC*%n`3f`O}ip8H}yiU)NzF&SJ+n)*|cB zf8hQIp(B6bzK0%q=%I%mdg!5t9(w4Zhpq8E(tS1^@s607*qoM6N<$g0qmZ AH2?qr literal 0 HcmV?d00001 diff --git a/ui/style.css b/ui/style.css index 203f1e1e..bd37686a 100644 --- a/ui/style.css +++ b/ui/style.css @@ -2820,8 +2820,7 @@ span.tag-incident-input[contenteditable]:empty::before { } .associated-incidents-controls { - display: flex; - justify-content: space-evenly; + justify-content: inherit; width: 90%; margin-top: 5px; margin-bottom: 15px; @@ -2830,6 +2829,8 @@ span.tag-incident-input[contenteditable]:empty::before { .control-button { text-align: center; background-color: var(--color-4); + border: 2px solid var(--color-3); + margin-bottom: 10px; padding: 10px; } From a3eba691f12de2b6b7577bb786e8e2d73c50bcc7 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 27 Apr 2023 04:36:48 -0400 Subject: [PATCH 245/381] Updated Read me, verified code --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index f4145ced..511e7555 100644 --- a/README.md +++ b/README.md @@ -13,29 +13,6 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl * Download ZIP * Drag and drop resource into your server files, make sure to remove -main in the folder name * Run the attached SQL script (mdt.sql) -* Add the following code to [qb-core](https://github.com/qbcore-framework/qb-core) shared > items.lua: -``` - ['ps-mdt:citation'] = {['name'] = 'ps-mdt:citation', ['label'] = 'Citation', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'citation.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Citation from a Police Officer!'}, -``` -* Then add this: -``` - } else if (itemData.name == "ps-mdt:citation") { - $(".item-info-title").html("

                " + itemData.label + "

                "); - $(".item-info-description").html('

                Citizen ID: ' + itemData.info.citizenId + '

                Fine: ' + itemData.info.fine + '

                Citation Date: ' + itemData.info.date + '

                Incident ID: ' + itemData.info.incidentId + '

                Involved Officer: ' + itemData.info.officer + '

                '); -``` -* to your inventory (qb/lj) script under -``` - } else if (itemData.name == "markedbills") { - $(".item-info-title").html("

                " + itemData.label + "

                "); - $(".item-info-description").html( - "

                Worth: $" + - itemData.info.worth + - "

                " - ); -``` -* Put the citation.png which is found in ui > img into inventory > html > images -* Start resource through server.cfg -* Restart your server. # Weapon Info Export @@ -72,9 +49,32 @@ Config.MugPhotos = 1 -- Images for mug shots will be uploaded here. Add a Discord webhook. Config.Webhook = '' ``` +# Fine & Citation via item + +* Add the item to your 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!'}, +``` +* Add the below code to your inventory > app.js. Should be somewhere around markedbills, see below for reference. +``` + } else if (itemData.name == "mdtcitation") { + $(".item-info-title").html("

                " + itemData.label + "

                "); + $(".item-info-description").html( + '

                Citizen ID: ' + itemData.info.citizenId + '

                ' + + '

                Fine: ' + itemData.info.fine + '

                ' + + '

                Citation Date: ' + itemData.info.date + '

                ' + + '

                Incident ID: ' + itemData.info.incidentId + '

                ' + + '

                Involved Officer: ' + itemData.info.officer + '

                ' + ); +``` +!image here # Clock In/Out & Leaderboard * Triggers when officers Toggle Duty from inside the mdt. +* Create a Discord Webhook and paste it on your config.lua +``` +Config.ClockinWebhook +``` ![image](https://user-images.githubusercontent.com/82112471/228130546-6366ed1e-f5a8-428c-8680-0c384d2cff52.png) ![image](https://user-images.githubusercontent.com/82112471/228330602-1a914461-5d61-4e12-80d4-154c8da3dee1.png) From 8914e436cfc155e87f2f95243e59f9f141407d60 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 27 Apr 2023 04:39:47 -0400 Subject: [PATCH 246/381] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 511e7555..c92b698d 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,9 @@ Config.Webhook = '' '

                Involved Officer: ' + itemData.info.officer + '

                ' ); ``` -!image here +* Reference for proper placement. + +![image](https://user-images.githubusercontent.com/82112471/234807680-c943fac6-0da7-42f4-b815-d85769fe3779.png) # Clock In/Out & Leaderboard * Triggers when officers Toggle Duty from inside the mdt. From f5ce2797f018a09af723393e7679afbc2e79070d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 27 Apr 2023 04:40:27 -0400 Subject: [PATCH 247/381] 2.4.7 --- fxmanifest.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 4a489a15..ce3e4302 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.4.5' +version '2.4.7' lua54 'yes' @@ -29,4 +29,4 @@ files { 'ui/dashboard.html', 'ui/app.js', 'ui/style.css', -} \ No newline at end of file +} From 0809f1488d965d1fa7f99b5c0c4dd2c284d1719c Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 27 Apr 2023 05:11:27 -0400 Subject: [PATCH 248/381] Changed language and item name --- server/main.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/main.lua b/server/main.lua index b19450d7..67083bda 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1721,8 +1721,8 @@ RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine, incidentId) if not antiSpam then local date = os.date("%Y-%m-%d %H:%M") if Player.Functions.RemoveMoney('bank', fine, 'lspd-fine') then - TriggerClientEvent('QBCore:Notify', src, citizenId.." got a Citation!") - TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, fine.."$ were removed from your Bank Account.") + TriggerClientEvent('QBCore:Notify', src, citizenId.." received a citation!") + TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, fine.."$ was removed from your bank!") local info = { citizenId = citizenId, fine = "$"..fine, @@ -1730,8 +1730,8 @@ RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine, incidentId) incidentId = "#"..incidentId, officer = fullname, } - Player.Functions.AddItem('ps-mdt:citation', 1, false, info) - TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['ps-mdt:citation'], "add") + Player.Functions.AddItem('mdtcitation', 1, false, info) + TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['mdtcitation'], "add") TriggerEvent('mdt:server:AddLog', "A Fine was writen by "..fullname.." and was sent to "..citizenId..", the Amount was $".. fine ..". (ID: "..incidentId.. ")") else TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, "Something went wrong!") @@ -1741,7 +1741,7 @@ RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine, incidentId) antiSpam = false end) else - TriggerClientEvent('QBCore:Notify', src, "On Cooldown!") + TriggerClientEvent('QBCore:Notify', src, "On cooldown!") end end) From 794c4dc2dfd76a90bc6b884ec479bc09e922b8f2 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 29 Apr 2023 12:48:48 +0200 Subject: [PATCH 249/381] webhook error fix - added prints so people know when missing a webhook --- client/cl_mugshot.lua | 16 ++++++++++++---- server/main.lua | 32 ++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua index f3a47e6b..30c77954 100644 --- a/client/cl_mugshot.lua +++ b/client/cl_mugshot.lua @@ -17,10 +17,18 @@ local MugShots = {} -- Mugshot functions local function TakeMugShot() - exports['screenshot-basic']:requestScreenshotUpload(Config.Webhook, 'files[]', {encoding = 'jpg'}, function(data) - local resp = json.decode(data) - table.insert(MugshotArray, resp.attachments[1].url) - end) + if Config.Webhook == '' then + print("-----------------------------") + print(" ") + print("ADD A WEBHOOK TO: Config.Webhook") + print(" ") + print("-----------------------------") + else + exports['screenshot-basic']:requestScreenshotUpload(Config.Webhook, 'files[]', {encoding = 'jpg'}, function(data) + local resp = json.decode(data) + table.insert(MugshotArray, resp.attachments[1].url) + end) + end end local function PhotoProcess(ped) diff --git a/server/main.lua b/server/main.lua index 67083bda..826e74ca 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1770,18 +1770,26 @@ AddEventHandler("mdt:requestOfficerData", function() end) function sendToDiscord(color, name, message, footer) - local embed = { - { - color = color, - title = "**".. name .."**", - description = message, - footer = { - text = footer, - }, - } - } - - PerformHttpRequest(Config.ClockinWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + if Config.ClockinWebhook == '' then + print("-----------------------------") + print(" ") + print("ADD A WEBHOOK TO: Config.ClockinWebhook") + print(" ") + print("-----------------------------") + else + local embed = { + { + color = color, + title = "**".. name .."**", + description = message, + footer = { + text = footer, + }, + } + } + + PerformHttpRequest(Config.ClockinWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + end end function format_time(time) From 7080298e0c3745a7648ffd2a4ecc1958133f58e1 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 29 Apr 2023 13:01:05 +0200 Subject: [PATCH 250/381] smaller prints smaller prints --- client/cl_mugshot.lua | 6 +----- server/main.lua | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua index 30c77954..b29b84aa 100644 --- a/client/cl_mugshot.lua +++ b/client/cl_mugshot.lua @@ -18,11 +18,7 @@ local MugShots = {} local function TakeMugShot() if Config.Webhook == '' then - print("-----------------------------") - print(" ") - print("ADD A WEBHOOK TO: Config.Webhook") - print(" ") - print("-----------------------------") + print("A webhook is missing in: Config.Webhook") else exports['screenshot-basic']:requestScreenshotUpload(Config.Webhook, 'files[]', {encoding = 'jpg'}, function(data) local resp = json.decode(data) diff --git a/server/main.lua b/server/main.lua index 826e74ca..f0e7d876 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1771,11 +1771,7 @@ end) function sendToDiscord(color, name, message, footer) if Config.ClockinWebhook == '' then - print("-----------------------------") - print(" ") - print("ADD A WEBHOOK TO: Config.ClockinWebhook") - print(" ") - print("-----------------------------") + print("A webhook is missing in: Config.ClockinWebhook") else local embed = { { From 34763c762e507636341f42bfdbeef2bf86778e60 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 29 Apr 2023 13:21:18 +0200 Subject: [PATCH 251/381] added color for prints added color for prints --- client/cl_mugshot.lua | 2 +- server/main.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua index b29b84aa..4f214db4 100644 --- a/client/cl_mugshot.lua +++ b/client/cl_mugshot.lua @@ -18,7 +18,7 @@ local MugShots = {} local function TakeMugShot() if Config.Webhook == '' then - print("A webhook is missing in: Config.Webhook") + print("^1A webhook is missing in: Config.Webhook") else exports['screenshot-basic']:requestScreenshotUpload(Config.Webhook, 'files[]', {encoding = 'jpg'}, function(data) local resp = json.decode(data) diff --git a/server/main.lua b/server/main.lua index f0e7d876..02e5201c 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1771,7 +1771,7 @@ end) function sendToDiscord(color, name, message, footer) if Config.ClockinWebhook == '' then - print("A webhook is missing in: Config.ClockinWebhook") + print("\27[31mA webhook is missing in: Config.ClockinWebhook\27[0m") else local embed = { { From c1833bd714484309d959bf45337866a6664a41c5 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 29 Apr 2023 13:45:13 +0200 Subject: [PATCH 252/381] added prints for onResourceStart added prints for onResourceStart --- server/main.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/main.lua b/server/main.lua index 02e5201c..d43ed257 100644 --- a/server/main.lua +++ b/server/main.lua @@ -68,6 +68,16 @@ if Config.UseWolfknightRadar == true then end) end +AddEventHandler('onResourceStart', function(resourceName) + if GetCurrentResourceName() ~= resourceName then return end + if Config.Webhook == '' then + print("\27[31mA webhook is missing in: Config.Webhook\27[0m") + end + if Config.ClockinWebhook == '' then + print("\27[31mA webhook is missing in: Config.ClockinWebhook\27[0m") + end +end) + RegisterNetEvent("ps-mdt:server:OnPlayerUnload", function() --// Delete player from the MDT on logout local src = source From f19cca665490c76156c2a813298df082743309b3 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 29 Apr 2023 13:52:58 +0200 Subject: [PATCH 253/381] added wait(3000) to be ad the bottom added wait(3000) to be ad the bottom --- server/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/server/main.lua b/server/main.lua index d43ed257..8f030154 100644 --- a/server/main.lua +++ b/server/main.lua @@ -70,6 +70,7 @@ end AddEventHandler('onResourceStart', function(resourceName) if GetCurrentResourceName() ~= resourceName then return end + Wait(3000) if Config.Webhook == '' then print("\27[31mA webhook is missing in: Config.Webhook\27[0m") end From e448c414919310bd78af7dbda817b788ef58e0a6 Mon Sep 17 00:00:00 2001 From: Gnavling <69698024+Gnavling@users.noreply.github.com> Date: Sun, 30 Apr 2023 20:01:50 +0200 Subject: [PATCH 254/381] Fixed wrong classes in Config.PenalCode Misdemeanor Possession of Marijuana (P.C.7001) class changed from "Mask" to "Misdemeanor" Misdemeanor Possession of Oxy/Vicodin (P.C.7012) class changed from "Felony" to "Misdemeanor" --- shared/config.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index 70ca8cab..111140aa 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -242,7 +242,7 @@ Config.PenalCode = { [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green', description = 'When someone willingly hides another who is wanted by the authorities'}, }, [7] = { - [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Mask', id = 'P.C. 7001', months = 5, fine = 250, color = 'green', description = 'The possession of a quantity of marijuana in the amount of less the 4 blunts'}, + [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Misdemeanor', id = 'P.C. 7001', months = 5, fine = 250, color = 'green', description = 'The possession of a quantity of marijuana in the amount of less the 4 blunts'}, [2] = {title = 'Felony manufacturing of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'red', description = 'The possession of a quantity of marijuana that is from manufacturing'}, [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green', description = 'The possession of 4 or less marijuana plants'}, [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange', description = 'The possession of 5 or more marijuana plants'}, @@ -253,7 +253,7 @@ Config.PenalCode = { [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green', description = 'The possession of methamphetamine in a small quantity usually for personal use'}, [10] = {title = 'Felony manufacturing Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of methamphetamine that is from manufacturing'}, [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Methamphetamine for distribution'}, - [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7012', months = 7, fine = 500, color = 'green', description = 'The possession of oxy / vicodin in a small quantity usually for personal use without prescription'}, + [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Misdemeanor', id = 'P.C. 7012', months = 7, fine = 500, color = 'green', description = 'The possession of oxy / vicodin in a small quantity usually for personal use without prescription'}, [13] = {title = 'Felony manufacturing Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of oxy / vicodin that is from manufacturing'}, [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of oxy / vicodin for distribution'}, [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green', description = 'The possession of ecstasy in a small quantity usually for personal use'}, @@ -704,4 +704,4 @@ function GetJobType(job) else return nil end -end \ No newline at end of file +end From 817b97c9bf66621d31eae3faf5f7812e01e8c101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Alves?= Date: Mon, 1 May 2023 21:56:10 +0100 Subject: [PATCH 255/381] await updated clockout time --- server/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/main.lua b/server/main.lua index 8f030154..1aff13b7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -98,7 +98,7 @@ AddEventHandler('playerDropped', function(reason) -- Auto clock out if the player is off duty if IsPoliceOrEms(job) and PlayerData.job.onduty then - MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + MySQL.query.await('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { ['@user_id'] = PlayerData.citizenid }) @@ -183,7 +183,7 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() sendToDiscord(65280, "MDT Clock-In", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **On Duty**', "ps-mdt | Made by Project Sloth") else TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') - MySQL.query('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + MySQL.query.await('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { ['@user_id'] = PlayerData.citizenid }) From b35e4626b0d6ea2fc2b4bdc948f3a5cce15ee451 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 3 May 2023 19:16:38 -0400 Subject: [PATCH 256/381] Fixed fingerprint appearing before selecting profile Fixed fingerprint appearing before selecting profile Renamed Config to Mugshot webhook --- README.md | 2 +- client/cl_mugshot.lua | 6 +++--- client/main.lua | 4 ++-- server/main.lua | 6 +++--- shared/config.lua | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c92b698d..338d8b6c 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Config.MugPhotos = 1 * Create a Discord Webhook and paste it here: (Line 11 in Config.lua) ```lua -- Images for mug shots will be uploaded here. Add a Discord webhook. -Config.Webhook = '' +Config.MugShotWebhook = '' ``` # Fine & Citation via item diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua index 4f214db4..50f7a1d4 100644 --- a/client/cl_mugshot.lua +++ b/client/cl_mugshot.lua @@ -17,10 +17,10 @@ local MugShots = {} -- Mugshot functions local function TakeMugShot() - if Config.Webhook == '' then - print("^1A webhook is missing in: Config.Webhook") + if Config.MugShotWebhook == '' then + print("^1A webhook is missing in: Config.MugShotWebhook") else - exports['screenshot-basic']:requestScreenshotUpload(Config.Webhook, 'files[]', {encoding = 'jpg'}, function(data) + exports['screenshot-basic']:requestScreenshotUpload(Config.MugShotWebhook, 'files[]', {encoding = 'jpg'}, function(data) local resp = json.decode(data) table.insert(MugshotArray, resp.attachments[1].url) end) diff --git a/client/main.lua b/client/main.lua index 8dff622b..f50de0e0 100644 --- a/client/main.lua +++ b/client/main.lua @@ -288,8 +288,8 @@ RegisterNUICallback("searchProfiles", function(data, cb) end) -RegisterNetEvent('mdt:client:searchProfile', function(sentData, isLimited, fingerprint) - SendNUIMessage({ action = "updateFingerprintData", fingerprint = fingerprint }) +RegisterNetEvent('mdt:client:searchProfile', function(sentData, isLimited) + SendNUIMessage({ action = "updateFingerprintData" }) end) RegisterNUICallback("saveProfile", function(data, cb) diff --git a/server/main.lua b/server/main.lua index 1aff13b7..9fce234a 100644 --- a/server/main.lua +++ b/server/main.lua @@ -71,8 +71,8 @@ end AddEventHandler('onResourceStart', function(resourceName) if GetCurrentResourceName() ~= resourceName then return end Wait(3000) - if Config.Webhook == '' then - print("\27[31mA webhook is missing in: Config.Webhook\27[0m") + if Config.MugShotWebhook == '' then + print("\27[31mA webhook is missing in: Config.MugShotWebhook\27[0m") end if Config.ClockinWebhook == '' then print("\27[31mA webhook is missing in: Config.ClockinWebhook\27[0m") @@ -254,7 +254,7 @@ QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, people[citizenIdIndexMap[conv.cid]].convictions = people[citizenIdIndexMap[conv.cid]].convictions + #charges end end - TriggerClientEvent('mdt:client:searchProfile', src, people, false, people[1].fingerprint) + TriggerClientEvent('mdt:client:searchProfile', src, people, false) return cb(people) end diff --git a/shared/config.lua b/shared/config.lua index 111140aa..612bc3cd 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -8,7 +8,7 @@ Config.UseCQCMugshot = true Config.MugPhotos = 1 -- Images for mug shots will be uploaded here. Add a Discord webhook. -Config.Webhook = '' +Config.MugShotWebhook = '' -- Clock-in notifications for duty. Add a Discord webhook. -- Command /mdtleaderboard, will display top players per clock-in hours. From a6b9af53f5b1f51e94c909797a529b2da9647cd2 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 4 May 2023 13:59:30 -0400 Subject: [PATCH 257/381] Added community service link --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 338d8b6c..efadeb5b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl - [ps-dispatch](https://github.com/Project-Sloth/ps-dispatch) - [oxmysql](https://github.com/overextended/oxmysql) - [qb-apartments](https://github.com/qbcore-framework/qb-apartments) | [Config](https://github.com/Project-Sloth/ps-mdt/blob/0ce2ab88d2ca7b0a49abfb3f7f8939d0769c7b73/shared/config.lua#L3) available to enable or disable. +- [qb-communityservice](https://github.com/Zepherlah/qb-community-service) - If you're planning on sending to community service. # Installation * Download ZIP From 8814d6cf948ce4f6db57ccbe02a99e2f17778cd3 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Fri, 5 May 2023 14:43:44 +0200 Subject: [PATCH 258/381] More quotes :D --- ui/app.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 59bc95cf..441d3d61 100644 --- a/ui/app.js +++ b/ui/app.js @@ -90,8 +90,29 @@ function getFormattedDate(date, prefomattedDate = false, hideYear = false) { var quotes = [ 'Project Sloth On Top!', - 'A Discord rewrite fixes everything.', + 'A Discord rewrite fixes everything...', 'Does anyone even read these?', + 'The best way to predict your future is to create it.', + 'Believe you can and you\'re halfway there.', + 'In three words I can sum up everything I\'ve learned about life: it goes on.', + 'The only way to do great work is to love what you do.', + 'Success is not final, failure is not fatal: it is the courage to continue that counts.', + 'Life is 10% what happens to us and 90% how we react to it.', + 'The only true wisdom is in knowing you know nothing.', + 'If you want to live a happy life, tie it to a goal, not to people or things.', + 'Happiness is not something ready-made. It comes from your own actions.', + 'The greatest glory in living lies not in never falling, but in rising every time we fall.', + 'The only thing necessary for the triumph of evil is for good men to do nothing.', + 'It does not matter how slowly you go as long as you do not stop.', + 'The best time to plant a tree was 20 years ago. The second best time is now.', + 'Believe in yourself and all that you are. Know that there is something inside you that is greater than any obstacle.', + 'Don\'t watch the clock; do what it does. Keep going.', + 'You miss 100% of the shots you don\'t take.', + 'You can\'t go back and change the beginning, but you can start where you are and change the ending.', + 'It\'s not the years in your life that count. It\'s the life in your years.', + 'The greatest glory in living lies not in never falling, but in rising every time we fall.', + 'The two most important days in your life are the day you are born and the day you find out why.', + 'Success is not how high you have climbed, but how you make a positive difference to the world.', ] function randomizeQuote() { From 9240da9594b49eff39cb91ee8a25c2c18a1068c4 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 29 Apr 2023 11:02:56 +0200 Subject: [PATCH 259/381] added text for ,,modify/add charges'' https://youtu.be/Tg_aU1l-eLY --- ui/app.js | 2 ++ ui/style.css | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 441d3d61..a0bd4d96 100644 --- a/ui/app.js +++ b/ui/app.js @@ -2073,6 +2073,7 @@ $(document).ready(() => {
                Processed
                Associated
                +
                Right click below to Add/Modify Charges
                Recommended Fine
                @@ -4891,6 +4892,7 @@ window.addEventListener("message", function (event) {
                Processed
                Associated
                +
                Right click below to Add/Modify Charges
                ${associatedIncidentsContainer}
                ` ); diff --git a/ui/style.css b/ui/style.css index bd37686a..5ced28fb 100644 --- a/ui/style.css +++ b/ui/style.css @@ -2726,6 +2726,18 @@ span.tag-incident-input[contenteditable]:empty::before { background-color: var(--color-5); } +.modify-charges-tipp { + color: white; + font-size: 13px; + font-weight: bolder; + margin: auto; + margin-top: 0px; + margin-bottom: -8px; + width: 95%; + align-items: center; + user-select: none; +} + .associated-incidents-user-tag { text-decoration: none; margin-top: auto; @@ -2744,11 +2756,13 @@ span.tag-incident-input[contenteditable]:empty::before { } .associated-incidents-user-holder { + border: 2px solid #2C537B; + padding: 10px; overflow: auto; margin: auto; margin-top: 10px; margin-bottom: 10px; - width: 95%; + width: 92%; min-height: 3.5vh; max-height: 37vh; user-select: none; From 720fa69d2bc0f0b7fbad0212c003c9b970a9764a Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 30 Apr 2023 10:53:42 +0200 Subject: [PATCH 260/381] added more labels added more labels --- ui/app.js | 4 ++-- ui/dashboard.html | 9 ++++++++- ui/style.css | 9 +++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ui/app.js b/ui/app.js index a0bd4d96..7de381a2 100644 --- a/ui/app.js +++ b/ui/app.js @@ -2073,7 +2073,7 @@ $(document).ready(() => {
                Processed
                Associated
                -
                Right click below to Add/Modify Charges
                +
                Right click below to Add/Modify Charges
                Recommended Fine
                @@ -4892,7 +4892,7 @@ window.addEventListener("message", function (event) {
                Processed
                Associated
                -
                Right click below to Add/Modify Charges
                +
                Right click below to Add/Modify Charges
                ${associatedIncidentsContainer}
                ` ); diff --git a/ui/dashboard.html b/ui/dashboard.html index 8661bffa..5116ae1f 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -200,6 +200,7 @@
                Warrants
                +
                Right click below to view Information
                @@ -216,6 +217,7 @@
                Bulletin Board
                +
                Right click below to remove Item
                @@ -230,9 +232,11 @@
                0
                +
                Right click below to edit Units
                Recent Calls
                +
                Right click below to modify Calls
                @@ -396,6 +400,7 @@
                +
                Right click below to delete Incident
                @@ -502,6 +507,7 @@
                Refresh
                +
                Right click below to delete Report
                @@ -598,6 +604,7 @@
                Refresh
                +
                Right click below to remove BOLOs
                @@ -1030,7 +1037,7 @@
                Dispatch Calls
                - +
                Right click below to modify Calls
                diff --git a/ui/style.css b/ui/style.css index 5ced28fb..f5645eb5 100644 --- a/ui/style.css +++ b/ui/style.css @@ -2726,13 +2726,15 @@ span.tag-incident-input[contenteditable]:empty::before { background-color: var(--color-5); } -.modify-charges-tipp { +.modify-charges-label { color: white; font-size: 13px; font-weight: bolder; + border-bottom: 2px solid #2C537B; + padding: 2px; margin: auto; - margin-top: 0px; - margin-bottom: -8px; + margin-top: 4px; + margin-bottom: -3px; width: 95%; align-items: center; user-select: none; @@ -2756,7 +2758,6 @@ span.tag-incident-input[contenteditable]:empty::before { } .associated-incidents-user-holder { - border: 2px solid #2C537B; padding: 10px; overflow: auto; margin: auto; From 6425291105221c0d7cf0505119dca3b770edaf76 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 5 May 2023 14:10:12 -0400 Subject: [PATCH 261/381] Reduced where info is added and replaced favicon --- ui/app.js | 4 ++-- ui/dashboard.html | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ui/app.js b/ui/app.js index 7de381a2..ea462e66 100644 --- a/ui/app.js +++ b/ui/app.js @@ -2073,7 +2073,7 @@ $(document).ready(() => {
                Processed
                Associated
                -
                Right click below to Add/Modify Charges
                +
                Right click below to add and/or modify charges.
                Recommended Fine
                @@ -4892,7 +4892,7 @@ window.addEventListener("message", function (event) {
                Processed
                Associated
                -
                Right click below to Add/Modify Charges
                +
                Right click below to add and/or modify charges.
                ${associatedIncidentsContainer}
                ` ); diff --git a/ui/dashboard.html b/ui/dashboard.html index 5116ae1f..df87fbdb 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -200,7 +200,6 @@
                Warrants
                -
                Right click below to view Information
                @@ -217,7 +216,6 @@
                Bulletin Board
                -
                Right click below to remove Item
                @@ -232,11 +230,9 @@
                0
                -
                Right click below to edit Units
                Recent Calls
                -
                Right click below to modify Calls
                @@ -400,7 +396,7 @@
                -
                Right click below to delete Incident
                +
                Right click below to delete incident.
                @@ -507,7 +503,7 @@
                Refresh
                -
                Right click below to delete Report
                +
                Right click below to delete report.
                @@ -604,7 +600,6 @@
                Refresh
                -
                Right click below to remove BOLOs
                @@ -1037,7 +1032,6 @@
                Dispatch Calls
                -
                Right click below to modify Calls
                From 16d1e6a8d3e1362ec511e957c31ed2ebcc637ab6 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 5 May 2023 14:14:51 -0400 Subject: [PATCH 262/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index ce3e4302..860fdc00 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.4.7' +version '2.4.9' lua54 'yes' From 1b65c229491c340d21f5b60cadc83943d5afaeb8 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Sun, 14 May 2023 23:49:46 -0700 Subject: [PATCH 263/381] add citation item even on bill --- client/main.lua | 1 + server/main.lua | 44 +++++++++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/client/main.lua b/client/main.lua index f50de0e0..9860d47b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -407,6 +407,7 @@ RegisterNUICallback("sendFine", function(data, cb) else -- Uses QB-Core /bill command ExecuteCommand(('bill %s %s'):format(targetSourceId, fine)) + TriggerServerEvent("mdt:server:giveCitationItem", citizenId, fine, incidentId) end end end) diff --git a/server/main.lua b/server/main.lua index 9fce234a..fb33ee39 100644 --- a/server/main.lua +++ b/server/main.lua @@ -46,7 +46,6 @@ if Config.UseWolfknightRadar == true then local bolo, title, boloId = GetBoloStatus(plate) local warrant, owner, incidentId = GetWarrantStatus(plate) local driversLicense = PlayerData.metadata['licences'].driver - local driverunlicensed = nil if bolo == true then TriggerClientEvent('QBCore:Notify', src, 'BOLO ID: '..boloId..' | Title: '..title..' | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) @@ -1724,26 +1723,35 @@ RegisterNetEvent('mdt:server:registerweapon', function(serial, imageurl, notes, exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) end) +local function giveCitationItem(src, citizenId, fine, incidentId) + local Player = QBCore.Functions.GetPlayerByCitizenId(citizenId) + local PlayerName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + local Officer = QBCore.Functions.GetPlayer(src) + local OfficerFullName = '(' .. Officer.PlayerData.metadata.callsign .. ') ' .. Officer.PlayerData.charinfo.firstname .. ' ' .. Officer.PlayerData.charinfo.lastname + + local date = os.date("%Y-%m-%d %H:%M") + local info = { + citizenId = citizenId, + fine = "$"..fine, + date = date, + incidentId = "#"..incidentId, + officer = OfficerFullName, + } + Player.Functions.AddItem('mdtcitation', 1, false, info) + TriggerClientEvent('QBCore:Notify', src, PlayerName.." received a citation!") + TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['mdtcitation'], "add") + TriggerEvent('mdt:server:AddLog', "A Fine was writen by "..OfficerFullName.." and was sent to "..PlayerName..", the Amount was $".. fine ..". (ID: "..incidentId.. ")") +end + +-- Removes money from the players bank and gives them a citation item RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine, incidentId) local src = source local Player = QBCore.Functions.GetPlayerByCitizenId(citizenId) - local Officer = QBCore.Functions.GetPlayer(src) - local fullname = '(' .. Officer.PlayerData.metadata.callsign .. ') ' .. Officer.PlayerData.charinfo.firstname .. ' ' .. Officer.PlayerData.charinfo.lastname + if not antiSpam then - local date = os.date("%Y-%m-%d %H:%M") if Player.Functions.RemoveMoney('bank', fine, 'lspd-fine') then - TriggerClientEvent('QBCore:Notify', src, citizenId.." received a citation!") TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, fine.."$ was removed from your bank!") - local info = { - citizenId = citizenId, - fine = "$"..fine, - date = date, - incidentId = "#"..incidentId, - officer = fullname, - } - Player.Functions.AddItem('mdtcitation', 1, false, info) - TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['mdtcitation'], "add") - TriggerEvent('mdt:server:AddLog', "A Fine was writen by "..fullname.." and was sent to "..citizenId..", the Amount was $".. fine ..". (ID: "..incidentId.. ")") + giveCitationItem(src, citizenId, fine, incidentId) else TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, "Something went wrong!") end @@ -1756,6 +1764,12 @@ RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine, incidentId) end end) +-- Gives the player a citation item +RegisterNetEvent('mdt:server:giveCitationItem', function(citizenId, fine, incidentId) + local src = source + giveCitationItem(src, citizenId, fine, incidentId) +end) + function getTopOfficers(callback) local result = {} local query = 'SELECT * FROM mdt_clocking ORDER BY total_time DESC LIMIT 25' From 22a29ff705737c9f42f6dd9e9574c21f4c550cc9 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Sun, 14 May 2023 23:54:57 -0700 Subject: [PATCH 264/381] put driverslicense check behind flag --- server/main.lua | 13 ++++++------- shared/config.lua | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/main.lua b/server/main.lua index fb33ee39..84d6bf9e 100644 --- a/server/main.lua +++ b/server/main.lua @@ -54,16 +54,15 @@ if Config.UseWolfknightRadar == true then TriggerClientEvent('QBCore:Notify', src, 'WANTED - INCIDENT ID: '..incidentId..' | Registered Owner: '..owner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end - if driversLicense == false and vehicleOwner then - TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + if Config.PlateScanForDriversLicense then + if driversLicense == false and vehicleOwner then + TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + end end - - if bolo or warrant or not driversLicense then - - TriggerClientEvent("wk:togglePlateLock", src, cam, true, 1) + if bolo or warrant or (Config.PlateScanForDriversLicense and not driversLicense) then + TriggerClientEvent("wk:togglePlateLock", src, cam, true, 1) end - end) end diff --git a/shared/config.lua b/shared/config.lua index 612bc3cd..41edeefc 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -86,6 +86,7 @@ Config.ImpoundLocations = { Config.UseWolfknightRadar = false Config.WolfknightNotifyTime = 5000 -- How long the notification displays for in milliseconds (30000 = 30 seconds) +Config.PlateScanForDriversLicense = false -- If true, plate scanner will check if the owner of the scanned vehicle has a drivers license -- IMPORTANT: To avoid making excessive database queries, modify this config to true 'CONFIG.use_sonorancad = true' setting in the configuration file located at 'wk_wars2x/config.lua'. -- Enabling this setting will limit plate checks to only those vehicles that have been used by a player. From 1c6a1a1070254842a9e5bf70788fb18ebad14646 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Mon, 15 May 2023 00:05:18 -0700 Subject: [PATCH 265/381] use var for color --- ui/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/style.css b/ui/style.css index f5645eb5..8a8f5603 100644 --- a/ui/style.css +++ b/ui/style.css @@ -5882,7 +5882,7 @@ span.tag-reports-input[contenteditable]:empty::before { width: 92.5%; margin-top: 10px; margin-bottom: 10px; - outline: solid 3px #1B3047; + outline: solid 3px var(--color-4); margin-left: 27px; min-height: 21.5vh; max-height: 21.5vh; @@ -5895,7 +5895,7 @@ span.tag-reports-input[contenteditable]:empty::before { } .respond-calls-input:focus { - outline: solid 3px #1B3047; + outline: solid 3px var(--color-4); } .respond-calls-responses { From f2b216b4396ae8af367d9f5e80a651a58424023a Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Mon, 15 May 2023 00:05:25 -0700 Subject: [PATCH 266/381] add evidence location to template --- ui/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/app.js b/ui/app.js index ea462e66..4f27e097 100644 --- a/ui/app.js +++ b/ui/app.js @@ -774,6 +774,8 @@ $(document).ready(() => {

                 

                🧍 Hostage: [Name Here]

                 

                +

                🗄️ Evidence Location: Stash # | Drawer #

                +

                 

                🔪 Weapons/Items Confiscated:

                · [Insert List Here]

                 

                From 60ce45da95bb636473e1422346baa35b6fa6a733 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Mon, 15 May 2023 19:24:36 -0700 Subject: [PATCH 267/381] pr feedback --- server/main.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/main.lua b/server/main.lua index 84d6bf9e..3d2cd57a 100644 --- a/server/main.lua +++ b/server/main.lua @@ -54,10 +54,8 @@ if Config.UseWolfknightRadar == true then TriggerClientEvent('QBCore:Notify', src, 'WANTED - INCIDENT ID: '..incidentId..' | Registered Owner: '..owner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end - if Config.PlateScanForDriversLicense then - if driversLicense == false and vehicleOwner then - TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) - end + if Config.PlateScanForDriversLicense and driversLicense == false and vehicleOwner then + TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end if bolo or warrant or (Config.PlateScanForDriversLicense and not driversLicense) then From 17f30c6e48ce7dd97bc85b06b90a7837a318e7a9 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Fri, 12 May 2023 11:03:04 +0200 Subject: [PATCH 268/381] Added more Specific Permissions for each Event Added more Specific Permissions for each Event --- server/main.lua | 12 +++---- shared/config.lua | 81 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 6 deletions(-) diff --git a/server/main.lua b/server/main.lua index 3d2cd57a..0ca8f649 100644 --- a/server/main.lua +++ b/server/main.lua @@ -663,8 +663,8 @@ RegisterNetEvent('mdt:server:deleteWeapons', function(id) if id then local src = source local Player = QBCore.Functions.GetPlayer(src) - if Config.LogPerms[Player.PlayerData.job.name] then - if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + if Config.RemoveWeaponsPerms[Player.PlayerData.job.name] then + if Config.RemoveWeaponsPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname MySQL.update("DELETE FROM `mdt_weaponinfo` WHERE id=:id", { id = id }) TriggerEvent('mdt:server:AddLog', "A Weapon Info was deleted by "..fullName.." with the ID ("..id..")") @@ -681,8 +681,8 @@ RegisterNetEvent('mdt:server:deleteReports', function(id) if id then local src = source local Player = QBCore.Functions.GetPlayer(src) - if Config.LogPerms[Player.PlayerData.job.name] then - if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + if Config.RemoveReportPerms[Player.PlayerData.job.name] then + if Config.RemoveReportPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname MySQL.update("DELETE FROM `mdt_reports` WHERE id=:id", { id = id }) TriggerEvent('mdt:server:AddLog', "A Report was deleted by "..fullName.." with the ID ("..id..")") @@ -698,8 +698,8 @@ end) RegisterNetEvent('mdt:server:deleteIncidents', function(id) local src = source local Player = QBCore.Functions.GetPlayer(src) - if Config.LogPerms[Player.PlayerData.job.name] then - if Config.LogPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + if Config.RemoveIncidentPerms[Player.PlayerData.job.name] then + if Config.RemoveIncidentPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname MySQL.update("DELETE FROM `mdt_convictions` WHERE `linkedincident` = :id", {id = id}) MySQL.update("UPDATE `mdt_convictions` SET `warrant` = '0' WHERE `linkedincident` = :id", {id = id}) -- Delete any outstanding warrants from incidents diff --git a/shared/config.lua b/shared/config.lua index 41edeefc..23fd51a6 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -118,6 +118,87 @@ Config.LogPerms = { }, } +Config.RemoveIncidentPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, +} + +Config.RemoveReportPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, +} + +Config.RemoveWeaponsPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, +} + Config.PenalCodeTitles = { [1] = 'OFFENSES AGAINST PERSONS', [2] = 'OFFENSES INVOLVING THEFT', From 5764db1df858734c1b1690f062f506d0ea6bbb63 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 16 May 2023 00:02:25 -0400 Subject: [PATCH 269/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 860fdc00..726268fa 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.4.9' +version '2.5.0' lua54 'yes' From bc3daf7c58c6bbfaad93939c64dedb73db946ceb Mon Sep 17 00:00:00 2001 From: OK1ez <87883296+OK1ez@users.noreply.github.com> Date: Tue, 16 May 2023 14:49:17 +0200 Subject: [PATCH 270/381] Update dispatch map --- ui/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 4f27e097..1c90001b 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5779,7 +5779,7 @@ center: [0, -1024], maxBoundsViscosity: 1.0 }); -var customImageUrl = 'https://i1.lensdump.com/i/gj7atT.png'; +var customImageUrl = 'https://i.imgur.com/EdOZjzF.jpg'; var sw = map.unproject([0, 1024], 3 - 1); var ne = map.unproject([1024, 0], 3 - 1); From 442cb17cbcac9b0553c4c3201312363a3788a994 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sat, 20 May 2023 14:15:11 +0200 Subject: [PATCH 271/381] added print added print https://i.imgur.com/tvWVqOi.png --- server/utils.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/server/utils.lua b/server/utils.lua index ada7ae8f..b40821dc 100644 --- a/server/utils.lua +++ b/server/utils.lua @@ -2,6 +2,7 @@ local QBCore = exports['qb-core']:GetCoreObject() function GetPlayerData(source) local Player = QBCore.Functions.GetPlayer(source) + if Player == nil then print("\27[31mThe following error happened because a Player left the server while joining\27[0m") end return Player.PlayerData end From 9e26375b440330a513ad0dcf729c2a3cc70218d4 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Wed, 24 May 2023 10:10:54 -0400 Subject: [PATCH 272/381] Ox_inv support for getWeaponInfo (#345) * Ox_inv support for getWeaponInfo * Update main.lua --- server/main.lua | 52 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/server/main.lua b/server/main.lua index 0ca8f649..9b077aa4 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1697,22 +1697,42 @@ end) QBCore.Functions.CreateCallback('getWeaponInfo', function(source, cb) local Player = QBCore.Functions.GetPlayer(source) local weaponInfos = {} - for _, item in pairs(Player.PlayerData.items) do - if item.type == "weapon" then - local invImage = ("https://cfx-nui-%s/html/images/%s"):format(Config.InventoryForWeaponsImages, item.image) - if invImage then - local weaponInfo = { - serialnumber = item.info.serie, - owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, - weaponmodel = QBCore.Shared.Items[item.name].label, - weaponurl = invImage, - notes = "Self Registered", - weapClass = "Class 1", - } - table.insert(weaponInfos, weaponInfo) - end - end - end + if Config.InventoryForWeaponsImages == "ox_inventory" then + local inv = exports.ox_inventory:GetInventoryItems(source) + for _, item in pairs(inv) do + if string.find(item.name, "WEAPON_") then + local invImage = ("https://cfx-nui-ox_inventory/web/images/%s.png"):format(item.name) + if invImage then + weaponInfo = { + serialnumber = item.metadata.serial, + owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, + weaponmodel = QBCore.Shared.Items[string.lower(item.name)].label, + weaponurl = invImage, + notes = "Self Registered", + weapClass = "Class 1", + } + break + end + end + end + else -- qb/lj + for _, item in pairs(Player.PlayerData.items) do + if item.type == "weapon" then + local invImage = ("https://cfx-nui-%s/html/images/%s"):format(Config.InventoryForWeaponsImages, item.image) + if invImage then + local weaponInfo = { + serialnumber = item.info.serie, + owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, + weaponmodel = QBCore.Shared.Items[item.name].label, + weaponurl = invImage, + notes = "Self Registered", + weapClass = "Class 1", + } + table.insert(weaponInfos, weaponInfo) + end + end + end + end cb(weaponInfos) end) From 27b92192ecf0c5f9b74e1b15cf1b705dd5d76db6 Mon Sep 17 00:00:00 2001 From: Jacob Bernard Allen Date: Sat, 13 May 2023 22:23:09 -0400 Subject: [PATCH 273/381] attatched unit part 1 --- server/main.lua | 5 ++++- ui/app.js | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/server/main.lua b/server/main.lua index 9b077aa4..bf6fc1d2 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1374,12 +1374,15 @@ end) RegisterNetEvent('mdt:server:callAttach', function(callid) local src = source + local plyState = Player(source).state + local Radio = plyState.radioChannel or 0 local Player = QBCore.Functions.GetPlayer(src) local playerdata = { fullname = Player.PlayerData.charinfo.firstname.. " "..Player.PlayerData.charinfo.lastname, job = Player.PlayerData.job, cid = Player.PlayerData.citizenid, - callsign = Player.PlayerData.metadata.callsign + callsign = Player.PlayerData.metadata.callsign, + radio = Radio } local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' or JobType == 'ambulance' then diff --git a/ui/app.js b/ui/app.js index 1c90001b..8a106454 100644 --- a/ui/app.js +++ b/ui/app.js @@ -4544,12 +4544,11 @@ window.addEventListener("message", function (event) { $(".close-all").css("filter", "brightness(15%)"); $(".dispatch-attached-units-holder").empty(); $.each(table, function (index, value) { - $( - ".dispatch-attached-units-holder" - ).prepend(`
                -
                ${value.job}
                + $(".dispatch-attached-units-holder").prepend( + `
                +
                ${value.job}
                (${value.callsign}) ${value.fullname}
                -
                1
                +
                ${value.channel}
                `); }); setTimeout(() => { From aca850bbe73ee06e9299c4b6a06b8632843ba4d2 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 25 May 2023 12:52:45 +0200 Subject: [PATCH 274/381] Removed print and total error --- server/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils.lua b/server/utils.lua index b40821dc..abb72188 100644 --- a/server/utils.lua +++ b/server/utils.lua @@ -2,7 +2,7 @@ local QBCore = exports['qb-core']:GetCoreObject() function GetPlayerData(source) local Player = QBCore.Functions.GetPlayer(source) - if Player == nil then print("\27[31mThe following error happened because a Player left the server while joining\27[0m") end + if Player == nil then return end -- player not loaded in correctly return Player.PlayerData end From 8e51540d991aab59362e70305d4582db4b861c10 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 25 May 2023 12:53:50 +0200 Subject: [PATCH 275/381] Added check if PlayerData is nil --- server/main.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/main.lua b/server/main.lua index bf6fc1d2..c866a71e 100644 --- a/server/main.lua +++ b/server/main.lua @@ -87,6 +87,8 @@ end) AddEventHandler('playerDropped', function(reason) local src = source local PlayerData = GetPlayerData(src) + if PlayerData == nil then return end -- player not loaded in correctly and dropped early + local time = os.date("%Y-%m-%d %H:%M:%S") local job = PlayerData.job.name local firstName = PlayerData.charinfo.firstname:sub(1,1):upper()..PlayerData.charinfo.firstname:sub(2) From 23021bc0fabbe58a0e5a99a4be8477b64a322eea Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 8 Jun 2023 21:06:45 -0400 Subject: [PATCH 276/381] Update utils.lua --- server/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils.lua b/server/utils.lua index abb72188..00cb4804 100644 --- a/server/utils.lua +++ b/server/utils.lua @@ -2,7 +2,7 @@ local QBCore = exports['qb-core']:GetCoreObject() function GetPlayerData(source) local Player = QBCore.Functions.GetPlayer(source) - if Player == nil then return end -- player not loaded in correctly + if Player == nil then return end -- Player not loaded in correctly return Player.PlayerData end From b4d9aeec8f4075b508ff07e77e8112fd192b2da5 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 8 Jun 2023 21:07:05 -0400 Subject: [PATCH 277/381] Update main.lua --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index c866a71e..559708c1 100644 --- a/server/main.lua +++ b/server/main.lua @@ -87,7 +87,7 @@ end) AddEventHandler('playerDropped', function(reason) local src = source local PlayerData = GetPlayerData(src) - if PlayerData == nil then return end -- player not loaded in correctly and dropped early + if PlayerData == nil then return end -- Player not loaded in correctly and dropped early local time = os.date("%Y-%m-%d %H:%M:%S") local job = PlayerData.job.name From 1895d71ba00b129c1080f945498f1a825ecb208c Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Fri, 2 Jun 2023 09:40:46 +0200 Subject: [PATCH 278/381] added qb-management addition added qb-management addition - added new config lines --- server/main.lua | 3 ++- shared/config.lua | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 559708c1..a7206a88 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1760,7 +1760,8 @@ local function giveCitationItem(src, citizenId, fine, incidentId) officer = OfficerFullName, } Player.Functions.AddItem('mdtcitation', 1, false, info) - TriggerClientEvent('QBCore:Notify', src, PlayerName.." received a citation!") + TriggerClientEvent('QBCore:Notify', src, PlayerName.." (" ..citizenId.. ") received a citation!") + if Config.QBManagementUse then exports['qb-management']:AddMoney(Officer.PlayerData.job.name, fine) end TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['mdtcitation'], "add") TriggerEvent('mdt:server:AddLog', "A Fine was writen by "..OfficerFullName.." and was sent to "..PlayerName..", the Amount was $".. fine ..". (ID: "..incidentId.. ")") end diff --git a/shared/config.lua b/shared/config.lua index 23fd51a6..1aa70eed 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -18,6 +18,10 @@ Config.ClockinWebhook = '' -- If set to false = The fine gets sent as an Invoice to their phone and it us to the player to pay for it, can remain unpaid and ignored. Config.BillVariation = true +-- If set to true (default) = The fine amount is beeing added to the Society Account +-- If set to false = The fine amount is just beeing removed from the player +Config.QBManagementUse = true + -- Set up your inventory to automatically retrieve images when a weapon is registered at a weapon shop or self-registered. -- If you're utilizing lj-inventory's latest version from GitHub, no further modifications are necessary. -- However, if you're using a different inventory system, please refer to the "Inventory Edit | Automatic Add Weapons with images" section in ps-mdt's README. From 7cc5892542572749b3dc18783ccbf1e82283506f Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Fri, 2 Jun 2023 17:40:50 +0200 Subject: [PATCH 279/381] more readability --- server/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index a7206a88..1efeebe6 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1761,7 +1761,9 @@ local function giveCitationItem(src, citizenId, fine, incidentId) } Player.Functions.AddItem('mdtcitation', 1, false, info) TriggerClientEvent('QBCore:Notify', src, PlayerName.." (" ..citizenId.. ") received a citation!") - if Config.QBManagementUse then exports['qb-management']:AddMoney(Officer.PlayerData.job.name, fine) end + if Config.QBManagementUse then + exports['qb-management']:AddMoney(Officer.PlayerData.job.name, fine) + end TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['mdtcitation'], "add") TriggerEvent('mdt:server:AddLog', "A Fine was writen by "..OfficerFullName.." and was sent to "..PlayerName..", the Amount was $".. fine ..". (ID: "..incidentId.. ")") end From 0f26761e1ae0682b8bd25121a258e0f3011b8e40 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 8 Jun 2023 21:08:49 -0400 Subject: [PATCH 280/381] Update config.lua --- shared/config.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index 1aa70eed..3aed0a36 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -18,9 +18,9 @@ Config.ClockinWebhook = '' -- If set to false = The fine gets sent as an Invoice to their phone and it us to the player to pay for it, can remain unpaid and ignored. Config.BillVariation = true --- If set to true (default) = The fine amount is beeing added to the Society Account --- If set to false = The fine amount is just beeing removed from the player -Config.QBManagementUse = true +-- If set to false (default) = The fine amount is just being removed from the player's bank account +-- If set to true = The fine amount is beeing added to the society account after being removed from the player's bank account +Config.QBManagementUse = false -- Set up your inventory to automatically retrieve images when a weapon is registered at a weapon shop or self-registered. -- If you're utilizing lj-inventory's latest version from GitHub, no further modifications are necessary. From 46cb2a2aa0f97002247b8395fabc052b2e3d00b4 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 8 Jun 2023 21:15:46 -0400 Subject: [PATCH 281/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 726268fa..a605d36e 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.0' +version '2.5.1' lua54 'yes' From f1fb95862e4f17f5111b06cc8d61a2678c29fa0d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:18:07 -0400 Subject: [PATCH 282/381] For those who can't read and need more errors --- server/main.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 1efeebe6..c5cc6c49 100644 --- a/server/main.lua +++ b/server/main.lua @@ -342,7 +342,15 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local apartmentData = GetPlayerApartment(target.citizenid) if Config.UsingDefaultQBApartments and apartmentData then - apartmentData = apartmentData[1].label .. ' (' ..apartmentData[1].name..')' + if apartmentData[1] then + apartmentData = apartmentData[1].label .. ' (' ..apartmentData[1].name..')' + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') + print('The citizen does not have an apartment. Set Config.UsingDefaultQBApartments to false.') + end + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') + print('The citizen does not have an apartment. Set Config.UsingDefaultQBApartments to false.') end local person = { From a78f2823d0cfa73a38f35b082e8236c232dd2af1 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:18:27 -0400 Subject: [PATCH 283/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index a605d36e..76bc67d1 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.1' +version '2.5.2' lua54 'yes' From d56f809967d65dca9a2fe6f3509efaa1a0ee4793 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 8 Jul 2023 09:34:50 -0400 Subject: [PATCH 284/381] Added support for ps-housing --- server/main.lua | 55 +++++++++++++++++++++++++++++++++++++---------- shared/config.lua | 1 + 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/server/main.lua b/server/main.lua index c5cc6c49..b10ade71 100644 --- a/server/main.lua +++ b/server/main.lua @@ -341,17 +341,34 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local apartmentData = GetPlayerApartment(target.citizenid) - if Config.UsingDefaultQBApartments and apartmentData then - if apartmentData[1] then - apartmentData = apartmentData[1].label .. ' (' ..apartmentData[1].name..')' - else - TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') - print('The citizen does not have an apartment. Set Config.UsingDefaultQBApartments to false.') - end - else - TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') - print('The citizen does not have an apartment. Set Config.UsingDefaultQBApartments to false.') - end + if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then + local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) + + if propertyData and next(propertyData) then + if propertyData[1] then + apartmentData = propertyData[1].apartment .. ' Apt # (' .. propertyData[1].property_id .. ')' + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have a property.', 'error') + print('The citizen does not have a property. Set Config.UsingPsHousing to false.') + end + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have a property.', 'error') + print('The citizen does not have a property. Set Config.UsingPsHousing to false.') + end + elseif Config.UsingDefaultQBApartments then + apartmentData = GetPlayerApartment(target.citizenid) + if apartmentData then + if apartmentData[1] then + apartmentData = apartmentData[1].label .. ' (' ..apartmentData[1].name..')' + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') + print('The citizen does not have an apartment. Set Config.UsingDefaultQBApartments to false.') + end + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') + print('The citizen does not have an apartment. Set Config.UsingDefaultQBApartments to false.') + end + end local person = { cid = target.citizenid, @@ -1869,3 +1886,19 @@ function format_time(time) end return formattedTime end + +function GetPlayerPropertiesByCitizenId(citizenid) + local properties = {} + + local result = MySQL.Sync.fetchAll("SELECT * FROM properties WHERE owner_citizenid = @citizenid", { + ['@citizenid'] = citizenid + }) + + if result and #result > 0 then + for i = 1, #result do + table.insert(properties, result[i]) + end + end + + return properties +end \ No newline at end of file diff --git a/shared/config.lua b/shared/config.lua index 3aed0a36..6b4ecc94 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -1,5 +1,6 @@ Config = Config or {} +Config.UsingPsHousing = false Config.UsingDefaultQBApartments = true Config.OnlyShowOnDuty = true Config.UseCQCMugshot = true From c78cb8a2e4183a31d7fc3e39e5aca6e03387ba65 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 8 Jul 2023 09:35:14 -0400 Subject: [PATCH 285/381] Added support for ps-housing --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 76bc67d1..9862472a 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.2' +version '2.5.3' lua54 'yes' From b834d1a0b8e8937db8cb1ed5a8e6fe4e2e32c8f5 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 2 Jul 2023 10:22:54 +0200 Subject: [PATCH 286/381] Update cl_mugshot.lua --- client/cl_mugshot.lua | 48 ++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua index 50f7a1d4..8217bc2e 100644 --- a/client/cl_mugshot.lua +++ b/client/cl_mugshot.lua @@ -17,14 +17,12 @@ local MugShots = {} -- Mugshot functions local function TakeMugShot() - if Config.MugShotWebhook == '' then - print("^1A webhook is missing in: Config.MugShotWebhook") - else - exports['screenshot-basic']:requestScreenshotUpload(Config.MugShotWebhook, 'files[]', {encoding = 'jpg'}, function(data) + QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(MugShotWebhook) + exports['screenshot-basic']:requestScreenshotUpload(MugShotWebhook, 'files[]', {encoding = 'jpg'}, function(data) local resp = json.decode(data) table.insert(MugshotArray, resp.attachments[1].url) end) - end + end) end local function PhotoProcess(ped) @@ -192,22 +190,26 @@ RegisterNetEvent('cqc-mugshot:client:trigger', function() end) RegisterNUICallback("sendToJail", function(data, cb) - local citizenId, sentence = data.citizenId, data.sentence - - -- Gets the player id from the citizenId - local p = promise.new() - QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) - p:resolve(result) - end, citizenId) - - local targetSourceId = Citizen.Await(p) - - if sentence > 0 then - if Config.UseCQCMugshot then - TriggerServerEvent('cqc-mugshot:server:triggerSuspect', targetSourceId) + QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(MugShotWebhook) + if MugShotWebhook ~= '' then + local citizenId, sentence = data.citizenId, data.sentence + + -- Gets the player id from the citizenId + local p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) + p:resolve(result) + end, citizenId) + + local targetSourceId = Citizen.Await(p) + + if sentence > 0 then + if Config.UseCQCMugshot then + TriggerServerEvent('cqc-mugshot:server:triggerSuspect', targetSourceId) + end + Citizen.Wait(5000) + -- Uses qb-policejob JailPlayer event + TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence) + end end - Citizen.Wait(5000) - -- Uses qb-policejob JailPlayer event - TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence) - end -end) \ No newline at end of file + end) +end) From bbc55ad044405d80b1c819d7748803e766cae8fa Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 2 Jul 2023 10:23:11 +0200 Subject: [PATCH 287/381] Update main.lua --- server/main.lua | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/server/main.lua b/server/main.lua index b10ade71..7d40a814 100644 --- a/server/main.lua +++ b/server/main.lua @@ -9,6 +9,25 @@ local dispatchMessages = {} local isDispatchRunning = false local antiSpam = false + +-------------------------------- +-- SET YOUR WEHBOOKS IN HERE +-- Images for mug shots will be uploaded here. Add a Discord webhook. +local MugShotWebhook = 'https://discord.com/api/webhooks/1085638589297213591/sEAxIy3FbbatUC_I3-khcnVlJn-zGB8PEy4kJgVOcx9rFXIe4ZEK8_VcJSFXcIi86znf' + +-- Clock-in notifications for duty. Add a Discord webhook. +-- Command /mdtleaderboard, will display top players per clock-in hours. +local ClockinWebhook = 'https://discord.com/api/webhooks/1085638589297213591/sEAxIy3FbbatUC_I3-khcnVlJn-zGB8PEy4kJgVOcx9rFXIe4ZEK8_VcJSFXcIi86znf' +-------------------------------- + +QBCore.Functions.CreateCallback('ps-mdt:server:MugShotWebhook', function(source, cb) + if MugShotWebhook == '' then + print("\27[31mA webhook is missing in: MugShotWebhook (server > main.lua > line 16)\27[0m") + else + cb(MugShotWebhook) + end +end) + local function GetActiveData(cid) local player = type(cid) == "string" and cid or tostring(cid) if player then @@ -67,11 +86,11 @@ end AddEventHandler('onResourceStart', function(resourceName) if GetCurrentResourceName() ~= resourceName then return end Wait(3000) - if Config.MugShotWebhook == '' then - print("\27[31mA webhook is missing in: Config.MugShotWebhook\27[0m") + if MugShotWebhook == '' then + print("\27[31mA webhook is missing in: MugShotWebhook (server > main.lua > line 16)\27[0m") end - if Config.ClockinWebhook == '' then - print("\27[31mA webhook is missing in: Config.ClockinWebhook\27[0m") + if ClockinWebhook == '' then + print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 20)\27[0m") end end) @@ -1845,8 +1864,8 @@ AddEventHandler("mdt:requestOfficerData", function() end) function sendToDiscord(color, name, message, footer) - if Config.ClockinWebhook == '' then - print("\27[31mA webhook is missing in: Config.ClockinWebhook\27[0m") + if ClockinWebhook == '' then + print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 20)\27[0m") else local embed = { { @@ -1859,7 +1878,7 @@ function sendToDiscord(color, name, message, footer) } } - PerformHttpRequest(Config.ClockinWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + PerformHttpRequest(ClockinWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) end end From 6ecac9d231f6e9ebcc39df661c410ca5c71b6ec6 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 2 Jul 2023 10:23:28 +0200 Subject: [PATCH 288/381] Update config.lua --- shared/config.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index 6b4ecc94..a1768091 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -8,13 +8,6 @@ Config.UseCQCMugshot = true -- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. Config.MugPhotos = 1 --- Images for mug shots will be uploaded here. Add a Discord webhook. -Config.MugShotWebhook = '' - --- Clock-in notifications for duty. Add a Discord webhook. --- Command /mdtleaderboard, will display top players per clock-in hours. -Config.ClockinWebhook = '' - -- If set to true = Fine gets automatically removed from bank automatically charging the player. -- If set to false = The fine gets sent as an Invoice to their phone and it us to the player to pay for it, can remain unpaid and ignored. Config.BillVariation = true From c10ea056705dd7b04894716266cd387b00109aff Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 2 Jul 2023 10:23:44 +0200 Subject: [PATCH 289/381] Update main.lua --- server/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/main.lua b/server/main.lua index 7d40a814..18ccdf3f 100644 --- a/server/main.lua +++ b/server/main.lua @@ -13,11 +13,11 @@ local antiSpam = false -------------------------------- -- SET YOUR WEHBOOKS IN HERE -- Images for mug shots will be uploaded here. Add a Discord webhook. -local MugShotWebhook = 'https://discord.com/api/webhooks/1085638589297213591/sEAxIy3FbbatUC_I3-khcnVlJn-zGB8PEy4kJgVOcx9rFXIe4ZEK8_VcJSFXcIi86znf' +local MugShotWebhook = '' -- Clock-in notifications for duty. Add a Discord webhook. -- Command /mdtleaderboard, will display top players per clock-in hours. -local ClockinWebhook = 'https://discord.com/api/webhooks/1085638589297213591/sEAxIy3FbbatUC_I3-khcnVlJn-zGB8PEy4kJgVOcx9rFXIe4ZEK8_VcJSFXcIi86znf' +local ClockinWebhook = '' -------------------------------- QBCore.Functions.CreateCallback('ps-mdt:server:MugShotWebhook', function(source, cb) From daeafdf94ddb5bdbdeffc726368a4d74353ea237 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 8 Jul 2023 09:40:50 -0400 Subject: [PATCH 290/381] Moved Discord webhooks to server sided --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index efadeb5b..cba6479d 100644 --- a/README.md +++ b/README.md @@ -45,10 +45,10 @@ Config.UseCQCMugshot = true -- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. Config.MugPhotos = 1 ``` -* Create a Discord Webhook and paste it here: (Line 11 in Config.lua) +* Create a Discord Webhook and add it [here](https://github.com/Project-Sloth/ps-mdt/blob/c10ea056705dd7b04894716266cd387b00109aff/server/main.lua#L16C26-L16C26) ```lua -- Images for mug shots will be uploaded here. Add a Discord webhook. -Config.MugShotWebhook = '' +local MugShotWebhook = '' ``` # Fine & Citation via item @@ -74,9 +74,9 @@ Config.MugShotWebhook = '' # Clock In/Out & Leaderboard * Triggers when officers Toggle Duty from inside the mdt. -* Create a Discord Webhook and paste it on your config.lua +* Create a Discord Webhook and add it here [here](https://github.com/Project-Sloth/ps-mdt/blob/c10ea056705dd7b04894716266cd387b00109aff/server/main.lua#L20) ``` -Config.ClockinWebhook +local ClockinWebhook = '' ``` ![image](https://user-images.githubusercontent.com/82112471/228130546-6366ed1e-f5a8-428c-8680-0c384d2cff52.png) ![image](https://user-images.githubusercontent.com/82112471/228330602-1a914461-5d61-4e12-80d4-154c8da3dee1.png) From b547747062b16e085fee0e13fb552f663f73b981 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 4 Aug 2023 01:13:41 -0400 Subject: [PATCH 291/381] Fixed nil on apartment data https://github.com/Project-Sloth/ps-mdt/commit/d56f809967d65dca9a2fe6f3509efaa1a0ee4793 --- server/main.lua | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/server/main.lua b/server/main.lua index 18ccdf3f..dcb6b771 100644 --- a/server/main.lua +++ b/server/main.lua @@ -360,20 +360,26 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local apartmentData = GetPlayerApartment(target.citizenid) - if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then - local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) - - if propertyData and next(propertyData) then - if propertyData[1] then - apartmentData = propertyData[1].apartment .. ' Apt # (' .. propertyData[1].property_id .. ')' - else - TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have a property.', 'error') - print('The citizen does not have a property. Set Config.UsingPsHousing to false.') - end - else - TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have a property.', 'error') - print('The citizen does not have a property. Set Config.UsingPsHousing to false.') - end + if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then + local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) + + if propertyData and next(propertyData) then + local apartmentList = {} + for i, property in ipairs(propertyData) do + if property.apartment then + table.insert(apartmentList, property.apartment .. ' Apt # (' .. property.property_id .. ')') + end + end + if #apartmentList > 0 then + apartmentData = table.concat(apartmentList, ', ') + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') + print('The citizen does not have an apartment. Set Config.UsingPsHousing to false.') + end + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have a property.', 'error') + print('The citizen does not have a property. Set Config.UsingPsHousing to false.') + end elseif Config.UsingDefaultQBApartments then apartmentData = GetPlayerApartment(target.citizenid) if apartmentData then From 46bec2e38ac9d0598ac448751610abc1ca563db5 Mon Sep 17 00:00:00 2001 From: LeSiiN <103898231+LeSiiN@users.noreply.github.com> Date: Sun, 23 Jul 2023 12:43:14 +0200 Subject: [PATCH 292/381] Little Fix Fix for little no drivers license bug --- server/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/main.lua b/server/main.lua index dcb6b771..c5d98583 100644 --- a/server/main.lua +++ b/server/main.lua @@ -77,7 +77,7 @@ if Config.UseWolfknightRadar == true then TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) end - if bolo or warrant or (Config.PlateScanForDriversLicense and not driversLicense) then + if bolo or warrant or (Config.PlateScanForDriversLicense and not driversLicense) and vehicleOwner then TriggerClientEvent("wk:togglePlateLock", src, cam, true, 1) end end) @@ -1926,4 +1926,4 @@ function GetPlayerPropertiesByCitizenId(citizenid) end return properties -end \ No newline at end of file +end From 7e41c4581a783ea387296d627a04774c7dd50870 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 4 Aug 2023 01:15:30 -0400 Subject: [PATCH 293/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 9862472a..43c339be 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.3' +version '2.5.4' lua54 'yes' From c1d92af940335744ecef7fa28dd230796f0a9161 Mon Sep 17 00:00:00 2001 From: Complex Date: Fri, 4 Aug 2023 21:41:51 +0200 Subject: [PATCH 294/381] Make Properties Show Up for ps-housing. --- server/main.lua | 66 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/server/main.lua b/server/main.lua index c5d98583..3981c378 100644 --- a/server/main.lua +++ b/server/main.lua @@ -342,6 +342,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local JobType = GetJobType(PlayerData.job.name) local target = GetPlayerDataById(sentId) local JobName = PlayerData.job.name + local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) if not target or not next(target) then return cb({}) end @@ -358,11 +359,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local job, grade = UnpackJob(target.job) - local apartmentData = GetPlayerApartment(target.citizenid) - if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then - local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) - if propertyData and next(propertyData) then local apartmentList = {} for i, property in ipairs(propertyData) do @@ -461,23 +458,54 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb if vehicles then person.vehicles = vehicles end - local Coords = {} - local Houses = {} - local properties= GetPlayerProperties(person.cid) - for k, v in pairs(properties) do - Coords[#Coords+1] = { - coords = json.decode(v["coords"]), - } - end - for index = 1, #Coords, 1 do - Houses[#Houses+1] = { - label = properties[index]["label"], - coords = tostring(Coords[index]["coords"]["enter"]["x"]..",".. Coords[index]["coords"]["enter"]["y"].. ",".. Coords[index]["coords"]["enter"]["z"]), - } - end + + if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then + local Coords = {} + local Houses = {} + for k, v in pairs(propertyData) do + Coords[#Coords + 1] = { + coords = json.decode(v["door_data"]), + street = v["street"], + propertyid = v["property_id"], + apartmentLocation = v["apartment"] + } + end + for index = 1, #Coords do + local coordsLocation, label + + if Coords[index].apartmentLocation then + coordsLocation = tostring(Coords[index].apartmentLocation) + label = tostring(Coords[index].propertyid .. " " .. Coords[index].apartmentLocation) + else + local coords = Coords[index]["coords"] + coordsLocation = tostring(coords.x .. "," .. coords.y .. "," .. coords.z) + label = tostring(Coords[index].propertyid .. " " .. Coords[index].street) + end + + Houses[#Houses + 1] = { + label = label, + coords = coordsLocation, + } + end person.properties = Houses + else + local Coords = {} + local Houses = {} + local properties= GetPlayerProperties(person.cid) + for k, v in pairs(properties) do + Coords[#Coords+1] = { + coords = json.decode(v["coords"]), + } + end + for index = 1, #Coords, 1 do + Houses[#Houses+1] = { + label = properties[index]["label"], + coords = tostring(Coords[index]["coords"]["enter"]["x"]..",".. Coords[index]["coords"]["enter"]["y"].. ",".. Coords[index]["coords"]["enter"]["z"]), + } + end + person.properties = Houses + end end - local mdtData = GetPersonInformation(sentId, JobType) if mdtData then person.mdtinfo = mdtData.information From 7bc89dac4f09c2b7e0de567184168fb94d38ae60 Mon Sep 17 00:00:00 2001 From: Complex Date: Fri, 4 Aug 2023 21:52:02 +0200 Subject: [PATCH 295/381] Small Change --- server/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/server/main.lua b/server/main.lua index 3981c378..e883ef6e 100644 --- a/server/main.lua +++ b/server/main.lua @@ -343,6 +343,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local target = GetPlayerDataById(sentId) local JobName = PlayerData.job.name local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) + local apartmentData if not target or not next(target) then return cb({}) end From 75eb0608d9fd38f5fe418bf91a447b739b606ce0 Mon Sep 17 00:00:00 2001 From: Complex Date: Fri, 4 Aug 2023 22:11:12 +0200 Subject: [PATCH 296/381] fix for apartments showing on mdt properties list --- server/main.lua | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/server/main.lua b/server/main.lua index e883ef6e..2fddde14 100644 --- a/server/main.lua +++ b/server/main.lua @@ -464,24 +464,20 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local Coords = {} local Houses = {} for k, v in pairs(propertyData) do - Coords[#Coords + 1] = { - coords = json.decode(v["door_data"]), - street = v["street"], - propertyid = v["property_id"], - apartmentLocation = v["apartment"] - } + if not v.apartment then + Coords[#Coords + 1] = { + coords = json.decode(v["door_data"]), + street = v["street"], + propertyid = v["property_id"], + } + end end for index = 1, #Coords do local coordsLocation, label + local coords = Coords[index]["coords"] - if Coords[index].apartmentLocation then - coordsLocation = tostring(Coords[index].apartmentLocation) - label = tostring(Coords[index].propertyid .. " " .. Coords[index].apartmentLocation) - else - local coords = Coords[index]["coords"] - coordsLocation = tostring(coords.x .. "," .. coords.y .. "," .. coords.z) - label = tostring(Coords[index].propertyid .. " " .. Coords[index].street) - end + coordsLocation = tostring(coords.x .. "," .. coords.y .. "," .. coords.z) + label = tostring(Coords[index].propertyid .. " " .. Coords[index].street) Houses[#Houses + 1] = { label = label, From 62177f75a97da586640fee246c894a6d73f69b3b Mon Sep 17 00:00:00 2001 From: Lenzh Date: Sun, 23 Jul 2023 21:05:07 +0200 Subject: [PATCH 297/381] fixed issue where license was red even tho it had it --- ui/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 8a106454..32e46cb9 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5622,7 +5622,7 @@ function searchProfilesResults(result) { let convictions = "red-tag"; let licences = ""; - let licArr = Object.entries(metadata.licences); + let licArr = Object.entries(value.licences); if (licArr.length == 0 || licArr.length == undefined) { var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; From e57abcc6e940fa65e8178554292461483b715c0d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 19 Sep 2023 18:10:34 -0400 Subject: [PATCH 298/381] 2.5.5 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 43c339be..6781167f 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.4' +version '2.5.5' lua54 'yes' From 9a6de0170553f34d687625fa5aa430b317c420f4 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Sun, 1 Oct 2023 19:13:51 +0200 Subject: [PATCH 299/381] Citation item for ox_inv fix --- server/main.lua | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/server/main.lua b/server/main.lua index 2fddde14..77887ab0 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1825,15 +1825,27 @@ local function giveCitationItem(src, citizenId, fine, incidentId) local PlayerName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname local Officer = QBCore.Functions.GetPlayer(src) local OfficerFullName = '(' .. Officer.PlayerData.metadata.callsign .. ') ' .. Officer.PlayerData.charinfo.firstname .. ' ' .. Officer.PlayerData.charinfo.lastname - + local info = {} local date = os.date("%Y-%m-%d %H:%M") - local info = { - citizenId = citizenId, - fine = "$"..fine, - date = date, - incidentId = "#"..incidentId, - officer = OfficerFullName, - } + if Config.InventoryForWeaponsImages == "ox_inventory" then + info = { + description = { + 'Citizen ID: ' .. citizenId ' \n', + 'Fine: $ ' .. fine ' \n', + 'Date: ' .. date ' \n', + 'Incitent ID: # ' .. incidentId ' \n', + 'Officer: ' .. OfficerFullName + } + } + else + info = { + citizenId = citizenId, + fine = "$"..fine, + date = date, + incidentId = "#"..incidentId, + officer = OfficerFullName, + } + end Player.Functions.AddItem('mdtcitation', 1, false, info) TriggerClientEvent('QBCore:Notify', src, PlayerName.." (" ..citizenId.. ") received a citation!") if Config.QBManagementUse then From 68bc9e212248fcf958b83e340213915eef29a063 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Sun, 1 Oct 2023 18:57:23 +0200 Subject: [PATCH 300/381] Fix for not using ps-housing --- server/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 77887ab0..cd882ec7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -342,7 +342,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local JobType = GetJobType(PlayerData.job.name) local target = GetPlayerDataById(sentId) local JobName = PlayerData.job.name - local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) + local apartmentData if not target or not next(target) then return cb({}) end @@ -361,6 +361,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local job, grade = UnpackJob(target.job) if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then + local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) if propertyData and next(propertyData) then local apartmentList = {} for i, property in ipairs(propertyData) do @@ -463,6 +464,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then local Coords = {} local Houses = {} + local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) for k, v in pairs(propertyData) do if not v.apartment then Coords[#Coords + 1] = { From 8630973e86fc799f21bc890f436feabb3d57a88e Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 3 Oct 2023 23:31:46 -0400 Subject: [PATCH 301/381] Update fxmanifest.lua From 9f925aa8d75daf72d901a729548e3e321390faad Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 3 Oct 2023 23:31:33 -0400 Subject: [PATCH 302/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 6781167f..b24ea939 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.5' +version '2.5.6' lua54 'yes' From 1ea704bef67967eec88cf92554e407e40a0e7804 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 21 Sep 2023 00:17:49 +0200 Subject: [PATCH 303/381] Update main.lua --- server/main.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/server/main.lua b/server/main.lua index cd882ec7..eb2fa79e 100644 --- a/server/main.lua +++ b/server/main.lua @@ -8,7 +8,7 @@ local impound = {} local dispatchMessages = {} local isDispatchRunning = false local antiSpam = false - +local calls = {} -------------------------------- -- SET YOUR WEHBOOKS IN HERE @@ -92,6 +92,12 @@ AddEventHandler('onResourceStart', function(resourceName) if ClockinWebhook == '' then print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 20)\27[0m") end + if GetResourceState('ps-dispatch') == 'started' then + return calls = exports['ps-dispatch']:GetDispatchCalls() + end + if GetResourceState('ps-dispatch-v2') == 'started' then + return calls = exports['ps-dispatch-v2']:GetDispatchCalls() + end end) RegisterNetEvent("ps-mdt:server:OnPlayerUnload", function() @@ -218,7 +224,7 @@ RegisterNetEvent('mdt:server:openMDT', function() local PlayerData = GetPlayerData(src) if not PermCheck(src, PlayerData) then return end local Radio = Player(src).state.radioChannel or 0 - + calls = exports['ps-dispatch-v2']:GetDispatchCalls() activeUnits[PlayerData.citizenid] = { cid = PlayerData.citizenid, callSign = PlayerData.metadata['callsign'], @@ -231,7 +237,6 @@ RegisterNetEvent('mdt:server:openMDT', function() local JobType = GetJobType(PlayerData.job.name) local bulletin = GetBulletins(JobType) - local calls = exports['ps-dispatch']:GetDispatchCalls() TriggerClientEvent('mdt:client:open', src, bulletin, activeUnits, calls, PlayerData.citizenid) end) @@ -1160,7 +1165,6 @@ RegisterNetEvent('mdt:server:searchCalls', function(calls) local Player = QBCore.Functions.GetPlayer(src) local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' then - local calls = exports['ps-dispatch']:GetDispatchCalls() TriggerClientEvent('mdt:client:getCalls', src, calls) end @@ -1425,7 +1429,6 @@ RegisterNetEvent('mdt:server:setWaypoint', function(callid) if JobType == 'police' or JobType == 'ambulance' then if callid then if isDispatchRunning then - local calls = exports['ps-dispatch']:GetDispatchCalls() TriggerClientEvent('mdt:client:setWaypoint', src, calls[callid]) end end @@ -1481,7 +1484,7 @@ RegisterNetEvent('mdt:server:attachedUnits', function(callid) if JobType == 'police' or JobType == 'ambulance' then if callid then if isDispatchRunning then - local calls = exports['ps-dispatch']:GetDispatchCalls() + TriggerClientEvent('mdt:client:attachedUnits', src, calls[callid]['units'], callid) end end @@ -1516,7 +1519,7 @@ RegisterNetEvent('mdt:server:setDispatchWaypoint', function(callid, cid) if JobType == 'police' or JobType == 'ambulance' then if callid then if isDispatchRunning then - local calls = exports['ps-dispatch']:GetDispatchCalls() + TriggerClientEvent('mdt:client:setWaypoint', src, calls[callid]) end end @@ -1593,7 +1596,7 @@ RegisterNetEvent('mdt:server:getCallResponses', function(callid) local Player = QBCore.Functions.GetPlayer(src) if IsPoliceOrEms(Player.PlayerData.job.name) then if isDispatchRunning then - local calls = exports['ps-dispatch']:GetDispatchCalls() + TriggerClientEvent('mdt:client:getCallResponses', src, calls[callid]['responses'], callid) end end From c656cce8e5d23f33510606d2d854aa5a29c7beab Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 21 Sep 2023 01:23:31 +0200 Subject: [PATCH 304/381] prep for dispatch v2 --- ui/app.js | 123 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 55 deletions(-) diff --git a/ui/app.js b/ui/app.js index 32e46cb9..7e3d1bda 100644 --- a/ui/app.js +++ b/ui/app.js @@ -26,7 +26,7 @@ let rosterLink = ""; let sopLink = ""; //Set this to false if you don't want to show the send to community service button on the incidents page -const canSendToCommunityService = true +const canSendToCommunityService = false let impoundChanged = false; @@ -36,7 +36,7 @@ const PoliceJobs = { ['lspd']: true, ['bcso']: true, ['sast']: true, - ['sasp']: true, + ['sasp']: true, ['sapr']: true, ['doc']: true, ['lssd']: true, @@ -193,13 +193,13 @@ $(document).ready(() => { $(".profile-items").on("click", ".profile-item", async function () { let id = $(this).data("id"); let profileFingerprint = $(this).data("fingerprint"); - + if (profileFingerprint && profileFingerprint !== "") { $(".manage-profile-fingerprint-input").val(profileFingerprint); } else { $(".manage-profile-fingerprint-input").val(""); } - + let result = await $.post( `https://${GetParentResourceName()}/getProfileData`, JSON.stringify({ @@ -796,7 +796,7 @@ $(document).ready(() => { ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], ['strong', 'em',], ['insertImage'], ['viewHTML'], - ['undo', 'redo'], + ['undo', 'redo'], ['formatting'], ['superscript', 'subscript'], ['link'], @@ -1243,17 +1243,26 @@ $(document).ready(() => { } }; $(".manage-incidents-tags-add-btn").click(function () { - if ($(".tag-incident-input")[0]) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-incident-input").remove(); - } else { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-incidents-tags-holder").prepend( - `` - ); - } + // if ($(".tag-incident-input")[0]) { + // $(this).removeClass("fa-minus").addClass("fa-plus"); + // $(".tag-incident-input").remove(); + // } else { + // $(this).removeClass("fa-plus").addClass("fa-minus"); + // $(".manage-incidents-tags-holder").prepend( + // `` + // ); + // } + $(".close-all").css("filter", "none"); + let id = $(".manage-incidents-editing-title").data("id"); + OpenEvidenceLocker(id) }); + function OpenEvidenceLocker(id) { + $.post(`https://${GetParentResourceName()}/OpenEvidenceLocker`, JSON.stringify({ + id, + })); + } + $(".incidents-person-search-name-input").on("keydown", "", function (e) { if (e.keyCode === 13) { let name = $(".incidents-person-search-name-input").val(); @@ -1390,7 +1399,7 @@ $(document).ready(() => { ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], ['strong', 'em',], ['insertImage'], ['viewHTML'], - ['undo', 'redo'], + ['undo', 'redo'], ['formatting'], ['superscript', 'subscript'], ['link'], @@ -2033,17 +2042,17 @@ $(document).ready(() => { function () { $(".incidents-person-search-container").fadeOut(250); $(".close-all").css("filter", "none"); - + // This is the source element where we triggered the search component to open from // It is the area where we want the results to populate when we click on a search result - const sourceElement = $(".incidents-person-search-holder").data("source"); + const sourceElement = $(".incidents-person-search-holder").data("source"); // Populate the tags for the given section that corresponds to the sourceElement if (sourceElement === "incidents-civilians") { $(".manage-incidents-civilians-holder").append( `
                ${$(this).data("name")}
                ` ); - } else if (sourceElement === "incidents-officers") { + } else if (sourceElement === "incidents-officers") { $(".manage-incidents-officers-holder").append( `
                (${$(this).data("callsign")}) ${$(this).data("name")}
                ` ); @@ -2063,7 +2072,7 @@ $(document).ready(() => { $(".associated-incidents-tags-holder").prepend( `
                ${$(this).data("name")}
                ` ); - + // This section handles populating the fields when you add a new associated user to the incident $(".incidents-ghost-holder").prepend( ` @@ -2094,7 +2103,7 @@ $(document).ready(() => { ` ); } - + // Clear the search results and source $(".incidents-person-search-holder").removeData("source"); // Without using this line, we end up reading stale data from the data-source attribute rather than the data-source from the field we clicked on $(".incidents-person-search-holder").empty(); // Clear the search results @@ -2118,7 +2127,7 @@ $(document).ready(() => { ]; openContextMenu(e, args); }); - + $(".contextmenu").on("click", ".remove-tag", function () { $( `.tag:contains(${$(this).data("info")})` @@ -2467,7 +2476,7 @@ $(document).ready(() => { ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], ['strong', 'em',], ['insertImage'], ['viewHTML'], - ['undo', 'redo'], + ['undo', 'redo'], ['formatting'], ['superscript', 'subscript'], ['link'], @@ -3148,7 +3157,7 @@ $(document).ready(() => { $(".weapon-info-class-input").val(""); $(".weapon-info-model-input").val(""); $(".weapon-info-imageurl-input").val("img/not-found.webp"); - + canSaveWeapon = true; } ); @@ -3987,7 +3996,7 @@ $(document).ready(() => { document.documentElement.style.setProperty( "--color-5", theme.color5 - ); + ); document.documentElement.style.setProperty( "--color-6", theme.color6 @@ -4192,6 +4201,8 @@ window.addEventListener("message", function (event) { rosterLink = eventData.rosterLink; sopLink = eventData.sopLink; playerJob = eventData.job; + PlayerJobType = eventData.jobType; + JobColors(playerJob); $(".quote-span").html(randomizeQuote()); if (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined) { @@ -4450,15 +4461,15 @@ window.addEventListener("message", function (event) { } else if (eventData.type == "call") { const value = eventData.data; DispatchMAP(value); - if (value && value.job.includes(playerJob)) { + if (value && value?.job?.includes(playerJob) || value?.jobs.includes(PlayerJobType)) { const prio = value["priority"]; - let DispatchItem = `
                #${value.callId}
                ${value.dispatchCode}
                ${value.dispatchMessage}
                ${value.units.length}
                `; + let DispatchItem = `
                #${value.callId || value.id}
                ${value.dispatchCode || value.code}
                ${value.dispatchMessage || value.message}
                ${value.units.length}
                `; if ( value.dispatchCode == "911" || value.dispatchCode == "311" ) { - DispatchItem = `
                #${value.callId}
                ${value.dispatchCode}
                ${value.dispatchMessage}
                ${value.units.length}
                `; + DispatchItem = `
                #${value.callId || value.id}
                ${value.dispatchCode || value.code}
                ${value.dispatchMessage || value.message}
                ${value.units.length}
                `; } if (value["time"]) { @@ -4467,8 +4478,8 @@ window.addEventListener("message", function (event) { )}
                `; } - if (value["firstStreet"]) { - DispatchItem += `
                ${value.firstStreet}
                `; + if (value["firstStreet"] || value['street']) { + DispatchItem += `
                ${value.firstStreet || value.street}
                `; } if (value['camId']) { @@ -4511,8 +4522,8 @@ window.addEventListener("message", function (event) { DispatchItem += `
                ${value["model"]}
                `; } - if (value["firstColor"]) { - DispatchItem += `
                ${value["firstColor"]}
                `; + if (value["firstColor"] || value['color']) { + DispatchItem += `
                ${value["firstColor"] || value['color']}
                `; } if (value["automaticGunfire"] == true) { @@ -4548,7 +4559,7 @@ window.addEventListener("message", function (event) { `
                ${value.job}
                (${value.callsign}) ${value.fullname}
                -
                ${value.channel}
                +
                ${value.channel}
                `); }); setTimeout(() => { @@ -4589,15 +4600,17 @@ window.addEventListener("message", function (event) { const table = eventData.data; $(".active-calls-list").empty(); $.each(table, function (index, value) { - if (value && value.job.includes(playerJob)) { + console.log(JSON.stringify(value)) + if (value && value?.job?.includes(playerJob) || value?.jobs.includes(PlayerJobType)) { + const prio = value["priority"]; - let DispatchItem = `
                #${value.callId}
                ${value.dispatchCode}
                ${value.dispatchMessage}
                ${value.units.length}
                `; + let DispatchItem = `
                #${value.callId || value.id}
                ${value.dispatchCode || value.code}
                ${value.dispatchMessage || value.message}
                ${value.units.length}
                `; if ( value.dispatchCode == "911" || value.dispatchCode == "311" ) { - DispatchItem = `
                #${value.callId}
                ${value.dispatchCode}
                ${value.dispatchMessage}
                ${value.units.length}
                `; + DispatchItem = `
                #${value.callId || value.id}
                ${value.dispatchCode || value.code}
                ${value.dispatchMessage || value.message}
                ${value.units.length}
                `; } if (value["time"]) { @@ -4606,8 +4619,8 @@ window.addEventListener("message", function (event) { )}
                `; } - if (value["firstStreet"]) { - DispatchItem += `
                ${value.firstStreet}
                `; + if (value["firstStreet"] || value['street']) { + DispatchItem += `
                ${value.firstStreet || value.street}
                `; } if (value['camId']) { @@ -4621,7 +4634,7 @@ window.addEventListener("message", function (event) { if (value["weapon"]) { DispatchItem += `
                ${value.weapon}
                `; } - + if (value["gender"]) { let gender = "Male"; if (value["gender"] == 0 || value["gender"] == 2) { @@ -4638,8 +4651,8 @@ window.addEventListener("message", function (event) { DispatchItem += `
                ${value["model"]}
                `; } - if (value["firstColor"]) { - DispatchItem += `
                ${value["firstColor"]}
                `; + if (value["firstColor"] || value["color"]) { + DispatchItem += `
                ${value["firstColor"] || value["color"]}
                `; } if (value["automaticGunfire"] == true) { @@ -4694,7 +4707,7 @@ window.addEventListener("message", function (event) { }) ); }); - + $(".incidents-items").on("contextmenu", ".incidents-item", function (e) { var args = ""; args = [ @@ -4782,7 +4795,7 @@ window.addEventListener("message", function (event) { ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], ['strong', 'em',], ['insertImage'], ['viewHTML'], - ['undo', 'redo'], + ['undo', 'redo'], ['formatting'], ['superscript', 'subscript'], ['link'], @@ -4969,7 +4982,7 @@ window.addEventListener("message", function (event) { ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], ['strong', 'em',], ['insertImage'], ['viewHTML'], - ['undo', 'redo'], + ['undo', 'redo'], ['formatting'], ['superscript', 'subscript'], ['link'], @@ -5092,7 +5105,7 @@ window.addEventListener("message", function (event) { }) ); }); - + $(".reports-items").on("contextmenu", ".reports-item", function (e) { var args = ""; args = [ @@ -5124,7 +5137,7 @@ window.addEventListener("message", function (event) { ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], ['strong', 'em',], ['insertImage'], ['viewHTML'], - ['undo', 'redo'], + ['undo', 'redo'], ['formatting'], ['superscript', 'subscript'], ['link'], @@ -5245,7 +5258,7 @@ window.addEventListener("message", function (event) { }) ); }); - + $(".weapons-items").on("contextmenu", ".weapons-item", function (e) { var args = ""; args = [ @@ -5527,7 +5540,7 @@ function copyImageSource(url) { document.body.appendChild(el); el.select(); document.execCommand('copy'); - document.body.removeChild(el); + document.body.removeChild(el); } function removeImage(url) { @@ -5600,27 +5613,27 @@ function searchProfilesResults(result) { result.forEach((value) => { let charinfo = value.charinfo; let metadata = value.metadata; - + if (typeof value.charinfo == "string") { charinfo = JSON.parse(charinfo); } - + if (typeof value.metadata == "string") { metadata = JSON.parse(metadata); } - + if (!metadata) { metadata = {}; } - + if (!metadata.licences) { metadata.licences = {}; } - + let name = charinfo.firstname + " " + charinfo.lastname; let warrant = "red-tag"; let convictions = "red-tag"; - + let licences = ""; let licArr = Object.entries(value.licences); @@ -5744,7 +5757,7 @@ window.addEventListener("load", function () { }); - // Dispatch Map // + // Dispatch Map // customcrs = L.extend({}, L.CRS.Simple, { projection: L.Projection.LonLat, scale: function(zoom) { @@ -5821,7 +5834,7 @@ function DispatchMAP(DISPATCH) { setTimeout(function() { map.removeLayer(Dispatches[CODE]); }, 1200000); - + Dispatches[CODE].bindTooltip(`
                ${DISPATCH.dispatchMessage}
                #${DISPATCH.callId}
                `, { direction: 'top', From 12eec94785a0de9f6979c1dd9bdbdb8132cbd34f Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 21 Sep 2023 01:24:36 +0200 Subject: [PATCH 305/381] dispatch v2 prep --- server/main.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/server/main.lua b/server/main.lua index eb2fa79e..1595d6a1 100644 --- a/server/main.lua +++ b/server/main.lua @@ -93,10 +93,13 @@ AddEventHandler('onResourceStart', function(resourceName) print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 20)\27[0m") end if GetResourceState('ps-dispatch') == 'started' then - return calls = exports['ps-dispatch']:GetDispatchCalls() + local calls = exports['ps-dispatch']:GetDispatchCalls() + return calls end + if GetResourceState('ps-dispatch-v2') == 'started' then - return calls = exports['ps-dispatch-v2']:GetDispatchCalls() + local calls = exports['ps-dispatch-v2']:GetDispatchCalls() + return calls end end) @@ -224,7 +227,14 @@ RegisterNetEvent('mdt:server:openMDT', function() local PlayerData = GetPlayerData(src) if not PermCheck(src, PlayerData) then return end local Radio = Player(src).state.radioChannel or 0 - calls = exports['ps-dispatch-v2']:GetDispatchCalls() + + if GetResourceState('ps-dispatch') == 'started' then + calls = exports['ps-dispatch']:GetDispatchCalls() + end + if GetResourceState('ps-dispatch-v2') == 'started' then + calls = exports['ps-dispatch-v2']:GetDispatchCalls() + end + activeUnits[PlayerData.citizenid] = { cid = PlayerData.citizenid, callSign = PlayerData.metadata['callsign'], From 086e7a53379cd076d2888ea4715d277a4f9583cd Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 21 Sep 2023 01:26:50 +0200 Subject: [PATCH 306/381] forgot a console.log --- ui/app.js | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 7e3d1bda..3d63425c 100644 --- a/ui/app.js +++ b/ui/app.js @@ -4600,7 +4600,6 @@ window.addEventListener("message", function (event) { const table = eventData.data; $(".active-calls-list").empty(); $.each(table, function (index, value) { - console.log(JSON.stringify(value)) if (value && value?.job?.includes(playerJob) || value?.jobs.includes(PlayerJobType)) { const prio = value["priority"]; From e6cdb3e9841304b6d0a5818e88be422352253618 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 21 Sep 2023 01:28:07 +0200 Subject: [PATCH 307/381] dispatch v2 intergration --- client/main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/main.lua b/client/main.lua index 9860d47b..051e818d 100644 --- a/client/main.lua +++ b/client/main.lua @@ -147,14 +147,14 @@ end local function EnableGUI(enable) SetNuiFocus(enable, enable) - SendNUIMessage({ type = "show", enable = enable, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name], sopLink = Config.sopLink[PlayerData.job.name] }) + SendNUIMessage({ type = "show", enable = enable, job = PlayerData.job.name, jobType = PlayerData.job.type, rosterLink = Config.RosterLink[PlayerData.job.name], sopLink = Config.sopLink[PlayerData.job.name] }) isOpen = enable doAnimation() end local function RefreshGUI() SetNuiFocus(false, false) - SendNUIMessage({ type = "show", enable = false, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name], sopLink = Config.sopLink[PlayerData.job.name] }) + SendNUIMessage({ type = "show", enable = false, job = PlayerData.job.name, jobType = PlayerData.job.type, rosterLink = Config.RosterLink[PlayerData.job.name], sopLink = Config.sopLink[PlayerData.job.name] }) isOpen = false end @@ -1134,4 +1134,4 @@ if Config.UseWolfknightRadar == true then QBCore.Functions.Notify("Traffic Stop Cooldown active!", "error") end end) -end \ No newline at end of file +end From fe6c320886c258362f5b8dd1bfa9c7d8c9929985 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 21 Sep 2023 01:28:45 +0200 Subject: [PATCH 308/381] Update main.lua --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 051e818d..1b1f93dd 100644 --- a/client/main.lua +++ b/client/main.lua @@ -15,7 +15,7 @@ local lastVeh = nil local lastPlate = nil CreateThread(function() - if GetResourceState('ps-dispatch') == 'started' then + if GetResourceState('ps-dispatch') == 'started' or GetResourceState('ps-dispatch-v2') == 'started' then TriggerServerEvent("ps-mdt:dispatchStatus", true) end end) From 1d29680b9e41ae6b46467e950a8966a43bd2a134 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Thu, 21 Sep 2023 01:30:58 +0200 Subject: [PATCH 309/381] Update main.lua --- client/main.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/client/main.lua b/client/main.lua index 1b1f93dd..fc7bb022 100644 --- a/client/main.lua +++ b/client/main.lua @@ -866,42 +866,42 @@ RegisterNetEvent('dispatch:clNotify', function(sNotificationData, sNotificationI end) RegisterNUICallback("setWaypoint", function(data, cb) - TriggerServerEvent('mdt:server:setWaypoint', data.callid) + TriggerServerEvent('mdt:server:setWaypoint', data.callid or data.id) cb(true) end) RegisterNUICallback("callDetach", function(data, cb) - TriggerServerEvent('mdt:server:callDetach', data.callid) + TriggerServerEvent('mdt:server:callDetach', data.callid or data.id) cb(true) end) RegisterNUICallback("removeCallBlip", function(data, cb) - TriggerEvent('ps-dispatch:client:removeCallBlip', data.callid) + TriggerEvent('ps-dispatch:client:removeCallBlip', data.callid or data.id) cb(true) end) RegisterNUICallback("callAttach", function(data, cb) - TriggerServerEvent('mdt:server:callAttach', data.callid) + TriggerServerEvent('mdt:server:callAttach', data.callid or data.id) cb(true) end) RegisterNUICallback("attachedUnits", function(data, cb) - TriggerServerEvent('mdt:server:attachedUnits', data.callid) + TriggerServerEvent('mdt:server:attachedUnits', data.callid or data.id) cb(true) end) RegisterNUICallback("callDispatchDetach", function(data, cb) - TriggerServerEvent('mdt:server:callDispatchDetach', data.callid, data.cid) + TriggerServerEvent('mdt:server:callDispatchDetach', data.callid or data.id, data.cid) cb(true) end) RegisterNUICallback("setDispatchWaypoint", function(data, cb) - TriggerServerEvent('mdt:server:setDispatchWaypoint', data.callid, data.cid) + TriggerServerEvent('mdt:server:setDispatchWaypoint', data.callid or data.id, data.cid) cb(true) end) RegisterNUICallback("callDragAttach", function(data, cb) - TriggerServerEvent('mdt:server:callDragAttach', data.callid, data.cid) + TriggerServerEvent('mdt:server:callDragAttach', data.callid or data.id, data.cid) cb(true) end) @@ -938,7 +938,7 @@ RegisterNUICallback("dispatchNotif", function(data, cb) end) RegisterNUICallback("getCallResponses", function(data, cb) - TriggerServerEvent('mdt:server:getCallResponses', data.callid) + TriggerServerEvent('mdt:server:getCallResponses', data.callid or data.id) cb(true) end) From 139622adde0576fdaee52be834e37454fcfe115c Mon Sep 17 00:00:00 2001 From: Lenzh Date: Wed, 4 Oct 2023 15:42:46 +0200 Subject: [PATCH 310/381] Update main.lua --- server/main.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/server/main.lua b/server/main.lua index 1595d6a1..c5401d24 100644 --- a/server/main.lua +++ b/server/main.lua @@ -96,11 +96,6 @@ AddEventHandler('onResourceStart', function(resourceName) local calls = exports['ps-dispatch']:GetDispatchCalls() return calls end - - if GetResourceState('ps-dispatch-v2') == 'started' then - local calls = exports['ps-dispatch-v2']:GetDispatchCalls() - return calls - end end) RegisterNetEvent("ps-mdt:server:OnPlayerUnload", function() @@ -231,9 +226,6 @@ RegisterNetEvent('mdt:server:openMDT', function() if GetResourceState('ps-dispatch') == 'started' then calls = exports['ps-dispatch']:GetDispatchCalls() end - if GetResourceState('ps-dispatch-v2') == 'started' then - calls = exports['ps-dispatch-v2']:GetDispatchCalls() - end activeUnits[PlayerData.citizenid] = { cid = PlayerData.citizenid, From d05b08eb8e444d5f4957277f7e77fc7f25126e35 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 9 Oct 2023 03:30:39 -0400 Subject: [PATCH 311/381] Update main.lua --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index fc7bb022..0b0a0832 100644 --- a/client/main.lua +++ b/client/main.lua @@ -15,7 +15,7 @@ local lastVeh = nil local lastPlate = nil CreateThread(function() - if GetResourceState('ps-dispatch') == 'started' or GetResourceState('ps-dispatch-v2') == 'started' then + if GetResourceState('ps-dispatch') == 'started' then TriggerServerEvent("ps-mdt:dispatchStatus", true) end end) From bd248729dfb9b7f8ff0e5dc5baf21fce7b1e3645 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 12 Oct 2023 00:42:04 -0400 Subject: [PATCH 312/381] Fixes Set Way point compatible with dispatch v2 --- client/main.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 0b0a0832..884b4f0c 100644 --- a/client/main.lua +++ b/client/main.lua @@ -974,9 +974,12 @@ RegisterNetEvent('mdt:client:attachedUnits', function(sentData, callid) end) RegisterNetEvent('mdt:client:setWaypoint', function(callInformation) - SetNewWaypoint(callInformation['origin']['x'], callInformation['origin']['y']) + if callInformation['coords'] and callInformation['coords']['x'] and callInformation['coords']['y'] then + SetNewWaypoint(callInformation['coords']['x'], callInformation['coords']['y']) + end end) + RegisterNetEvent('mdt:client:callDetach', function(callid, sentData) local job = PlayerData.job.name if AllowedJob(job) then From 7860b1e35e7812749523e971087d9be83250b620 Mon Sep 17 00:00:00 2001 From: Sisyphus <114317252+xSisyphusx@users.noreply.github.com> Date: Mon, 14 Aug 2023 21:16:46 -0700 Subject: [PATCH 313/381] Added Incident Webhook Functionality --- server/main.lua | 90 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 79 insertions(+), 11 deletions(-) diff --git a/server/main.lua b/server/main.lua index c5401d24..ff348562 100644 --- a/server/main.lua +++ b/server/main.lua @@ -18,6 +18,10 @@ local MugShotWebhook = '' -- Clock-in notifications for duty. Add a Discord webhook. -- Command /mdtleaderboard, will display top players per clock-in hours. local ClockinWebhook = '' + +-- Incident and Incident editting. Add a Discord webhook. +-- Incident Author, Title, and Report will display in webhook post. +local IncidentWebhook = '' -------------------------------- QBCore.Functions.CreateCallback('ps-mdt:server:MugShotWebhook', function(source, cb) @@ -1339,6 +1343,27 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag jobtype = 'police', }, function(infoResult) if infoResult then + MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = infoResult }, function(result) + -- Check if the query returned any result + if result and #result > 0 then + -- Fetch the author, title, and details from the result + local author = result[1].author + local title = result[1].title + local details = result[1].details + + details = details:gsub("<[^>]+>", ""):gsub(" ", "") + + -- Construct the webhook message + local message = "Author: " .. author .. "\n" + message = message .. "Title: " .. title .. "\n" + message = message .. "Details: " .. details + + -- Send the webhook using the sendToDiscord function + sendIncidentToDiscord(3989503, "MDT Incident Report", message, "ps-mdt | Made by Project Sloth") + else + print('No incident found in the mdt_incidents table with id: ' .. infoResult) + end + end) for i=1, #associated do MySQL.insert('INSERT INTO `mdt_convictions` (`cid`, `linkedincident`, `warrant`, `guilty`, `processed`, `associated`, `charges`, `fine`, `sentence`, `recfine`, `recsentence`, `time`) VALUES (:cid, :linkedincident, :warrant, :guilty, :processed, :associated, :charges, :fine, :sentence, :recfine, :recsentence, :time)', { cid = associated[i]['Cid'], @@ -1361,17 +1386,41 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag end) elseif id > 0 then MySQL.update("UPDATE mdt_incidents SET title=:title, details=:details, civsinvolved=:civsinvolved, tags=:tags, officersinvolved=:officersinvolved, evidence=:evidence WHERE id=:id", { - title = title, - details = information, - tags = json.encode(tags), - officersinvolved = json.encode(officers), - civsinvolved = json.encode(civilians), - evidence = json.encode(evidence), - id = id - }) - for i=1, #associated do - TriggerEvent('mdt:server:handleExistingConvictions', associated[i], id, time) - end + title = title, + details = information, + tags = json.encode(tags), + officersinvolved = json.encode(officers), + civsinvolved = json.encode(civilians), + evidence = json.encode(evidence), + id = id + }, function(rowsChanged) + if rowsChanged > 0 then + MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = id }, function(result) + -- Check if the query returned any result + if result and #result > 0 then + -- Fetch the author, title, and details from the result + local author = result[1].author + local title = result[1].title + local details = result[1].details + + details = details:gsub("<[^>]+>", ""):gsub(" ", "") + + -- Construct the webhook message + local message = "Author: " .. author .. "\n" + message = message .. "Title: " .. title .. "\n" + message = message .. "Details: " .. details + + -- Send the webhook using the sendToDiscord function + sendIncidentToDiscord(16711680, "MDT Incident Report has been Updated", message, "ps-mdt | Made by Project Sloth") + else + print('No incident found in the mdt_incidents table with id: ' .. id) + end + end) + for i=1, #associated do + TriggerEvent('mdt:server:handleExistingConvictions', associated[i], id, time) + end + end + end) end end end @@ -1932,6 +1981,25 @@ function sendToDiscord(color, name, message, footer) end end +function sendIncidentToDiscord(color, name, message, footer) + if ClockinWebhook == '' then + print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 20)\27[0m") + else + local embed = { + { + color = color, + title = "**".. name .."**", + description = message, + footer = { + text = footer, + }, + } + } + + PerformHttpRequest(IncidentWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + end +end + function format_time(time) local days = math.floor(time / 86400) time = time % 86400 From dbbcd78633e4fd8cdfd4ba6987a0194920404785 Mon Sep 17 00:00:00 2001 From: Sisyphus <114317252+xSisyphusx@users.noreply.github.com> Date: Mon, 14 Aug 2023 21:32:43 -0700 Subject: [PATCH 314/381] Update main.lua --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index ff348562..95a7da37 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1983,7 +1983,7 @@ end function sendIncidentToDiscord(color, name, message, footer) if ClockinWebhook == '' then - print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 20)\27[0m") + print("\27[31mA webhook is missing in: IncidentWebhook (server > main.lua > line 24)\27[0m") else local embed = { { From 84a6eb184b2b9be881484343e8807602b0c7c6b3 Mon Sep 17 00:00:00 2001 From: Sisyphus <114317252+xSisyphusx@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:42:33 -0700 Subject: [PATCH 315/381] Update main.lua --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 95a7da37..b1e86c4a 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1982,7 +1982,7 @@ function sendToDiscord(color, name, message, footer) end function sendIncidentToDiscord(color, name, message, footer) - if ClockinWebhook == '' then + if IncidentWebhook == '' then print("\27[31mA webhook is missing in: IncidentWebhook (server > main.lua > line 24)\27[0m") else local embed = { From c374772581ee37d61ba9727cf7360c13d96b4852 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 12 Oct 2023 00:44:22 -0400 Subject: [PATCH 316/381] 2.5.7 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index b24ea939..846e642c 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.6' +version '2.5.7' lua54 'yes' From 9997c61e656aebed5699bb6041da1ee2d6e0a9ed Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 22 Oct 2023 23:41:29 -0400 Subject: [PATCH 317/381] Support ox_inventory for weapons purchased from Ammunition. --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index cba6479d..ed1b7881 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,47 @@ exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, we ``` ![image](https://user-images.githubusercontent.com/82112471/226144189-0cf7a87c-d9bc-4d1f-a9fb-6f14f92cb68b.png) +## Setup for [ox_inventory](https://github.com/overextended/ox_inventory) + +* Find `ox_inventory:buyItem` on modules > shops> server.lua +* Add the following code block +``` +\\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 +``` +* Add the follow function towards the end of the script. +``` +\\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 +``` + ## Self Register Weapons * Your citizens can self-register weapons found on their inventory. Event to trigger is below if you're using qb-target. There's also a command available named `registerweapon` but you'll need to uncomment if you want to use it. ``` From 370219597bb8b0657279c3d47276ca098b48ee08 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 25 Oct 2023 01:29:22 -0400 Subject: [PATCH 318/381] Discord Reports Updated --- server/main.lua | 199 ++++++++++++++++++++++++++++++------------------ 1 file changed, 126 insertions(+), 73 deletions(-) diff --git a/server/main.lua b/server/main.lua index b1e86c4a..8adfb557 100644 --- a/server/main.lua +++ b/server/main.lua @@ -21,7 +21,7 @@ local ClockinWebhook = '' -- Incident and Incident editting. Add a Discord webhook. -- Incident Author, Title, and Report will display in webhook post. -local IncidentWebhook = '' +local IncidentWebhook = 'https://discord.com/api/webhooks/1166590615782440971/8Fb-8Qd87hYhYcMZniNEkDMqhhem2Ddt-RxTLljFGpxCOoUr2_DpGXkiRybYZxb6-FzD' -------------------------------- QBCore.Functions.CreateCallback('ps-mdt:server:MugShotWebhook', function(source, cb) @@ -1344,26 +1344,32 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag }, function(infoResult) if infoResult then MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = infoResult }, function(result) - -- Check if the query returned any result + if result and #result > 0 then - -- Fetch the author, title, and details from the result - local author = result[1].author - local title = result[1].title - local details = result[1].details - - details = details:gsub("<[^>]+>", ""):gsub(" ", "") - - -- Construct the webhook message - local message = "Author: " .. author .. "\n" - message = message .. "Title: " .. title .. "\n" - message = message .. "Details: " .. details - - -- Send the webhook using the sendToDiscord function - sendIncidentToDiscord(3989503, "MDT Incident Report", message, "ps-mdt | Made by Project Sloth") + local message = generateMessageFromResult(result) + + for i=1, #associated do + local associatedData = { + cid = associated[i]['Cid'], + linkedincident = associated[i]['LinkedIncident'], + warrant = associated[i]['Warrant'], + guilty = associated[i]['Guilty'], + processed = associated[i]['Processed'], + associated = associated[i]['Isassociated'], + charges = json.encode(associated[i]['Charges']), + fine = tonumber(associated[i]['Fine']), + sentence = tonumber(associated[i]['Sentence']), + recfine = tonumber(associated[i]['recfine']), + recsentence = tonumber(associated[i]['recsentence']), + time = associated[i]['Time'] + } + sendIncidentToDiscord(3989503, "MDT Incident Report", message, "ps-mdt | Made by Project Sloth", associatedData) + end else - print('No incident found in the mdt_incidents table with id: ' .. infoResult) + print('No incident found in the mdt_incidents table with id: ' .. infoResult) end end) + for i=1, #associated do MySQL.insert('INSERT INTO `mdt_convictions` (`cid`, `linkedincident`, `warrant`, `guilty`, `processed`, `associated`, `charges`, `fine`, `sentence`, `recfine`, `recsentence`, `time`) VALUES (:cid, :linkedincident, :warrant, :guilty, :processed, :associated, :charges, :fine, :sentence, :recfine, :recsentence, :time)', { cid = associated[i]['Cid'], @@ -1385,45 +1391,38 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag end end) elseif id > 0 then - MySQL.update("UPDATE mdt_incidents SET title=:title, details=:details, civsinvolved=:civsinvolved, tags=:tags, officersinvolved=:officersinvolved, evidence=:evidence WHERE id=:id", { - title = title, - details = information, - tags = json.encode(tags), - officersinvolved = json.encode(officers), - civsinvolved = json.encode(civilians), - evidence = json.encode(evidence), - id = id - }, function(rowsChanged) - if rowsChanged > 0 then - MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = id }, function(result) - -- Check if the query returned any result - if result and #result > 0 then - -- Fetch the author, title, and details from the result - local author = result[1].author - local title = result[1].title - local details = result[1].details - - details = details:gsub("<[^>]+>", ""):gsub(" ", "") - - -- Construct the webhook message - local message = "Author: " .. author .. "\n" - message = message .. "Title: " .. title .. "\n" - message = message .. "Details: " .. details - - -- Send the webhook using the sendToDiscord function - sendIncidentToDiscord(16711680, "MDT Incident Report has been Updated", message, "ps-mdt | Made by Project Sloth") - else - print('No incident found in the mdt_incidents table with id: ' .. id) - end - end) - for i=1, #associated do - TriggerEvent('mdt:server:handleExistingConvictions', associated[i], id, time) - end - end - end) - end - end - end + MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = id }, function(result) + if result and #result > 0 then + local message = generateMessageFromResult(result) + + for i=1, #associated do + local associatedData = { + cid = associated[i]['Cid'], + linkedincident = associated[i]['LinkedIncident'], + warrant = associated[i]['Warrant'], + guilty = associated[i]['Guilty'], + processed = associated[i]['Processed'], + associated = associated[i]['Isassociated'], + charges = json.encode(associated[i]['Charges']), + fine = tonumber(associated[i]['Fine']), + sentence = tonumber(associated[i]['Sentence']), + recfine = tonumber(associated[i]['recfine']), + recsentence = tonumber(associated[i]['recsentence']), + time = associated[i]['Time'] + } + sendIncidentToDiscord(16711680, "MDT Incident Report has been Updated", message, "ps-mdt | Made by Project Sloth", associatedData) + end + else + print('No incident found in the mdt_incidents table with id: ' .. id) + end + end) + + for i=1, #associated do + TriggerEvent('mdt:server:handleExistingConvictions', associated[i], id, time) + end + end + end + end end) RegisterNetEvent('mdt:server:handleExistingConvictions', function(data, incidentId, time) @@ -1981,23 +1980,66 @@ function sendToDiscord(color, name, message, footer) end end -function sendIncidentToDiscord(color, name, message, footer) - if IncidentWebhook == '' then - print("\27[31mA webhook is missing in: IncidentWebhook (server > main.lua > line 24)\27[0m") - else - local embed = { - { - color = color, - title = "**".. name .."**", - description = message, - footer = { - text = footer, - }, - } - } - - PerformHttpRequest(IncidentWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) - end +function sendIncidentToDiscord(color, name, message, footer, associatedData) + local rolePing = "<@&1074119792258199582>" -- DOJ role to be pigned when the person is not Guilty. + local pingMessage = "" + + if IncidentWebhook == '' then + print("\27[31mA webhook is missing in: IncidentWebhook (server > main.lua > line 24)\27[0m") + else + if associatedData then + message = message .. "\n\n--- Associated Data ---" + message = message .. "\nCID: " .. (associatedData.cid or "Not Found") + + if associatedData.guilty == false then + pingMessage = "**Guilty: Not Guilty - Need Court Case** " .. rolePing + message = message .. "\n" .. pingMessage + else + message = message .. "\nGuilty: " .. tostring(associatedData.guilty or "Not Found") + end + + if associatedData.officersinvolved and #associatedData.officersinvolved > 0 then + local officersList = table.concat(associatedData.officersinvolved, ", ") + message = message .. "\nOfficers Involved: " .. officersList + else + message = message .. "\nOfficers Involved: None" + end + + if associatedData.civsinvolved and #associatedData.civsinvolved > 0 then + local civsList = table.concat(associatedData.civsinvolved, ", ") + message = message .. "\nCivilians Involved: " .. civsList + else + message = message .. "\nCivilians Involved: None" + end + + message = message .. "\nWarrant: " .. tostring(associatedData.warrant or "No Warrants") + message = message .. "\nReceived Fine: $" .. tostring(associatedData.fine or "Not Found") + message = message .. "\nReceived Sentence: " .. tostring(associatedData.sentence or "Not Found") + message = message .. "\nRecommended Fine: $" .. tostring(associatedData.recfine or "Not Found") + message = message .. "\nRecommended Sentence: " .. tostring(associatedData.recsentence or "Not Found") + + local chargesTable = json.decode(associatedData.charges) + if chargesTable and #chargesTable > 0 then + local chargeList = table.concat(chargesTable, "\n") + message = message .. "\n**Charges:** \n" .. chargeList + else + message = message .. "\n**Charges: No Charges**" + end + end + + local embed = { + { + color = color, + title = "**".. name .."**", + description = message, + footer = { + text = footer, + }, + } + } + + PerformHttpRequest(IncidentWebhook, function(err, text, headers) end, 'POST', json.encode({content = pingMessage, username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + end end function format_time(time) @@ -2039,3 +2081,14 @@ function GetPlayerPropertiesByCitizenId(citizenid) return properties end + +function generateMessageFromResult(result) + local author = result[1].author + local title = result[1].title + local details = result[1].details + details = details:gsub("<[^>]+>", ""):gsub(" ", "") + local message = "Author: " .. author .. "\n" + message = message .. "Title: " .. title .. "\n" + message = message .. "Details: " .. details + return message +end \ No newline at end of file From 0fb4c2a2ea84f5698f38c919ad75d7c97e2e354b Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 25 Oct 2023 01:39:21 -0400 Subject: [PATCH 319/381] Duplicate Data --- server/main.lua | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/server/main.lua b/server/main.lua index 8adfb557..db226bbe 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1997,20 +1997,6 @@ function sendIncidentToDiscord(color, name, message, footer, associatedData) else message = message .. "\nGuilty: " .. tostring(associatedData.guilty or "Not Found") end - - if associatedData.officersinvolved and #associatedData.officersinvolved > 0 then - local officersList = table.concat(associatedData.officersinvolved, ", ") - message = message .. "\nOfficers Involved: " .. officersList - else - message = message .. "\nOfficers Involved: None" - end - - if associatedData.civsinvolved and #associatedData.civsinvolved > 0 then - local civsList = table.concat(associatedData.civsinvolved, ", ") - message = message .. "\nCivilians Involved: " .. civsList - else - message = message .. "\nCivilians Involved: None" - end message = message .. "\nWarrant: " .. tostring(associatedData.warrant or "No Warrants") message = message .. "\nReceived Fine: $" .. tostring(associatedData.fine or "Not Found") From 6fe45df2c1388e17986b4273c7c2f960c3423d25 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 25 Oct 2023 04:35:32 -0400 Subject: [PATCH 320/381] Update main.lua --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 8adfb557..d78299d7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -21,7 +21,7 @@ local ClockinWebhook = '' -- Incident and Incident editting. Add a Discord webhook. -- Incident Author, Title, and Report will display in webhook post. -local IncidentWebhook = 'https://discord.com/api/webhooks/1166590615782440971/8Fb-8Qd87hYhYcMZniNEkDMqhhem2Ddt-RxTLljFGpxCOoUr2_DpGXkiRybYZxb6-FzD' +local IncidentWebhook = '' -------------------------------- QBCore.Functions.CreateCallback('ps-mdt:server:MugShotWebhook', function(source, cb) From bde42a908f41b757f32ca207cd002d9bd60b5485 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Wed, 25 Oct 2023 11:10:22 +0200 Subject: [PATCH 321/381] Fix for civinvolved and officersinvolved not showing in webhookmsg --- server/main.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/main.lua b/server/main.lua index 9cc5022a..3c94d0c7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1361,7 +1361,9 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag sentence = tonumber(associated[i]['Sentence']), recfine = tonumber(associated[i]['recfine']), recsentence = tonumber(associated[i]['recsentence']), - time = associated[i]['Time'] + time = associated[i]['Time'], + officersinvolved = officers, + civsinvolved = civilians } sendIncidentToDiscord(3989503, "MDT Incident Report", message, "ps-mdt | Made by Project Sloth", associatedData) end @@ -1383,7 +1385,9 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag sentence = tonumber(associated[i]['Sentence']), recfine = tonumber(associated[i]['recfine']), recsentence = tonumber(associated[i]['recsentence']), - time = time + time = time, + officersinvolved = officers, + civsinvolved = civilians }) end TriggerClientEvent('mdt:client:updateIncidentDbId', src, infoResult) @@ -2077,4 +2081,4 @@ function generateMessageFromResult(result) message = message .. "Title: " .. title .. "\n" message = message .. "Details: " .. details return message -end \ No newline at end of file +end From 49d8f7a4ceefbd993ffe2d0aa246aaa9fdeb9115 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Wed, 25 Oct 2023 11:56:43 +0200 Subject: [PATCH 322/381] Update main.lua --- server/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 3c94d0c7..c06dfb03 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1412,7 +1412,9 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag sentence = tonumber(associated[i]['Sentence']), recfine = tonumber(associated[i]['recfine']), recsentence = tonumber(associated[i]['recsentence']), - time = associated[i]['Time'] + time = associated[i]['Time'], + officersinvolved = officers, + civsinvolved = civilians } sendIncidentToDiscord(16711680, "MDT Incident Report has been Updated", message, "ps-mdt | Made by Project Sloth", associatedData) end From 0fd43ffac606ed55f1c29c16ea1fbc7bfa27f580 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 25 Oct 2023 06:00:30 -0400 Subject: [PATCH 323/381] Update main.lua --- server/main.lua | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/server/main.lua b/server/main.lua index c06dfb03..c90466a6 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1413,8 +1413,8 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag recfine = tonumber(associated[i]['recfine']), recsentence = tonumber(associated[i]['recsentence']), time = associated[i]['Time'], - officersinvolved = officers, - civsinvolved = civilians + officersinvolved = officers, + civsinvolved = civilians } sendIncidentToDiscord(16711680, "MDT Incident Report has been Updated", message, "ps-mdt | Made by Project Sloth", associatedData) end @@ -2004,6 +2004,22 @@ function sendIncidentToDiscord(color, name, message, footer, associatedData) message = message .. "\nGuilty: " .. tostring(associatedData.guilty or "Not Found") end + + if associatedData.officersinvolved and #associatedData.officersinvolved > 0 then + local officersList = table.concat(associatedData.officersinvolved, ", ") + message = message .. "\nOfficers Involved: " .. officersList + else + message = message .. "\nOfficers Involved: None" + end + + if associatedData.civsinvolved and #associatedData.civsinvolved > 0 then + local civsList = table.concat(associatedData.civsinvolved, ", ") + message = message .. "\nCivilians Involved: " .. civsList + else + message = message .. "\nCivilians Involved: None" + end + + message = message .. "\nWarrant: " .. tostring(associatedData.warrant or "No Warrants") message = message .. "\nReceived Fine: $" .. tostring(associatedData.fine or "Not Found") message = message .. "\nReceived Sentence: " .. tostring(associatedData.sentence or "Not Found") From 0f21aa2ed11e1be47888f51f412ade534ddb9e91 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Wed, 25 Oct 2023 17:01:41 -0400 Subject: [PATCH 324/381] 2.5.8 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 846e642c..2d14c618 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.7' +version '2.5.8' lua54 'yes' From 359133d221f515d49e48cb0895bdccde0fb8c800 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 3 Nov 2023 06:22:04 -0400 Subject: [PATCH 325/381] Fixed Incidents not saving properly --- server/main.lua | 166 ++++++++++++++++++++++++++---------------------- 1 file changed, 91 insertions(+), 75 deletions(-) diff --git a/server/main.lua b/server/main.lua index c90466a6..50daea93 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1324,81 +1324,79 @@ RegisterNetEvent('mdt:server:setCallsign', function(cid, newcallsign) end) RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tags, officers, civilians, evidence, associated, time) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - if Player then - if GetJobType(Player.PlayerData.job.name) == 'police' then - if id == 0 then - local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.insert('INSERT INTO `mdt_incidents` (`author`, `title`, `details`, `tags`, `officersinvolved`, `civsinvolved`, `evidence`, `time`, `jobtype`) VALUES (:author, :title, :details, :tags, :officersinvolved, :civsinvolved, :evidence, :time, :jobtype)', - { - author = fullname, - title = title, - details = information, - tags = json.encode(tags), - officersinvolved = json.encode(officers), - civsinvolved = json.encode(civilians), - evidence = json.encode(evidence), - time = time, - jobtype = 'police', - }, function(infoResult) - if infoResult then - MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = infoResult }, function(result) - - if result and #result > 0 then - local message = generateMessageFromResult(result) - - for i=1, #associated do - local associatedData = { - cid = associated[i]['Cid'], - linkedincident = associated[i]['LinkedIncident'], - warrant = associated[i]['Warrant'], - guilty = associated[i]['Guilty'], - processed = associated[i]['Processed'], - associated = associated[i]['Isassociated'], - charges = json.encode(associated[i]['Charges']), - fine = tonumber(associated[i]['Fine']), - sentence = tonumber(associated[i]['Sentence']), - recfine = tonumber(associated[i]['recfine']), - recsentence = tonumber(associated[i]['recsentence']), - time = associated[i]['Time'], - officersinvolved = officers, - civsinvolved = civilians - } - sendIncidentToDiscord(3989503, "MDT Incident Report", message, "ps-mdt | Made by Project Sloth", associatedData) - end - else - print('No incident found in the mdt_incidents table with id: ' .. infoResult) - end - end) - - for i=1, #associated do - MySQL.insert('INSERT INTO `mdt_convictions` (`cid`, `linkedincident`, `warrant`, `guilty`, `processed`, `associated`, `charges`, `fine`, `sentence`, `recfine`, `recsentence`, `time`) VALUES (:cid, :linkedincident, :warrant, :guilty, :processed, :associated, :charges, :fine, :sentence, :recfine, :recsentence, :time)', { - cid = associated[i]['Cid'], - linkedincident = infoResult, - warrant = associated[i]['Warrant'], - guilty = associated[i]['Guilty'], - processed = associated[i]['Processed'], - associated = associated[i]['Isassociated'], - charges = json.encode(associated[i]['Charges']), - fine = tonumber(associated[i]['Fine']), - sentence = tonumber(associated[i]['Sentence']), - recfine = tonumber(associated[i]['recfine']), - recsentence = tonumber(associated[i]['recsentence']), - time = time, - officersinvolved = officers, - civsinvolved = civilians - }) - end - TriggerClientEvent('mdt:client:updateIncidentDbId', src, infoResult) - --TriggerEvent('mdt:server:AddLog', "A vehicle with the plate ("..plate..") was added to the vehicle information database by "..player['fullname']) - end - end) - elseif id > 0 then + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Player then + if GetJobType(Player.PlayerData.job.name) == 'police' then + if id == 0 then + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.insert('INSERT INTO `mdt_incidents` (`author`, `title`, `details`, `tags`, `officersinvolved`, `civsinvolved`, `evidence`, `time`, `jobtype`) VALUES (:author, :title, :details, :tags, :officersinvolved, :civsinvolved, :evidence, :time, :jobtype)', + { + author = fullname, + title = title, + details = information, + tags = json.encode(tags), + officersinvolved = json.encode(officers), + civsinvolved = json.encode(civilians), + evidence = json.encode(evidence), + time = time, + jobtype = 'police', + }, function(infoResult) + if infoResult then + MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = infoResult }, function(result) + if result and #result > 0 then + local message = generateMessageFromResult(result) + + for i=1, #associated do + local associatedData = { + cid = associated[i]['Cid'], + linkedincident = associated[i]['LinkedIncident'], + warrant = associated[i]['Warrant'], + guilty = associated[i]['Guilty'], + processed = associated[i]['Processed'], + associated = associated[i]['Isassociated'], + charges = json.encode(associated[i]['Charges']), + fine = tonumber(associated[i]['Fine']), + sentence = tonumber(associated[i]['Sentence']), + recfine = tonumber(associated[i]['recfine']), + recsentence = tonumber(associated[i]['recsentence']), + time = associated[i]['Time'], + officersinvolved = officers, + civsinvolved = civilians + } + sendIncidentToDiscord(3989503, "MDT Incident Report", message, "ps-mdt | Made by Project Sloth", associatedData) + end + else + print('No incident found in the mdt_incidents table with id: ' .. infoResult) + end + end) + + for i=1, #associated do + MySQL.insert('INSERT INTO `mdt_convictions` (`cid`, `linkedincident`, `warrant`, `guilty`, `processed`, `associated`, `charges`, `fine`, `sentence`, `recfine`, `recsentence`, `time`) VALUES (:cid, :linkedincident, :warrant, :guilty, :processed, :associated, :charges, :fine, :sentence, :recfine, :recsentence, :time)', { + cid = associated[i]['Cid'], + linkedincident = infoResult, + warrant = associated[i]['Warrant'], + guilty = associated[i]['Guilty'], + processed = associated[i]['Processed'], + associated = associated[i]['Isassociated'], + charges = json.encode(associated[i]['Charges']), + fine = tonumber(associated[i]['Fine']), + sentence = tonumber(associated[i]['Sentence']), + recfine = tonumber(associated[i]['recfine']), + recsentence = tonumber(associated[i]['recsentence']), + time = time, + officersinvolved = officers, + civsinvolved = civilians + }) + end + TriggerClientEvent('mdt:client:updateIncidentDbId', src, infoResult) + end + end) + elseif id > 0 then MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = id }, function(result) if result and #result > 0 then - local message = generateMessageFromResult(result) - + local message = generateMessageFromResult(result) + for i=1, #associated do local associatedData = { cid = associated[i]['Cid'], @@ -1413,8 +1411,8 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag recfine = tonumber(associated[i]['recfine']), recsentence = tonumber(associated[i]['recsentence']), time = associated[i]['Time'], - officersinvolved = officers, - civsinvolved = civilians + officersinvolved = officers, + civsinvolved = civilians } sendIncidentToDiscord(16711680, "MDT Incident Report has been Updated", message, "ps-mdt | Made by Project Sloth", associatedData) end @@ -1423,6 +1421,24 @@ RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tag end end) + MySQL.Async.execute('UPDATE `mdt_incidents` SET `title` = @title, `details` = @details, `tags` = @tags, `officersinvolved` = @officersinvolved, `civsinvolved` = @civsinvolved, `evidence` = @evidence, `time` = @time WHERE `id` = @id', + { + ['@id'] = id, + ['@title'] = title, + ['@details'] = information, + ['@tags'] = json.encode(tags), + ['@officersinvolved'] = json.encode(officers), + ['@civsinvolved'] = json.encode(civilians), + ['@evidence'] = json.encode(evidence), + ['@time'] = time, + }, function(rowsChanged) + if rowsChanged > 0 then + --print('Updated incident' .. id) + else + print('Failed to update incident with id: ' .. id) + end + end) + for i=1, #associated do TriggerEvent('mdt:server:handleExistingConvictions', associated[i], id, time) end From e678721a9fbfde83676acf4051a9c5247dbbc970 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 3 Nov 2023 06:23:13 -0400 Subject: [PATCH 326/381] 2.5.9 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 2d14c618..421eeb29 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.8' +version '2.5.9' lua54 'yes' From bb2fe4598960f704d8c35ed0d06bf373f51908ee Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sun, 5 Nov 2023 14:24:12 -0500 Subject: [PATCH 327/381] Officers Activity Updated --- ui/app.js | 63 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/ui/app.js b/ui/app.js index 3d63425c..9c2989ed 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5705,24 +5705,69 @@ window.addEventListener("message", (event) => { }); function updateOfficerData(officerData) { + officerData.forEach(officer => { + officer.totalSeconds = timeStringToSeconds(officer.totalTime); + }); + + officerData.sort((a, b) => b.totalSeconds - a.totalSeconds); + const leaderboardBox = document.querySelector('.leaderboard-box'); leaderboardBox.innerHTML = ''; - const positions = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th', '15th', '16th', '17th', '18th', '19th', '20th', '21th', '22th', '23th', '24th', '25th']; + const positions = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th', '15th', '16th', '17th', '18th', '19th', '20th', '21st', '22nd', '23rd', '24th', '25th']; officerData.forEach((officer, index) => { - const position = positions[index]; - const officerDiv = document.createElement('div'); - officerDiv.className = 'leaderboard-box-test'; - officerDiv.style.fontSize = '1.3vh'; - officerDiv.style.fontWeight = 'lighter'; - officerDiv.style.color = index < 3 ? 'white' : 'grey'; + const position = positions[index]; + const officerDiv = document.createElement('div'); + officerDiv.className = 'leaderboard-box-test'; + officerDiv.style.fontSize = '1.3vh'; + officerDiv.style.fontWeight = 'lighter'; + officerDiv.style.color = index < 3 ? 'white' : 'grey'; - officerDiv.innerHTML = `► ${position}: ${officer.name} (${officer.callsign})${officer.totalTime}`; - leaderboardBox.appendChild(officerDiv); + officerDiv.innerHTML = `► ${position}: ${officer.name} (${officer.callsign})${officer.totalTime}`; + leaderboardBox.appendChild(officerDiv); }); } +function timeStringToSeconds(t) { + if (!t) return 0; + + let days = 0, hours = 0, minutes = 0, seconds = 0; + let daysPart = '0'; + let timePart = t; + + // days vs day check + if (t.includes(' days ')) { + [daysPart, timePart] = t.split(' days '); + } + + const timeParts = timePart.split(' '); + + for (let i = 0; i < timeParts.length; i += 2) { + const val = parseInt(timeParts[i]); + switch (timeParts[i + 1]) { + case 'hours': + hours = val; + break; + case 'minutes': + minutes = val; + break; + case 'seconds': + seconds = val; + break; + } + } + + days = parseInt(daysPart); + + return ( + days * 86400 + + hours * 3600 + + minutes * 60 + + seconds + ); +} + window.addEventListener("load", function () { document From 28416ff93197444c1007b9a3b915e8c205cae5f9 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Nov 2023 20:28:36 -0500 Subject: [PATCH 328/381] Fixed attached units undefined --- client/main.lua | 29 ----------------- server/main.lua | 82 ++++++------------------------------------------- ui/app.js | 76 +++++++-------------------------------------- 3 files changed, 21 insertions(+), 166 deletions(-) diff --git a/client/main.lua b/client/main.lua index 884b4f0c..77b1818b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -870,31 +870,16 @@ RegisterNUICallback("setWaypoint", function(data, cb) cb(true) end) -RegisterNUICallback("callDetach", function(data, cb) - TriggerServerEvent('mdt:server:callDetach', data.callid or data.id) - cb(true) -end) - RegisterNUICallback("removeCallBlip", function(data, cb) TriggerEvent('ps-dispatch:client:removeCallBlip', data.callid or data.id) cb(true) end) -RegisterNUICallback("callAttach", function(data, cb) - TriggerServerEvent('mdt:server:callAttach', data.callid or data.id) - cb(true) -end) - RegisterNUICallback("attachedUnits", function(data, cb) TriggerServerEvent('mdt:server:attachedUnits', data.callid or data.id) cb(true) end) -RegisterNUICallback("callDispatchDetach", function(data, cb) - TriggerServerEvent('mdt:server:callDispatchDetach', data.callid or data.id, data.cid) - cb(true) -end) - RegisterNUICallback("setDispatchWaypoint", function(data, cb) TriggerServerEvent('mdt:server:setDispatchWaypoint', data.callid or data.id, data.cid) cb(true) @@ -979,20 +964,6 @@ RegisterNetEvent('mdt:client:setWaypoint', function(callInformation) end end) - -RegisterNetEvent('mdt:client:callDetach', function(callid, sentData) - local job = PlayerData.job.name - if AllowedJob(job) then - SendNUIMessage({ type = "callDetach", callid = callid, data = tonumber(sentData) }) - end -end) -RegisterNetEvent('mdt:client:callAttach', function(callid, sentData) - local job = PlayerData.job.name - if AllowedJob(job) then - SendNUIMessage({ type = "callAttach", callid = callid, data = tonumber(sentData) }) - end -end) - RegisterNetEvent('mdt:client:setWaypoint:unit', function(sentData) SetNewWaypoint(sentData.x, sentData.y) end) diff --git a/server/main.lua b/server/main.lua index 50daea93..5eee126d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1507,80 +1507,18 @@ RegisterNetEvent('mdt:server:setWaypoint', function(callid) end end) -RegisterNetEvent('mdt:server:callDetach', function(callid) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - local playerdata = { - fullname = Player.PlayerData.charinfo.firstname.. " "..Player.PlayerData.charinfo.lastname, - job = Player.PlayerData.job, - cid = Player.PlayerData.citizenid, - callsign = Player.PlayerData.metadata.callsign - } - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'ambulance' then - if callid then - TriggerEvent('dispatch:removeUnit', callid, playerdata, function(newNum) - TriggerClientEvent('mdt:client:callDetach', -1, callid, newNum) - end) - end - end -end) - -RegisterNetEvent('mdt:server:callAttach', function(callid) - local src = source - local plyState = Player(source).state - local Radio = plyState.radioChannel or 0 - local Player = QBCore.Functions.GetPlayer(src) - local playerdata = { - fullname = Player.PlayerData.charinfo.firstname.. " "..Player.PlayerData.charinfo.lastname, - job = Player.PlayerData.job, - cid = Player.PlayerData.citizenid, - callsign = Player.PlayerData.metadata.callsign, - radio = Radio - } - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'ambulance' then - if callid then - TriggerEvent('dispatch:addUnit', callid, playerdata, function(newNum) - TriggerClientEvent('mdt:client:callAttach', -1, callid, newNum) - end) - end - end - -end) RegisterNetEvent('mdt:server:attachedUnits', function(callid) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'ambulance' then - if callid then - if isDispatchRunning then - - TriggerClientEvent('mdt:client:attachedUnits', src, calls[callid]['units'], callid) - end - end - end -end) - -RegisterNetEvent('mdt:server:callDispatchDetach', function(callid, cid) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - local playerdata = { - fullname = Player.PlayerData.charinfo.firstname.. " "..Player.PlayerData.charinfo.lastname, - job = Player.PlayerData.job, - cid = Player.PlayerData.citizenid, - callsign = Player.PlayerData.metadata.callsign - } - local callid = tonumber(callid) - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'ambulance' then - if callid then - TriggerEvent('dispatch:removeUnit', callid, playerdata, function(newNum) - TriggerClientEvent('mdt:client:callDetach', -1, callid, newNum) - end) - end - end + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'ambulance' then + if callid then + if isDispatchRunning then + TriggerClientEvent('mdt:client:attachedUnits', src, calls[callid]['units'], callid) + end + end + end end) RegisterNetEvent('mdt:server:setDispatchWaypoint', function(callid, cid) diff --git a/ui/app.js b/ui/app.js index 9c2989ed..34525aa8 100644 --- a/ui/app.js +++ b/ui/app.js @@ -3443,26 +3443,6 @@ $(document).ready(() => { ); }); - $(".contextmenu").on("click", ".call-attach", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/callAttach`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".call-detach", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/callDetach`, - JSON.stringify({ - callid: callId, - }) - ); - }); - $(".contextmenu").on("click", ".remove-blip", function () { const callId = $(this).data("info"); $.post( @@ -3527,16 +3507,10 @@ $(document).ready(() => { function (e) { const callId = $(this).data("id"); const canRespond = $(this).data("canrespond"); + if (callId) { if (canRespond == true) { args = [ - { - className: "respond-call", - icon: "fas fa-reply", - text: "Respond to Call", - info: callId, - status: "", - }, { className: "attached-units", icon: "fas fa-link", @@ -3544,20 +3518,6 @@ $(document).ready(() => { info: callId, status: "", }, - { - className: "call-detach", - icon: "fas fa-sign-out-alt", - text: "Detach", - info: callId, - status: "", - }, - { - className: "call-attach", - icon: "fas fa-sign-in-alt", - text: "Respond", - info: callId, - status: "", - }, { className: "Set-Waypoint", icon: "fas fa-map-marker-alt", @@ -3582,20 +3542,6 @@ $(document).ready(() => { info: callId, status: "", }, - { - className: "call-detach", - icon: "fas fa-sign-out-alt", - text: "Detach", - info: callId, - status: "", - }, - { - className: "call-attach", - icon: "fas fa-sign-in-alt", - text: "Respond", - info: callId, - status: "", - }, { className: "Set-Waypoint", icon: "fas fa-map-marker-alt", @@ -3612,7 +3558,6 @@ $(document).ready(() => { }, ]; } - openContextMenu(e, args); } } @@ -4555,18 +4500,19 @@ window.addEventListener("message", function (event) { $(".close-all").css("filter", "brightness(15%)"); $(".dispatch-attached-units-holder").empty(); $.each(table, function (index, value) { + const fullname = value.charinfo.firstname + ' ' + value.charinfo.lastname; + const callsign = value.metadata.callsign; + const jobLabel = value.job.label; + $(".dispatch-attached-units-holder").prepend( - `
                -
                ${value.job}
                -
                (${value.callsign}) ${value.fullname}
                -
                ${value.channel}
                -
                `); + `
                +
                ${jobLabel}
                +
                (${callsign}) ${fullname}
                +
                +
                `); }); setTimeout(() => { - $(".dispatch-attached-units-container").attr( - "id", - eventData.callid - ); + $(".dispatch-attached-units-container").attr("id", eventData.callid); }, 1000); } } else if (eventData.type == "sendCallResponse") { From aa41cffdd9c4c9b2037673dad1b8f945f35b37ca Mon Sep 17 00:00:00 2001 From: Jared Date: Sat, 4 Nov 2023 13:35:16 -0400 Subject: [PATCH 329/381] feature/add-new-license-support Made adding licenses configurable :8ball: --- server/dbm.lua | 15 +++------------ shared/config.lua | 9 +++++++++ ui/app.js | 7 ++++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/server/dbm.lua b/server/dbm.lua index c85be6da..2c1fe059 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -107,12 +107,7 @@ function GetPlayerLicenses(identifier) if metadata["licences"] ~= nil and metadata["licences"] then return metadata["licences"] else - return { - ['driver'] = false, - ['business'] = false, - ['weapon'] = false, - ['pilot'] = false - } + return Config.Licenses end end end @@ -148,12 +143,8 @@ function UpdateAllLicenses(identifier, incomingLicenses) local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) result = json.decode(result) - result.licences = result.licences or { - ['driver'] = true, - ['business'] = false, - ['weapon'] = false, - ['pilot'] = false - } + result.licences = result.licences or Config.Licenses + result.licences['driver'] = true for k, _ in pairs(incomingLicenses) do result.licences[k] = incomingLicenses[k] diff --git a/shared/config.lua b/shared/config.lua index a1768091..284a704a 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -24,6 +24,15 @@ Config.InventoryForWeaponsImages = "lj-inventory" -- "LegacyFuel", "lj-fuel", "ps-fuel" Config.Fuel = "ps-fuel" +-- ['License Name'] = true/false -- Default to having it? +Config.Licenses = { + ['driver'] = false, + ['business'] = false, + ['weapon'] = false, + ['pilot'] = false, + ['weed'] = false +} + -- Google Docs Link Config.sopLink = { ['police'] = '', diff --git a/ui/app.js b/ui/app.js index 34525aa8..6e542068 100644 --- a/ui/app.js +++ b/ui/app.js @@ -24,6 +24,7 @@ var DispatchNum = 0; var playerJob = ""; let rosterLink = ""; let sopLink = ""; +const licenseTypesGlobal = ['business', 'pilot', 'weapon', 'driver', 'weed']; //Set this to false if you don't want to show the send to community service button on the incidents page const canSendToCommunityService = false @@ -268,7 +269,7 @@ $(document).ready(() => { let licenses = Object.entries(result.licences); if (licenses.length == 0 || licenses.length == undefined) { - var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; + var licenseTypes = licenseTypesGlobal; licenses = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); } @@ -1005,7 +1006,7 @@ $(document).ready(() => { } else if (type == "Weapon") { info = "weapon"; } else { - info = type; + info = type.toLowerCase(); } if ($(this).hasClass("green-tag")) { @@ -5583,7 +5584,7 @@ function searchProfilesResults(result) { let licArr = Object.entries(value.licences); if (licArr.length == 0 || licArr.length == undefined) { - var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; + var licenseTypes = licenseTypesGlobal; licArr = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); } From d99050bcfc05aeb76a3e1f410c727c4eb42a7e86 Mon Sep 17 00:00:00 2001 From: Jared Date: Sun, 5 Nov 2023 20:15:20 -0500 Subject: [PATCH 330/381] Update main.lua --- server/main.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/main.lua b/server/main.lua index 5eee126d..e59c3a7a 100644 --- a/server/main.lua +++ b/server/main.lua @@ -362,12 +362,7 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb if type(target.charinfo) == 'string' then target.charinfo = json.decode(target.charinfo) end if type(target.metadata) == 'string' then target.metadata = json.decode(target.metadata) end - local licencesdata = target.metadata['licences'] or { - ['driver'] = false, - ['business'] = false, - ['weapon'] = false, - ['pilot'] = false - } + local licencesdata = target.metadata['licences'] or Config.Licenses local job, grade = UnpackJob(target.job) From 7d6197e429880397c9b7c16009ef88ee9f359860 Mon Sep 17 00:00:00 2001 From: Jared Date: Sun, 5 Nov 2023 20:54:06 -0500 Subject: [PATCH 331/381] Update --- shared/config.lua | 2 +- ui/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index 284a704a..b83ef829 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -30,7 +30,7 @@ Config.Licenses = { ['business'] = false, ['weapon'] = false, ['pilot'] = false, - ['weed'] = false + ['weed_license'] = false } -- Google Docs Link diff --git a/ui/app.js b/ui/app.js index 6e542068..bd0192f2 100644 --- a/ui/app.js +++ b/ui/app.js @@ -24,7 +24,7 @@ var DispatchNum = 0; var playerJob = ""; let rosterLink = ""; let sopLink = ""; -const licenseTypesGlobal = ['business', 'pilot', 'weapon', 'driver', 'weed']; +const licenseTypesGlobal = ['business', 'pilot', 'weapon', 'driver', 'weed_license']; //Set this to false if you don't want to show the send to community service button on the incidents page const canSendToCommunityService = false From 527c65ad02f07a9b3cbb04397b3d8a756bc30d0c Mon Sep 17 00:00:00 2001 From: Jared Date: Sun, 5 Nov 2023 21:14:17 -0500 Subject: [PATCH 332/381] fix --- shared/config.lua | 2 +- ui/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/config.lua b/shared/config.lua index b83ef829..284a704a 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -30,7 +30,7 @@ Config.Licenses = { ['business'] = false, ['weapon'] = false, ['pilot'] = false, - ['weed_license'] = false + ['weed'] = false } -- Google Docs Link diff --git a/ui/app.js b/ui/app.js index bd0192f2..6e542068 100644 --- a/ui/app.js +++ b/ui/app.js @@ -24,7 +24,7 @@ var DispatchNum = 0; var playerJob = ""; let rosterLink = ""; let sopLink = ""; -const licenseTypesGlobal = ['business', 'pilot', 'weapon', 'driver', 'weed_license']; +const licenseTypesGlobal = ['business', 'pilot', 'weapon', 'driver', 'weed']; //Set this to false if you don't want to show the send to community service button on the incidents page const canSendToCommunityService = false From 7f4bb2a7811f08082eb777b2ee717242de9c534b Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Nov 2023 20:37:00 -0500 Subject: [PATCH 333/381] 2.6.0 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 421eeb29..f8245c81 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.5.9' +version '2.6.0' lua54 'yes' From 4ac5c9f8c8f41667c1aaad52810b89c68db8f749 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 24 Nov 2023 20:39:18 -0500 Subject: [PATCH 334/381] Update config.lua --- shared/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/config.lua b/shared/config.lua index 284a704a..db240bc5 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -24,7 +24,7 @@ Config.InventoryForWeaponsImages = "lj-inventory" -- "LegacyFuel", "lj-fuel", "ps-fuel" Config.Fuel = "ps-fuel" --- ['License Name'] = true/false -- Default to having it? +-- ['License Name'] = true/false. If false, license are set to false by default. Config.Licenses = { ['driver'] = false, ['business'] = false, From 305c10ea2f29bc17183c7223a371427c59e57613 Mon Sep 17 00:00:00 2001 From: Futte Date: Wed, 29 Nov 2023 01:27:07 +0100 Subject: [PATCH 335/381] Fixed performance issue when opening MDT --- ui/app.js | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/ui/app.js b/ui/app.js index 6e542068..8ca740af 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5652,28 +5652,35 @@ window.addEventListener("message", (event) => { }); function updateOfficerData(officerData) { + // Convert totalTime to totalSeconds for sorting officerData.forEach(officer => { officer.totalSeconds = timeStringToSeconds(officer.totalTime); }); + // Sort based on totalSeconds officerData.sort((a, b) => b.totalSeconds - a.totalSeconds); - const leaderboardBox = document.querySelector('.leaderboard-box'); - leaderboardBox.innerHTML = ''; + // Efficiently create officer elements + const officerElements = officerData.map((officer, index) => { + const position = getPosition(index + 1); + const color = index < 3 ? 'white' : 'grey'; - const positions = ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th', '13th', '14th', '15th', '16th', '17th', '18th', '19th', '20th', '21st', '22nd', '23rd', '24th', '25th']; + return `
                + ► ${position}: ${officer.name} (${officer.callsign})${officer.totalTime} +
                `; + }).join(''); - officerData.forEach((officer, index) => { - const position = positions[index]; - const officerDiv = document.createElement('div'); - officerDiv.className = 'leaderboard-box-test'; - officerDiv.style.fontSize = '1.3vh'; - officerDiv.style.fontWeight = 'lighter'; - officerDiv.style.color = index < 3 ? 'white' : 'grey'; + // Update the DOM once + const leaderboardBox = document.querySelector('.leaderboard-box'); + leaderboardBox.innerHTML = officerElements; +} - officerDiv.innerHTML = `► ${position}: ${officer.name} (${officer.callsign})${officer.totalTime}`; - leaderboardBox.appendChild(officerDiv); - }); +function getPosition(rank) { + const ordinal = rank % 10; + if (rank === 11 || rank === 12 || rank === 13) { + return rank + 'th'; + } + return rank + (ordinal === 1 ? 'st' : ordinal === 2 ? 'nd' : ordinal === 3 ? 'rd' : 'th'); } function timeStringToSeconds(t) { From 64980970c9a320e6d6dab35971de26e678fcbf8d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Nov 2023 19:33:23 -0500 Subject: [PATCH 336/381] 2.6.1 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index f8245c81..303677e3 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.0' +version '2.6.1' lua54 'yes' From 6611493e3fd7c355b05ec607b96bcd4a188086c1 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 28 Nov 2023 23:24:58 -0500 Subject: [PATCH 337/381] Update README.md --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ed1b7881..04ebc257 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl Adds server export for inserting weaponinfo records, that can be used elsewhere in your server, such as weapon purchase, to add information to the mdt. Below is the syntax for this, all arguments are strings. -``` +```lua exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) ``` ![image](https://user-images.githubusercontent.com/82112471/226144189-0cf7a87c-d9bc-4d1f-a9fb-6f14f92cb68b.png) @@ -28,7 +28,7 @@ exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, we * Find `ox_inventory:buyItem` on modules > shops> server.lua * Add the following code block -``` +```lua \\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. \\ @@ -45,7 +45,7 @@ if string.find(fromData.name, "WEAPON_") then end ``` * Add the follow function towards the end of the script. -``` +```lua \\Existing code below for reference, put it right under it. \\ server.shops = Shops \\Existing code above for reference, put it right under it. \\ @@ -67,7 +67,7 @@ end ## Self Register Weapons * Your citizens can self-register weapons found on their inventory. Event to trigger is below if you're using qb-target. There's also a command available named `registerweapon` but you'll need to uncomment if you want to use it. -``` +```lua ps-mdt:client:selfregister ``` @@ -94,11 +94,11 @@ local MugShotWebhook = '' # Fine & Citation via item * Add the item to your shared.lua > items.lua -``` +```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!'}, ``` * Add the below code to your inventory > app.js. Should be somewhere around markedbills, see below for reference. -``` +```lua } else if (itemData.name == "mdtcitation") { $(".item-info-title").html("

                " + itemData.label + "

                "); $(".item-info-description").html( @@ -116,7 +116,7 @@ local MugShotWebhook = '' # Clock In/Out & Leaderboard * Triggers when officers Toggle Duty from inside the mdt. * Create a Discord Webhook and add it here [here](https://github.com/Project-Sloth/ps-mdt/blob/c10ea056705dd7b04894716266cd387b00109aff/server/main.lua#L20) -``` +```lua local ClockinWebhook = '' ``` ![image](https://user-images.githubusercontent.com/82112471/228130546-6366ed1e-f5a8-428c-8680-0c384d2cff52.png) @@ -141,10 +141,10 @@ police:server:JailPlayer * [qb-inventory](https://github.com/qbcore-framework/qb-inventory) follow instructions below. 1. Edit the following event -``` +```lua RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, toInventory, fromSlot, toSlot, fromAmount, toAmount) ``` -``` +```lua 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 @@ -216,7 +216,7 @@ https://youtu.be/w9PAVc3ER_c 1. Add the following code right above `function READER:Main()` on `cl_plate_reader.lua` -``` +```lua local Vehicle = nil local function GetFrontPlate() local data = { @@ -229,7 +229,7 @@ end exports("GetFrontPlate", GetFrontPlate) ``` 2. Add the following into `cl_plate_reader.lua` after `local veh = UTIL:GetVehicleInDirection( PLY.veh, start, offset )` on the function `function READER:Main()` -``` +```lua if i == 1 then Vehicle = veh end @@ -249,7 +249,7 @@ end exports("GetFrontPlate", GetFrontPlate) * You need a Google Document / Sheet link that is viewable. Paste the link you got in the config here: -``` +```lua -- Google Docs Link Config.sopLink = { ['police'] = '', From 6dd8af7032c90bc9565e6f7f2f3c965223c30afc Mon Sep 17 00:00:00 2001 From: Futte Date: Thu, 30 Nov 2023 16:19:06 +0000 Subject: [PATCH 338/381] Moved fetch of dispatch calls higher in callstack --- client/main.lua | 9 ++++++--- server/main.lua | 29 +++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/client/main.lua b/client/main.lua index 77b1818b..b036852b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -241,7 +241,7 @@ RegisterNetEvent('mdt:client:deleteBulletin', function(ignoreId, sentData, job) end end) -RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, calls, cid) +RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, cid) EnableGUI(true) local x, y, z = table.unpack(GetEntityCoords(PlayerPedId())) @@ -259,10 +259,13 @@ RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, calls, cid) else playerStreetsLocation = area end -- local grade = PlayerData.job.grade.name - SendNUIMessage({ type = "data", activeUnits = activeUnits, citizenid = cid, ondutyonly = Config.OnlyShowOnDuty, name = "Welcome, " ..PlayerData.job.grade.name..' '..PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2), location = playerStreetsLocation, fullname = PlayerData.charinfo.firstname..' '..PlayerData.charinfo.lastname, bulletin = bulletin }) - SendNUIMessage({ type = "calls", data = calls }) TriggerEvent("mdt:client:dashboardWarrants") + + QBCore.Functions.TriggerCallback('ps-mdt:getDispatchCalls', function(calls) + SendNUIMessage({ type = "calls", data = calls }) + end) + end) RegisterNetEvent('mdt:client:exitMDT', function() diff --git a/server/main.lua b/server/main.lua index e59c3a7a..f1013b77 100644 --- a/server/main.lua +++ b/server/main.lua @@ -221,15 +221,31 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() end end) +QBCore.Functions.CreateCallback('ps-mdt:getDispatchCalls', function(source, cb) + if GetResourceState('ps-dispatch') ~= 'started' then + cb({}) + return + end + + local calls = exports['ps-dispatch']:GetDispatchCalls() + + if next(calls) == nil then + cb({}) + return + end + + cb(calls) +end) + RegisterNetEvent('mdt:server:openMDT', function() local src = source local PlayerData = GetPlayerData(src) if not PermCheck(src, PlayerData) then return end local Radio = Player(src).state.radioChannel or 0 - if GetResourceState('ps-dispatch') == 'started' then - calls = exports['ps-dispatch']:GetDispatchCalls() - end + -- if GetResourceState('ps-dispatch') == 'started' then + -- calls = exports['ps-dispatch']:GetDispatchCalls() + -- end activeUnits[PlayerData.citizenid] = { cid = PlayerData.citizenid, @@ -243,7 +259,7 @@ RegisterNetEvent('mdt:server:openMDT', function() local JobType = GetJobType(PlayerData.job.name) local bulletin = GetBulletins(JobType) - TriggerClientEvent('mdt:client:open', src, bulletin, activeUnits, calls, PlayerData.citizenid) + TriggerClientEvent('mdt:client:open', src, bulletin, activeUnits, PlayerData.citizenid) end) QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, sentData) @@ -291,6 +307,11 @@ QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, return cb({}) end) +QBCore.Functions.CreateCallback('ps-mdt:getDispatchCalls', function(source, cb) + local calls = exports['ps-dispatch']:GetDispatchCalls() + cb(calls) +end) + QBCore.Functions.CreateCallback("mdt:server:getWarrants", function(source, cb) local WarrantData = {} local data = MySQL.query.await("SELECT * FROM mdt_convictions", {}) From de72ac5e22bdca94665cf7e32c8247b87eecfc03 Mon Sep 17 00:00:00 2001 From: Futte Date: Thu, 30 Nov 2023 16:23:54 +0000 Subject: [PATCH 339/381] Removed duplicate code --- server/main.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/server/main.lua b/server/main.lua index f1013b77..852804fc 100644 --- a/server/main.lua +++ b/server/main.lua @@ -307,11 +307,6 @@ QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, return cb({}) end) -QBCore.Functions.CreateCallback('ps-mdt:getDispatchCalls', function(source, cb) - local calls = exports['ps-dispatch']:GetDispatchCalls() - cb(calls) -end) - QBCore.Functions.CreateCallback("mdt:server:getWarrants", function(source, cb) local WarrantData = {} local data = MySQL.query.await("SELECT * FROM mdt_convictions", {}) From 4fcc4b313d0eff1dfa43da9eaf84edf312b58bf8 Mon Sep 17 00:00:00 2001 From: Lenzh Date: Wed, 29 Nov 2023 19:54:45 +0100 Subject: [PATCH 340/381] illegal collation fix --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 04ebc257..8a810671 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,9 @@ Config.RosterLink = { - **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. +- **Getting a error about utf8mb4_unicode illegal collation?** - QBCore decided to change their collations on the new txrecipe, change ur collation on your players table to utf8mb4_general_ci + + # Reskins The below repos are direct forks of ps-mdt and have been edited to fit certain countries/look. From 803d8bcc6e3c0201457f1f97b42cc24721c044aa Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:35:19 -0500 Subject: [PATCH 341/381] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a810671..3eb56012 100644 --- a/README.md +++ b/README.md @@ -310,7 +310,7 @@ Config.RosterLink = { - **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. -- **Getting a error about utf8mb4_unicode illegal collation?** - QBCore decided to change their collations on the new txrecipe, change ur collation on your players table to utf8mb4_general_ci +- **Getting a error about utf8mb4_unicode illegal collation?** - QBCore has decided to change their collations on the new txAdmin recipe, change your collation on your players table to utf8mb4_general_ci. # Reskins From ee6981407efc4fda91a2d3e62d517d204d7f8d58 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:36:23 -0500 Subject: [PATCH 342/381] 2.6.2 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 303677e3..92fe9757 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.1' +version '2.6.2' lua54 'yes' From 14585ba07126c009d4d82bad86f6f62db6efea09 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 5 Dec 2023 03:56:48 -0500 Subject: [PATCH 343/381] Revert "Removed duplicate code" This reverts commit de72ac5e22bdca94665cf7e32c8247b87eecfc03. --- server/main.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/main.lua b/server/main.lua index 852804fc..f1013b77 100644 --- a/server/main.lua +++ b/server/main.lua @@ -307,6 +307,11 @@ QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, return cb({}) end) +QBCore.Functions.CreateCallback('ps-mdt:getDispatchCalls', function(source, cb) + local calls = exports['ps-dispatch']:GetDispatchCalls() + cb(calls) +end) + QBCore.Functions.CreateCallback("mdt:server:getWarrants", function(source, cb) local WarrantData = {} local data = MySQL.query.await("SELECT * FROM mdt_convictions", {}) From 30981e267b0374046b76a311be394064f66ce48d Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 5 Dec 2023 03:56:48 -0500 Subject: [PATCH 344/381] Revert "Moved fetch of dispatch calls higher in callstack" This reverts commit 6dd8af7032c90bc9565e6f7f2f3c965223c30afc. --- client/main.lua | 9 +++------ server/main.lua | 29 ++++------------------------- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/client/main.lua b/client/main.lua index b036852b..77b1818b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -241,7 +241,7 @@ RegisterNetEvent('mdt:client:deleteBulletin', function(ignoreId, sentData, job) end end) -RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, cid) +RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, calls, cid) EnableGUI(true) local x, y, z = table.unpack(GetEntityCoords(PlayerPedId())) @@ -259,13 +259,10 @@ RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, cid) else playerStreetsLocation = area end -- local grade = PlayerData.job.grade.name + SendNUIMessage({ type = "data", activeUnits = activeUnits, citizenid = cid, ondutyonly = Config.OnlyShowOnDuty, name = "Welcome, " ..PlayerData.job.grade.name..' '..PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2), location = playerStreetsLocation, fullname = PlayerData.charinfo.firstname..' '..PlayerData.charinfo.lastname, bulletin = bulletin }) + SendNUIMessage({ type = "calls", data = calls }) TriggerEvent("mdt:client:dashboardWarrants") - - QBCore.Functions.TriggerCallback('ps-mdt:getDispatchCalls', function(calls) - SendNUIMessage({ type = "calls", data = calls }) - end) - end) RegisterNetEvent('mdt:client:exitMDT', function() diff --git a/server/main.lua b/server/main.lua index f1013b77..e59c3a7a 100644 --- a/server/main.lua +++ b/server/main.lua @@ -221,31 +221,15 @@ RegisterNetEvent("ps-mdt:server:ClockSystem", function() end end) -QBCore.Functions.CreateCallback('ps-mdt:getDispatchCalls', function(source, cb) - if GetResourceState('ps-dispatch') ~= 'started' then - cb({}) - return - end - - local calls = exports['ps-dispatch']:GetDispatchCalls() - - if next(calls) == nil then - cb({}) - return - end - - cb(calls) -end) - RegisterNetEvent('mdt:server:openMDT', function() local src = source local PlayerData = GetPlayerData(src) if not PermCheck(src, PlayerData) then return end local Radio = Player(src).state.radioChannel or 0 - -- if GetResourceState('ps-dispatch') == 'started' then - -- calls = exports['ps-dispatch']:GetDispatchCalls() - -- end + if GetResourceState('ps-dispatch') == 'started' then + calls = exports['ps-dispatch']:GetDispatchCalls() + end activeUnits[PlayerData.citizenid] = { cid = PlayerData.citizenid, @@ -259,7 +243,7 @@ RegisterNetEvent('mdt:server:openMDT', function() local JobType = GetJobType(PlayerData.job.name) local bulletin = GetBulletins(JobType) - TriggerClientEvent('mdt:client:open', src, bulletin, activeUnits, PlayerData.citizenid) + TriggerClientEvent('mdt:client:open', src, bulletin, activeUnits, calls, PlayerData.citizenid) end) QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, sentData) @@ -307,11 +291,6 @@ QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, return cb({}) end) -QBCore.Functions.CreateCallback('ps-mdt:getDispatchCalls', function(source, cb) - local calls = exports['ps-dispatch']:GetDispatchCalls() - cb(calls) -end) - QBCore.Functions.CreateCallback("mdt:server:getWarrants", function(source, cb) local WarrantData = {} local data = MySQL.query.await("SELECT * FROM mdt_convictions", {}) From 6df4f776f31942904914764254fd60cdb902500f Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 5 Dec 2023 04:04:24 -0500 Subject: [PATCH 345/381] Added back https://github.com/Project-Sloth/ps-mdt/commit/de72ac5e22bdca94665cf7e32c8247b87eecfc03 --- server/main.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/main.lua b/server/main.lua index e59c3a7a..d41c6d67 100644 --- a/server/main.lua +++ b/server/main.lua @@ -291,6 +291,11 @@ QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, return cb({}) end) +QBCore.Functions.CreateCallback('ps-mdt:getDispatchCalls', function(source, cb) + local calls = exports['ps-dispatch']:GetDispatchCalls() + cb(calls) +end) + QBCore.Functions.CreateCallback("mdt:server:getWarrants", function(source, cb) local WarrantData = {} local data = MySQL.query.await("SELECT * FROM mdt_convictions", {}) From 2d4d7e7f26710534c7d919996df3f62589cc9bbf Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 5 Dec 2023 04:04:56 -0500 Subject: [PATCH 346/381] 2.6.3 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 92fe9757..3d795ba6 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.2' +version '2.6.3' lua54 'yes' From e4e6883adeb4105abf1b73ea332c0154f2e09945 Mon Sep 17 00:00:00 2001 From: complex Date: Fri, 8 Dec 2023 07:16:10 +0200 Subject: [PATCH 347/381] Matching Fix for Performance Issues --- server/main.lua | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/server/main.lua b/server/main.lua index d41c6d67..603749b7 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1493,29 +1493,34 @@ RegisterNetEvent('mdt:server:removeIncidentCriminal', function(cid, incident) end) -- Dispatch - RegisterNetEvent('mdt:server:setWaypoint', function(callid) local src = source - local Player = QBCore.Functions.GetPlayer(source) + local Player = QBCore.Functions.GetPlayer(src) + local callid = tonumber(callid) local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' or JobType == 'ambulance' then - if callid then - if isDispatchRunning then - TriggerClientEvent('mdt:client:setWaypoint', src, calls[callid]) + if isDispatchRunning then + for i = 1, #calls do + if calls[i]['id'] == callid then + TriggerClientEvent('mdt:client:setWaypoint', src, calls[i]) + return + end end end end end) - RegisterNetEvent('mdt:server:attachedUnits', function(callid) local src = source local Player = QBCore.Functions.GetPlayer(src) local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' or JobType == 'ambulance' then - if callid then - if isDispatchRunning then - TriggerClientEvent('mdt:client:attachedUnits', src, calls[callid]['units'], callid) + if isDispatchRunning then + for i = 1, #calls do + if calls[i]['id'] == callid then + TriggerClientEvent('mdt:client:attachedUnits', src, calls[i]['units'], callid) + return + end end end end @@ -1527,14 +1532,15 @@ RegisterNetEvent('mdt:server:setDispatchWaypoint', function(callid, cid) local callid = tonumber(callid) local JobType = GetJobType(Player.PlayerData.job.name) if JobType == 'police' or JobType == 'ambulance' then - if callid then - if isDispatchRunning then - - TriggerClientEvent('mdt:client:setWaypoint', src, calls[callid]) + if isDispatchRunning then + for i = 1, #calls do + if calls[i]['id'] == callid then + TriggerClientEvent('mdt:client:setWaypoint', src, calls[i]) + return + end end end end - end) RegisterNetEvent('mdt:server:callDragAttach', function(callid, cid) From 9348ead3cc82c696ce659b6aae123ef5f9cb03bb Mon Sep 17 00:00:00 2001 From: complex Date: Fri, 8 Dec 2023 07:21:11 +0200 Subject: [PATCH 348/381] callid check added back --- server/main.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/main.lua b/server/main.lua index 603749b7..897ea1bb 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1498,6 +1498,7 @@ RegisterNetEvent('mdt:server:setWaypoint', function(callid) local Player = QBCore.Functions.GetPlayer(src) local callid = tonumber(callid) local JobType = GetJobType(Player.PlayerData.job.name) + if not callid then return end if JobType == 'police' or JobType == 'ambulance' then if isDispatchRunning then for i = 1, #calls do @@ -1514,6 +1515,7 @@ RegisterNetEvent('mdt:server:attachedUnits', function(callid) local src = source local Player = QBCore.Functions.GetPlayer(src) local JobType = GetJobType(Player.PlayerData.job.name) + if not callid then return end if JobType == 'police' or JobType == 'ambulance' then if isDispatchRunning then for i = 1, #calls do @@ -1531,6 +1533,7 @@ RegisterNetEvent('mdt:server:setDispatchWaypoint', function(callid, cid) local Player = QBCore.Functions.GetPlayer(src) local callid = tonumber(callid) local JobType = GetJobType(Player.PlayerData.job.name) + if not callid then return end if JobType == 'police' or JobType == 'ambulance' then if isDispatchRunning then for i = 1, #calls do From cf2f7d9ef60a9f8416d83fedd2d018ae1f6cf4a7 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 8 Dec 2023 02:11:50 -0500 Subject: [PATCH 349/381] 2.6.4 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 3d795ba6..04bd3967 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.3' +version '2.6.4' lua54 'yes' From 4d6f481ea060cb8ac0e30782148fae364e092afd Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 10 Dec 2023 14:23:26 +0100 Subject: [PATCH 350/381] Update config.lua to reflect changes --- shared/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/config.lua b/shared/config.lua index db240bc5..39705da0 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -14,7 +14,7 @@ Config.BillVariation = true -- If set to false (default) = The fine amount is just being removed from the player's bank account -- If set to true = The fine amount is beeing added to the society account after being removed from the player's bank account -Config.QBManagementUse = false +Config.QBBankingUse = false -- Set up your inventory to automatically retrieve images when a weapon is registered at a weapon shop or self-registered. -- If you're utilizing lj-inventory's latest version from GitHub, no further modifications are necessary. From 0811e45e0a857d58d6f4228d9a853f8beb47cd84 Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 10 Dec 2023 14:25:54 +0100 Subject: [PATCH 351/381] Update main.lua to reflect changes of QBCore QBCore changed how qb-management works and added this functionality into QB-Banking --- server/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/main.lua b/server/main.lua index 897ea1bb..d5a5abb4 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1872,8 +1872,8 @@ local function giveCitationItem(src, citizenId, fine, incidentId) end Player.Functions.AddItem('mdtcitation', 1, false, info) TriggerClientEvent('QBCore:Notify', src, PlayerName.." (" ..citizenId.. ") received a citation!") - if Config.QBManagementUse then - exports['qb-management']:AddMoney(Officer.PlayerData.job.name, fine) + if Config.QBBankingUse then + exports['qb-banking']:AddMoney(Officer.PlayerData.job.name, fine) end TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['mdtcitation'], "add") TriggerEvent('mdt:server:AddLog', "A Fine was writen by "..OfficerFullName.." and was sent to "..PlayerName..", the Amount was $".. fine ..". (ID: "..incidentId.. ")") From 07334551935f07bdd6bf69fcd9f0244ad968b8e6 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Wed, 13 Dec 2023 23:58:16 -0800 Subject: [PATCH 352/381] Bug fix: Search for vehicle missing from vehicles.lua causes DMV search to get stuck (#437) * pull all updated changes * add check for vehdata on search --- client/main.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 77b1818b..a399dd24 100644 --- a/client/main.lua +++ b/client/main.lua @@ -648,8 +648,17 @@ RegisterNUICallback("searchVehicles", function(data, cb) result[i]['plate'] = string.upper(result[i]['plate']) result[i]['color'] = Config.ColorInformation[mods['color1']] result[i]['colorName'] = Config.ColorNames[mods['color1']] + + -- If a server forgets to define a vehicle in their vehicles table, we log a console error + -- and set it to unknown. This is to prevent the MDT from getting stuck. local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] - result[i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] + if vehData == nil then + print("Vehicle not found for profile:", vehicle['vehicle']) -- Do not remove print, is a guide for a nil error. + print("Make sure the profile you're trying to load has all cars added to the core under vehicles.lua.") -- Do not remove print, is a guide for a nil error. + result[i]['model'] = "UNKNOWN" + else + result[i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] + end end cb(result) From ec913ac7b2324918822169a9d12d0b01f6a8d838 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 14 Dec 2023 02:58:42 -0500 Subject: [PATCH 353/381] 2.6.7 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 04bd3967..0f78ee0c 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.4' +version '2.6.7' lua54 'yes' From dbe47050a9e8fa4cd519d821d7fe5e9d34011b3c Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 14 Dec 2023 02:59:03 -0500 Subject: [PATCH 354/381] 2.6.5 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 0f78ee0c..6709ea00 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.7' +version '2.6.5' lua54 'yes' From 04725d60e8541c8cc9750594f638b7272acd9add Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 14 Dec 2023 04:59:56 -0500 Subject: [PATCH 355/381] Reverts https://github.com/Project-Sloth/ps-mdt/pull/414 Reverts PR, breaks licenses not showing correctly, will push a better update --- server/dbm.lua | 15 ++++++++++++--- server/main.lua | 7 ++++++- shared/config.lua | 9 --------- ui/app.js | 1 - 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/server/dbm.lua b/server/dbm.lua index 2c1fe059..c85be6da 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -107,7 +107,12 @@ function GetPlayerLicenses(identifier) if metadata["licences"] ~= nil and metadata["licences"] then return metadata["licences"] else - return Config.Licenses + return { + ['driver'] = false, + ['business'] = false, + ['weapon'] = false, + ['pilot'] = false + } end end end @@ -143,8 +148,12 @@ function UpdateAllLicenses(identifier, incomingLicenses) local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) result = json.decode(result) - result.licences = result.licences or Config.Licenses - result.licences['driver'] = true + result.licences = result.licences or { + ['driver'] = true, + ['business'] = false, + ['weapon'] = false, + ['pilot'] = false + } for k, _ in pairs(incomingLicenses) do result.licences[k] = incomingLicenses[k] diff --git a/server/main.lua b/server/main.lua index d5a5abb4..c4ee40a6 100644 --- a/server/main.lua +++ b/server/main.lua @@ -367,7 +367,12 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb if type(target.charinfo) == 'string' then target.charinfo = json.decode(target.charinfo) end if type(target.metadata) == 'string' then target.metadata = json.decode(target.metadata) end - local licencesdata = target.metadata['licences'] or Config.Licenses + local licencesdata = target.metadata['licences'] or { + ['driver'] = false, + ['business'] = false, + ['weapon'] = false, + ['pilot'] = false + } local job, grade = UnpackJob(target.job) diff --git a/shared/config.lua b/shared/config.lua index 39705da0..50abaf41 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -24,15 +24,6 @@ Config.InventoryForWeaponsImages = "lj-inventory" -- "LegacyFuel", "lj-fuel", "ps-fuel" Config.Fuel = "ps-fuel" --- ['License Name'] = true/false. If false, license are set to false by default. -Config.Licenses = { - ['driver'] = false, - ['business'] = false, - ['weapon'] = false, - ['pilot'] = false, - ['weed'] = false -} - -- Google Docs Link Config.sopLink = { ['police'] = '', diff --git a/ui/app.js b/ui/app.js index 8ca740af..85bf50aa 100644 --- a/ui/app.js +++ b/ui/app.js @@ -24,7 +24,6 @@ var DispatchNum = 0; var playerJob = ""; let rosterLink = ""; let sopLink = ""; -const licenseTypesGlobal = ['business', 'pilot', 'weapon', 'driver', 'weed']; //Set this to false if you don't want to show the send to community service button on the incidents page const canSendToCommunityService = false From ec52e2e01279d9e112043d1690571508b9a14947 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:12:39 -0500 Subject: [PATCH 356/381] Added SQL print to change players table --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3eb56012..eb73689a 100644 --- a/README.md +++ b/README.md @@ -310,7 +310,10 @@ Config.RosterLink = { - **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. -- **Getting a error about utf8mb4_unicode illegal collation?** - QBCore has decided to change their collations on the new txAdmin recipe, change your collation on your players table to utf8mb4_general_ci. +- **Getting a error about utf8mb4_unicode illegal collation?** - QBCore has decided to change their collations on the new txAdmin recipe, change your collation on your players table to utf8mb4_general_ci. Run this query below on your database to automatically change it. +```sql +ALTER TABLE players CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci +``` # Reskins From 978bb0655dd8c3d010ff2d863e45641033225868 Mon Sep 17 00:00:00 2001 From: BackSH00TER <18689469+BackSH00TER@users.noreply.github.com> Date: Sun, 17 Dec 2023 16:25:00 -0800 Subject: [PATCH 357/381] Fix people search on the incidents, bolos, reports pages (#441) * pull all updated changes * fix search on incidents page --- server/main.lua | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/server/main.lua b/server/main.lua index c4ee40a6..1f9ae310 100644 --- a/server/main.lua +++ b/server/main.lua @@ -850,14 +850,8 @@ RegisterNetEvent('mdt:server:incidentSearchPerson', function(query) return "img/male.png" end - local firstname, lastname = query:match("^(%S+)%s*(%S*)$") - firstname = firstname or query - lastname = lastname or query - - local result = MySQL.query.await("SELECT p.citizenid, p.charinfo, p.metadata, md.pfp from players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE (LOWER(JSON_UNQUOTE(JSON_EXTRACT(`charinfo`, '$.firstname'))) LIKE :firstname AND LOWER(JSON_UNQUOTE(JSON_EXTRACT(`charinfo`, '$.lastname'))) LIKE :lastname) OR LOWER(`citizenid`) LIKE :citizenid AND `jobtype` = :jobtype LIMIT 30", { - firstname = string.lower('%' .. firstname .. '%'), - lastname = string.lower('%' .. lastname .. '%'), - citizenid = string.lower('%' .. query .. '%'), + local result = MySQL.query.await("SELECT p.citizenid, p.charinfo, p.metadata, md.pfp from players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query OR LOWER(md.fingerprint) LIKE :query AND jobtype = :jobtype LIMIT 30", { + query = string.lower('%'..query..'%'), jobtype = JobType }) From dd52e59dbbd82f273c3366ba06816c97baf71250 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Thu, 21 Dec 2023 01:01:38 -0500 Subject: [PATCH 358/381] 2.6.6 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 6709ea00..ed8fe508 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.5' +version '2.6.6' lua54 'yes' From ffbdd6837ad5f5f7b50b19384259748f6b5f8c99 Mon Sep 17 00:00:00 2001 From: Sisyphus <114317252+xSisyphusx@users.noreply.github.com> Date: Sun, 11 Feb 2024 01:22:17 -0700 Subject: [PATCH 359/381] Update README.md (#456) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb73689a..ee7f1f9b 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ local ClockinWebhook = '' # Jailing & Community Service -* If you're getting kicked for attempted exploit abuse when jailing. Located the follow event below on qb-policejob > server > main.lua +* If you're getting kicked for attempted exploit abuse while jailing. Locate the following event below in qb-policejob > server > main.lua ```lua police:server:JailPlayer From 9cc1eedd2b2117c294b49e596b1b9f886b62d3ae Mon Sep 17 00:00:00 2001 From: Peter Date: Fri, 22 Mar 2024 01:27:34 +0000 Subject: [PATCH 360/381] Add support for longtext for incident details as incident reports can very quickly exceed the limit of text column length (#458) Update mdt.sql --- mdt.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mdt.sql b/mdt.sql index c4836e72..64c658b0 100644 --- a/mdt.sql +++ b/mdt.sql @@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS `mdt_reports` ( `author` varchar(50) DEFAULT NULL, `title` varchar(255) DEFAULT NULL, `type` varchar(50) DEFAULT NULL, - `details` text DEFAULT NULL, + `details` LONGTEXT DEFAULT NULL, `tags` text DEFAULT NULL, `officersinvolved` text DEFAULT NULL, `civsinvolved` text DEFAULT NULL, @@ -73,7 +73,7 @@ CREATE TABLE IF NOT EXISTS `mdt_incidents` ( `id` int(11) NOT NULL AUTO_INCREMENT, `author` varchar(50) NOT NULL DEFAULT '', `title` varchar(50) NOT NULL DEFAULT '0', - `details` text NOT NULL, + `details` LONGTEXT NOT NULL, `tags` text NOT NULL, `officersinvolved` text NOT NULL, `civsinvolved` text NOT NULL, @@ -133,4 +133,4 @@ CREATE TABLE IF NOT EXISTS `mdt_clocking` ( `total_time` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`) USING BTREE, KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; \ No newline at end of file +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; From b426e13ed59731d7d4c5d9f9d0fca6f965bbd040 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 1 Apr 2024 15:10:23 -0400 Subject: [PATCH 361/381] Create v2 --- v2 | 1 + 1 file changed, 1 insertion(+) create mode 100644 v2 diff --git a/v2 b/v2 new file mode 100644 index 00000000..69b99b12 --- /dev/null +++ b/v2 @@ -0,0 +1 @@ +April fools. From 7fc6b89cf22131d6c1b63874a78c3485045f0a26 Mon Sep 17 00:00:00 2001 From: ItsMuri <88394932+ItzMuri@users.noreply.github.com> Date: Mon, 22 Apr 2024 20:11:29 +0200 Subject: [PATCH 362/381] Update app.js (#465) --- ui/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 85bf50aa..c9b41196 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5788,7 +5788,7 @@ center: [0, -1024], maxBoundsViscosity: 1.0 }); -var customImageUrl = 'https://i.imgur.com/EdOZjzF.jpg'; +var customImageUrl = 'https://cdn.discordapp.com/attachments/1057280333399199764/1227266280436793444/EdOZjzF_-_Imgur.jpg?ex=6627c7ca&is=661552ca&hm=f5228e6355aa23d97fee9286020a72434d913d23c522f4f4c9191db2756549e2&'; var sw = map.unproject([0, 1024], 3 - 1); var ne = map.unproject([1024, 0], 3 - 1); From 326d2b8e3bfcd13b89b49fe4bad4e0e328095767 Mon Sep 17 00:00:00 2001 From: Mathu-lmn <80094438+Mathu-lmn@users.noreply.github.com> Date: Mon, 22 Apr 2024 20:22:29 +0200 Subject: [PATCH 363/381] Fix map markers not displaying (#464) * Fix map markers not displaying * Update app.js --- ui/app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/app.js b/ui/app.js index c9b41196..5debcdd5 100644 --- a/ui/app.js +++ b/ui/app.js @@ -4547,7 +4547,7 @@ window.addEventListener("message", function (event) { $(".active-calls-list").empty(); $.each(table, function (index, value) { if (value && value?.job?.includes(playerJob) || value?.jobs.includes(PlayerJobType)) { - + DispatchMAP(value); const prio = value["priority"]; let DispatchItem = `
                #${value.callId || value.id}
                ${value.dispatchCode || value.code}
                ${value.dispatchMessage || value.message}
                ${value.units.length}
                `; @@ -5820,9 +5820,9 @@ function DispatchMAP(DISPATCH) { var MIN = Math.round(Math.round((new Date() - new Date(DISPATCH.time)) / 1000) / 60); if (MIN > 10) return; - var COORDS_X = DISPATCH.origin.x - var COORDS_Y = DISPATCH.origin.y - var CODE = DISPATCH.callId + var COORDS_X = DISPATCH.coords.x + var COORDS_Y = DISPATCH.coords.y + var CODE = DISPATCH.id Dispatches[CODE] = L.marker([COORDS_Y, COORDS_X], { icon: DispatchPing }); Dispatches[CODE].addTo(map); @@ -5832,7 +5832,7 @@ function DispatchMAP(DISPATCH) { map.removeLayer(Dispatches[CODE]); }, 1200000); - Dispatches[CODE].bindTooltip(`
                ${DISPATCH.dispatchMessage}
                #${DISPATCH.callId}
                `, + Dispatches[CODE].bindTooltip(`
                ${DISPATCH.message}
                #${DISPATCH.id}
                `, { direction: 'top', permanent: false, From bfc1b7d0b7e658d334a0f23c51e5db775764c0d6 Mon Sep 17 00:00:00 2001 From: ItsMuri <88394932+ItzMuri@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:52:58 +0200 Subject: [PATCH 364/381] Update app.js (#472) --- ui/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/app.js b/ui/app.js index 5debcdd5..37150e31 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5787,8 +5787,8 @@ preferCanvas: true, center: [0, -1024], maxBoundsViscosity: 1.0 }); - -var customImageUrl = 'https://cdn.discordapp.com/attachments/1057280333399199764/1227266280436793444/EdOZjzF_-_Imgur.jpg?ex=6627c7ca&is=661552ca&hm=f5228e6355aa23d97fee9286020a72434d913d23c522f4f4c9191db2756549e2&'; + // https://upload.versescripts.net/ +var customImageUrl = 'https://users-cdn.versescripts.net/aeb7987615ac1a17a73e6acdd11c00fa.jpg'; var sw = map.unproject([0, 1024], 3 - 1); var ne = map.unproject([1024, 0], 3 - 1); From 6f15c32c716d92facf04468c0a9061aa5362102e Mon Sep 17 00:00:00 2001 From: Matthew <22198949+mafewtm@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:17:02 -0400 Subject: [PATCH 365/381] fix(sql): collate for qbox (#476) * fix(sql): collate for qbox * fix: separate sqls for the frameworks --- README.md | 2 +- mdt.sql | 22 ++++---- sql/qbcore.sql | 136 +++++++++++++++++++++++++++++++++++++++++++++++++ sql/qbox.sql | 136 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 284 insertions(+), 12 deletions(-) create mode 100644 sql/qbcore.sql create mode 100644 sql/qbox.sql diff --git a/README.md b/README.md index ee7f1f9b..591a7771 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl # Installation * Download ZIP * Drag and drop resource into your server files, make sure to remove -main in the folder name -* Run the attached SQL script (mdt.sql) # Weapon Info Export @@ -336,3 +335,4 @@ The below repos are direct forks of ps-mdt and have been edited to fit certain c * [ImXirvin](https://github.com/ImXirvin) * [lenzh](https://github.com/lenzh) * Everyone else that we may have missed, thank you! +* Open the sql folder and run the SQL script which corresponds to your framework diff --git a/mdt.sql b/mdt.sql index 64c658b0..ac5eff6b 100644 --- a/mdt.sql +++ b/mdt.sql @@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `mdt_data` ( `fingerprint` VARCHAR(50) DEFAULT NULL, PRIMARY KEY (`cid`), KEY `id` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_bulletin` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -19,7 +19,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bulletin` ( `time` varchar(20) NOT NULL, `jobtype` VARCHAR(25) DEFAULT 'police', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_reports` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS `mdt_reports` ( `time` varchar(20) DEFAULT NULL, `jobtype` varchar(25) DEFAULT 'police', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_bolos` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -50,7 +50,7 @@ CREATE TABLE IF NOT EXISTS `mdt_bolos` ( `time` varchar(20) DEFAULT NULL, `jobtype` varchar(25) NOT NULL DEFAULT 'police', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_convictions` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -67,7 +67,7 @@ CREATE TABLE IF NOT EXISTS `mdt_convictions` ( `recsentence` int(11) DEFAULT 0, `time` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_incidents` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -81,7 +81,7 @@ CREATE TABLE IF NOT EXISTS `mdt_incidents` ( `time` varchar(20) DEFAULT NULL, `jobtype` varchar(25) NOT NULL DEFAULT 'police', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_logs` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -89,7 +89,7 @@ CREATE TABLE IF NOT EXISTS `mdt_logs` ( `time` varchar(20) DEFAULT NULL, `jobtype` varchar(25) DEFAULT 'police', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -100,7 +100,7 @@ CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( `image` text NOT NULL DEFAULT '', `points` int(11) DEFAULT 0, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -112,7 +112,7 @@ CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( `image` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `serial` (`serial`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_impound` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -121,7 +121,7 @@ CREATE TABLE IF NOT EXISTS `mdt_impound` ( `fee` int(11) DEFAULT NULL, `time` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `mdt_clocking` ( `id` int(10) NOT NULL AUTO_INCREMENT, @@ -133,4 +133,4 @@ CREATE TABLE IF NOT EXISTS `mdt_clocking` ( `total_time` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`user_id`) USING BTREE, KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/sql/qbcore.sql b/sql/qbcore.sql new file mode 100644 index 00000000..a9a43dc6 --- /dev/null +++ b/sql/qbcore.sql @@ -0,0 +1,136 @@ +CREATE TABLE IF NOT EXISTS `mdt_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cid` VARCHAR(20) DEFAULT NULL, + `information` MEDIUMTEXT DEFAULT NULL, + `tags` TEXT NOT NULL, + `gallery` TEXT NOT NULL, + `jobtype` VARCHAR(25) DEFAULT 'police', + `pfp` TEXT DEFAULT NULL, + `fingerprint` VARCHAR(50) DEFAULT NULL, + PRIMARY KEY (`cid`), + KEY `id` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_bulletin` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` TEXT NOT NULL, + `desc` TEXT NOT NULL, + `author` varchar(50) NOT NULL, + `time` varchar(20) NOT NULL, + `jobtype` VARCHAR(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_reports` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `type` varchar(50) DEFAULT NULL, + `details` LONGTEXT DEFAULT NULL, + `tags` text DEFAULT NULL, + `officersinvolved` text DEFAULT NULL, + `civsinvolved` text DEFAULT NULL, + `gallery` text DEFAULT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_bolos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) DEFAULT NULL, + `title` varchar(50) DEFAULT NULL, + `plate` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `individual` varchar(50) DEFAULT NULL, + `detail` text DEFAULT NULL, + `tags` text DEFAULT NULL, + `gallery` text DEFAULT NULL, + `officersinvolved` text DEFAULT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) NOT NULL DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_convictions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cid` varchar(50) DEFAULT NULL, + `linkedincident` int(11) NOT NULL DEFAULT 0, + `warrant` varchar(50) DEFAULT NULL, + `guilty` varchar(50) DEFAULT NULL, + `processed` varchar(50) DEFAULT NULL, + `associated` varchar(50) DEFAULT '0', + `charges` text DEFAULT NULL, + `fine` int(11) DEFAULT 0, + `sentence` int(11) DEFAULT 0, + `recfine` int(11) DEFAULT 0, + `recsentence` int(11) DEFAULT 0, + `time` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_incidents` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) NOT NULL DEFAULT '', + `title` varchar(50) NOT NULL DEFAULT '0', + `details` LONGTEXT NOT NULL, + `tags` text NOT NULL, + `officersinvolved` text NOT NULL, + `civsinvolved` text NOT NULL, + `evidence` text NOT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) NOT NULL DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_logs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `text` text NOT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `plate` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `stolen` tinyint(1) NOT NULL DEFAULT 0, + `code5` tinyint(1) NOT NULL DEFAULT 0, + `image` text NOT NULL DEFAULT '', + `points` int(11) DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `serial` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `weapClass` varchar(50) DEFAULT NULL, + `weapModel` varchar(50) DEFAULT NULL, + `image` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `serial` (`serial`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_impound` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `vehicleid` int(11) NOT NULL, + `linkedreport` int(11) NOT NULL, + `fee` int(11) DEFAULT NULL, + `time` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_clocking` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `user_id` varchar(50) NOT NULL DEFAULT '', + `firstname` varchar(255) NOT NULL DEFAULT '', + `lastname` varchar(255) NOT NULL DEFAULT '', + `clock_in_time` varchar(255) NOT NULL DEFAULT '', + `clock_out_time` varchar(50) DEFAULT NULL, + `total_time` int(10) NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`) USING BTREE, + KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; diff --git a/sql/qbox.sql b/sql/qbox.sql new file mode 100644 index 00000000..662ce44b --- /dev/null +++ b/sql/qbox.sql @@ -0,0 +1,136 @@ +CREATE TABLE IF NOT EXISTS `mdt_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cid` VARCHAR(20) DEFAULT NULL, + `information` MEDIUMTEXT DEFAULT NULL, + `tags` TEXT NOT NULL, + `gallery` TEXT NOT NULL, + `jobtype` VARCHAR(25) DEFAULT 'police', + `pfp` TEXT DEFAULT NULL, + `fingerprint` VARCHAR(50) DEFAULT NULL, + PRIMARY KEY (`cid`), + KEY `id` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_bulletin` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` TEXT NOT NULL, + `desc` TEXT NOT NULL, + `author` varchar(50) NOT NULL, + `time` varchar(20) NOT NULL, + `jobtype` VARCHAR(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_reports` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `type` varchar(50) DEFAULT NULL, + `details` LONGTEXT DEFAULT NULL, + `tags` text DEFAULT NULL, + `officersinvolved` text DEFAULT NULL, + `civsinvolved` text DEFAULT NULL, + `gallery` text DEFAULT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_bolos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) DEFAULT NULL, + `title` varchar(50) DEFAULT NULL, + `plate` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `individual` varchar(50) DEFAULT NULL, + `detail` text DEFAULT NULL, + `tags` text DEFAULT NULL, + `gallery` text DEFAULT NULL, + `officersinvolved` text DEFAULT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) NOT NULL DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_convictions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cid` varchar(50) DEFAULT NULL, + `linkedincident` int(11) NOT NULL DEFAULT 0, + `warrant` varchar(50) DEFAULT NULL, + `guilty` varchar(50) DEFAULT NULL, + `processed` varchar(50) DEFAULT NULL, + `associated` varchar(50) DEFAULT '0', + `charges` text DEFAULT NULL, + `fine` int(11) DEFAULT 0, + `sentence` int(11) DEFAULT 0, + `recfine` int(11) DEFAULT 0, + `recsentence` int(11) DEFAULT 0, + `time` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_incidents` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) NOT NULL DEFAULT '', + `title` varchar(50) NOT NULL DEFAULT '0', + `details` LONGTEXT NOT NULL, + `tags` text NOT NULL, + `officersinvolved` text NOT NULL, + `civsinvolved` text NOT NULL, + `evidence` text NOT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) NOT NULL DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_logs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `text` text NOT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `plate` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `stolen` tinyint(1) NOT NULL DEFAULT 0, + `code5` tinyint(1) NOT NULL DEFAULT 0, + `image` text NOT NULL DEFAULT '', + `points` int(11) DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `serial` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `weapClass` varchar(50) DEFAULT NULL, + `weapModel` varchar(50) DEFAULT NULL, + `image` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `serial` (`serial`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_impound` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `vehicleid` int(11) NOT NULL, + `linkedreport` int(11) NOT NULL, + `fee` int(11) DEFAULT NULL, + `time` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_clocking` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `user_id` varchar(50) NOT NULL DEFAULT '', + `firstname` varchar(255) NOT NULL DEFAULT '', + `lastname` varchar(255) NOT NULL DEFAULT '', + `clock_in_time` varchar(255) NOT NULL DEFAULT '', + `clock_out_time` varchar(50) DEFAULT NULL, + `total_time` int(10) NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`) USING BTREE, + KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; From e5e06ee42b3e8e4c06e7dd71a0ee76eb2bca4df0 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:17:52 -0400 Subject: [PATCH 366/381] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 591a7771..aa8d8171 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ For all support questions, ask in our [Discord](https://www.discord.gg/projectsl # Installation * Download ZIP * Drag and drop resource into your server files, make sure to remove -main in the folder name +* Open the sql folder and run the SQL script which corresponds to your framework # Weapon Info Export @@ -335,4 +336,3 @@ The below repos are direct forks of ps-mdt and have been edited to fit certain c * [ImXirvin](https://github.com/ImXirvin) * [lenzh](https://github.com/lenzh) * Everyone else that we may have missed, thank you! -* Open the sql folder and run the SQL script which corresponds to your framework From b74bdfd3e0361b4a31240ff1ab937a61f3566c1e Mon Sep 17 00:00:00 2001 From: Matthew <22198949+mafewtm@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:43:44 -0400 Subject: [PATCH 367/381] fix: remove extra sql (#478) --- mdt.sql | 136 -------------------------------------------------------- 1 file changed, 136 deletions(-) delete mode 100644 mdt.sql diff --git a/mdt.sql b/mdt.sql deleted file mode 100644 index ac5eff6b..00000000 --- a/mdt.sql +++ /dev/null @@ -1,136 +0,0 @@ -CREATE TABLE IF NOT EXISTS `mdt_data` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `cid` VARCHAR(20) DEFAULT NULL, - `information` MEDIUMTEXT DEFAULT NULL, - `tags` TEXT NOT NULL, - `gallery` TEXT NOT NULL, - `jobtype` VARCHAR(25) DEFAULT 'police', - `pfp` TEXT DEFAULT NULL, - `fingerprint` VARCHAR(50) DEFAULT NULL, - PRIMARY KEY (`cid`), - KEY `id` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_bulletin` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` TEXT NOT NULL, - `desc` TEXT NOT NULL, - `author` varchar(50) NOT NULL, - `time` varchar(20) NOT NULL, - `jobtype` VARCHAR(25) DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_reports` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `author` varchar(50) DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `type` varchar(50) DEFAULT NULL, - `details` LONGTEXT DEFAULT NULL, - `tags` text DEFAULT NULL, - `officersinvolved` text DEFAULT NULL, - `civsinvolved` text DEFAULT NULL, - `gallery` text DEFAULT NULL, - `time` varchar(20) DEFAULT NULL, - `jobtype` varchar(25) DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_bolos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `author` varchar(50) DEFAULT NULL, - `title` varchar(50) DEFAULT NULL, - `plate` varchar(50) DEFAULT NULL, - `owner` varchar(50) DEFAULT NULL, - `individual` varchar(50) DEFAULT NULL, - `detail` text DEFAULT NULL, - `tags` text DEFAULT NULL, - `gallery` text DEFAULT NULL, - `officersinvolved` text DEFAULT NULL, - `time` varchar(20) DEFAULT NULL, - `jobtype` varchar(25) NOT NULL DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_convictions` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `cid` varchar(50) DEFAULT NULL, - `linkedincident` int(11) NOT NULL DEFAULT 0, - `warrant` varchar(50) DEFAULT NULL, - `guilty` varchar(50) DEFAULT NULL, - `processed` varchar(50) DEFAULT NULL, - `associated` varchar(50) DEFAULT '0', - `charges` text DEFAULT NULL, - `fine` int(11) DEFAULT 0, - `sentence` int(11) DEFAULT 0, - `recfine` int(11) DEFAULT 0, - `recsentence` int(11) DEFAULT 0, - `time` varchar(20) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_incidents` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `author` varchar(50) NOT NULL DEFAULT '', - `title` varchar(50) NOT NULL DEFAULT '0', - `details` LONGTEXT NOT NULL, - `tags` text NOT NULL, - `officersinvolved` text NOT NULL, - `civsinvolved` text NOT NULL, - `evidence` text NOT NULL, - `time` varchar(20) DEFAULT NULL, - `jobtype` varchar(25) NOT NULL DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_logs` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `text` text NOT NULL, - `time` varchar(20) DEFAULT NULL, - `jobtype` varchar(25) DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `plate` varchar(50) DEFAULT NULL, - `information` text NOT NULL DEFAULT '', - `stolen` tinyint(1) NOT NULL DEFAULT 0, - `code5` tinyint(1) NOT NULL DEFAULT 0, - `image` text NOT NULL DEFAULT '', - `points` int(11) DEFAULT 0, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `serial` varchar(50) DEFAULT NULL, - `owner` varchar(50) DEFAULT NULL, - `information` text NOT NULL DEFAULT '', - `weapClass` varchar(50) DEFAULT NULL, - `weapModel` varchar(50) DEFAULT NULL, - `image` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `serial` (`serial`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_impound` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `vehicleid` int(11) NOT NULL, - `linkedreport` int(11) NOT NULL, - `fee` int(11) DEFAULT NULL, - `time` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -CREATE TABLE IF NOT EXISTS `mdt_clocking` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `user_id` varchar(50) NOT NULL DEFAULT '', - `firstname` varchar(255) NOT NULL DEFAULT '', - `lastname` varchar(255) NOT NULL DEFAULT '', - `clock_in_time` varchar(255) NOT NULL DEFAULT '', - `clock_out_time` varchar(50) DEFAULT NULL, - `total_time` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`user_id`) USING BTREE, - KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; From e51d1b62734ffd2157ba1e8a52bbcb2007f5429d Mon Sep 17 00:00:00 2001 From: RyanM Date: Sat, 6 Jul 2024 23:30:45 +0800 Subject: [PATCH 368/381] Update Map Link (Again) (#481) * Update app.js * Update app.js --------- Co-authored-by: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> --- ui/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 37150e31..db86ae9f 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5788,7 +5788,7 @@ center: [0, -1024], maxBoundsViscosity: 1.0 }); // https://upload.versescripts.net/ -var customImageUrl = 'https://users-cdn.versescripts.net/aeb7987615ac1a17a73e6acdd11c00fa.jpg'; +var customImageUrl = 'https://files.fivemerr.com/images/a62a84ff-6a1b-4dc4-a199-c7140a216703.jpg'; var sw = map.unproject([0, 1024], 3 - 1); var ne = map.unproject([1024, 0], 3 - 1); From 28599f65aebea1cd44fb2a9eabbd594d82560890 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Sat, 6 Jul 2024 11:31:17 -0400 Subject: [PATCH 369/381] 2.6.7 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index ed8fe508..0f78ee0c 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.6' +version '2.6.7' lua54 'yes' From fd0662b5918a409e73642652bd4c9b055f2b9d68 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 8 Jul 2024 00:53:51 -0400 Subject: [PATCH 370/381] Added support for Fivemerr Image Integration --- client/cl_mugshot.lua | 32 +++++++++++++++++++-------- server/main.lua | 50 ++++++++++++++++++++++++++++++++----------- shared/config.lua | 8 +++++++ 3 files changed, 69 insertions(+), 21 deletions(-) diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua index 8217bc2e..69fe41a9 100644 --- a/client/cl_mugshot.lua +++ b/client/cl_mugshot.lua @@ -17,11 +17,24 @@ local MugShots = {} -- Mugshot functions local function TakeMugShot() - QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(MugShotWebhook) - exports['screenshot-basic']:requestScreenshotUpload(MugShotWebhook, 'files[]', {encoding = 'jpg'}, function(data) - local resp = json.decode(data) - table.insert(MugshotArray, resp.attachments[1].url) - end) + QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(webhookUrl, apiKey) + if Config.MugShotWebhook then + exports['screenshot-basic']:requestScreenshotUpload(webhookUrl, 'files[]', {encoding = 'jpg'}, function(data) + local resp = json.decode(data) + table.insert(MugshotArray, resp.attachments[1].url) + end) + elseif Config.FivemerrMugShot then + exports['screenshot-basic']:requestScreenshotUpload('https://api.fivemerr.com/v1/media/images', 'file', { + headers = { + Authorization = apiKey + }, + encoding = 'png' + }, function(data) + local resp = json.decode(data) + local link = (resp and resp.url) or 'invalid_url' + print(link) + end) + end end) end @@ -190,8 +203,9 @@ RegisterNetEvent('cqc-mugshot:client:trigger', function() end) RegisterNUICallback("sendToJail", function(data, cb) - QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(MugShotWebhook) - if MugShotWebhook ~= '' then + QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(webhookUrl, apiKey) + local webhookUrl = Config.MugShotWebhook and webhookUrl or 'https://api.fivemerr.com/v1/media/images' + if webhookUrl ~= '' then local citizenId, sentence = data.citizenId, data.sentence -- Gets the player id from the citizenId @@ -203,7 +217,7 @@ RegisterNUICallback("sendToJail", function(data, cb) local targetSourceId = Citizen.Await(p) if sentence > 0 then - if Config.UseCQCMugshot then + if Config.UseCQCMugshot then TriggerServerEvent('cqc-mugshot:server:triggerSuspect', targetSourceId) end Citizen.Wait(5000) @@ -212,4 +226,4 @@ RegisterNUICallback("sendToJail", function(data, cb) end end end) -end) +end) \ No newline at end of file diff --git a/server/main.lua b/server/main.lua index 1f9ae310..44029235 100644 --- a/server/main.lua +++ b/server/main.lua @@ -11,6 +11,15 @@ local antiSpam = false local calls = {} -------------------------------- +-- SET YOUR FIVEMERR API HERE. +-- Look at their docs below for more info. +-- https://docs.fivemerr.com/integrations/mdt-scripts/ps-mdt +-- Images for mug shots will be uploaded here and will not expire. +local FivemerrMugShot = 'https://api.fivemerr.com/v1/media/images' +local FivemerrApiKey = 'YOUR API KEY HERE' + +-------------------------------- +-- NOT RECOMMENDED. WE RECOMMEND USING Fivemerr. -- SET YOUR WEHBOOKS IN HERE -- Images for mug shots will be uploaded here. Add a Discord webhook. local MugShotWebhook = '' @@ -25,13 +34,27 @@ local IncidentWebhook = '' -------------------------------- QBCore.Functions.CreateCallback('ps-mdt:server:MugShotWebhook', function(source, cb) - if MugShotWebhook == '' then - print("\27[31mA webhook is missing in: MugShotWebhook (server > main.lua > line 16)\27[0m") + if Config.MugShotWebhook then + if MugShotWebhook == '' then + print("\27[31mA webhook is missing in: MugShotWebhook (server > main.lua > line 18)\27[0m") + cb('', '') + else + cb(MugShotWebhook, '') + end + elseif Config.FivemerrMugShot then + if FivemerrMugShot == '' then + print("\27[31mFivemerr setup is missing in: FivemerrMugShot (server > main.lua > line 19)\27[0m") + cb('', '') + else + cb(FivemerrMugShot, FivemerrApiKey) + end else - cb(MugShotWebhook) + print("\27[31mNo valid webhook configuration found.\27[0m") + cb('', '') end end) + local function GetActiveData(cid) local player = type(cid) == "string" and cid or tostring(cid) if player then @@ -89,17 +112,20 @@ end AddEventHandler('onResourceStart', function(resourceName) if GetCurrentResourceName() ~= resourceName then return end - Wait(3000) - if MugShotWebhook == '' then - print("\27[31mA webhook is missing in: MugShotWebhook (server > main.lua > line 16)\27[0m") + Wait(3000) + if Config.MugShotWebhook and MugShotWebhook == '' then + print("\27[31mA webhook is missing in: MugShotWebhook (server > main.lua > line 16)\27[0m") + end + if Config.FivemerrMugShot and FivemerrMugShot == '' then + print("\27[31mFivemerr setup is missing in: FivemerrMugShot (server > main.lua > line 19)\27[0m") end if ClockinWebhook == '' then - print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 20)\27[0m") - end - if GetResourceState('ps-dispatch') == 'started' then - local calls = exports['ps-dispatch']:GetDispatchCalls() - return calls - end + print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 24)\27[0m") + end + if GetResourceState('ps-dispatch') == 'started' then + local calls = exports['ps-dispatch']:GetDispatchCalls() + return calls + end end) RegisterNetEvent("ps-mdt:server:OnPlayerUnload", function() diff --git a/shared/config.lua b/shared/config.lua index 50abaf41..e8b35e9d 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -3,6 +3,14 @@ Config = Config or {} Config.UsingPsHousing = false Config.UsingDefaultQBApartments = true Config.OnlyShowOnDuty = true + +-- RECOMMENDED Fivemerr Images. DOES NOT EXPIRE. +-- YOU NEED TO SET THIS UP FOLLOW INSTRUCTIONS BELOW. +-- Documents: https://docs.fivemerr.com/integrations/mdt-scripts/ps-mdt +Config.FivemerrMugShot = true + +-- Discord webhook for images. NOT RECOMMENDED, IMAGES EXPIRE. +Config.MugShotWebhook = false Config.UseCQCMugshot = true -- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. From 14c8de7209cbe43a1e437a9d012a879d95ba28ad Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 8 Jul 2024 00:54:28 -0400 Subject: [PATCH 371/381] 2.7.0 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 0f78ee0c..64d64321 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.6.7' +version '2.7.0' lua54 'yes' From f556c14074f9e4d036aefda2bf79354a5bac7243 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 8 Jul 2024 01:00:18 -0400 Subject: [PATCH 372/381] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index aa8d8171..03617d83 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,10 @@ Config.UseCQCMugshot = true -- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. Config.MugPhotos = 1 ``` +* Use Fivemerr to upload your mugshot pictures. Do not use Discord, images will expire. Documents for setup are [here.](https://docs.fivemerr.com/integrations/mdt-scripts/ps-mdt) +``` +Config.FivemerrMugShot = true +``` * Create a Discord Webhook and add it [here](https://github.com/Project-Sloth/ps-mdt/blob/c10ea056705dd7b04894716266cd387b00109aff/server/main.lua#L16C26-L16C26) ```lua -- Images for mug shots will be uploaded here. Add a Discord webhook. From e853b0510c84604316c56dc5fc15a4cb1bd647a0 Mon Sep 17 00:00:00 2001 From: Chirag Patel Date: Tue, 9 Jul 2024 19:41:59 -0400 Subject: [PATCH 373/381] fix getWarrants SQL returning too much unnecessary data (#485) --- server/main.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/server/main.lua b/server/main.lua index 44029235..becc9c29 100644 --- a/server/main.lua +++ b/server/main.lua @@ -324,16 +324,14 @@ end) QBCore.Functions.CreateCallback("mdt:server:getWarrants", function(source, cb) local WarrantData = {} - local data = MySQL.query.await("SELECT * FROM mdt_convictions", {}) + local data = MySQL.query.await("SELECT * FROM mdt_convictions WHERE warrant = 1", {}) for _, value in pairs(data) do - if value.warrant == "1" then - WarrantData[#WarrantData+1] = { - cid = value.cid, - linkedincident = value.linkedincident, - name = GetNameFromId(value.cid), - time = value.time - } - end + WarrantData[#WarrantData+1] = { + cid = value.cid, + linkedincident = value.linkedincident, + name = GetNameFromId(value.cid), + time = value.time + } end cb(WarrantData) end) From bb37690f87cc63f69cab3b519f5895dc5d9dcb0a Mon Sep 17 00:00:00 2001 From: Solareon <769465+solareon@users.noreply.github.com> Date: Wed, 10 Jul 2024 01:42:55 +0200 Subject: [PATCH 374/381] feat(server/main): use ox_inventory hooks (#484) * feat(server/main): use ox_inventory hooks * refactor(server/main): improve documentation * feat(server/main): add configuration option for automatic registration --- README.md | 39 +---------------------------------- server/main.lua | 52 +++++++++++++++++++++++++++++++++++++++++++++++ shared/config.lua | 6 ++++++ 3 files changed, 59 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 03617d83..d386f64a 100644 --- a/README.md +++ b/README.md @@ -26,44 +26,7 @@ exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, we ## Setup for [ox_inventory](https://github.com/overextended/ox_inventory) -* Find `ox_inventory:buyItem` on modules > shops> server.lua -* Add the following code block -```lua -\\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 -``` -* Add the follow function towards the end of the script. -```lua -\\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 -``` +Set `Config.InventoryForWeaponsImages` to `"ox_inventory"` and `Config.RegisterCreatedWeapons` to true/false as desired. ## Self Register Weapons * Your citizens can self-register weapons found on their inventory. Event to trigger is below if you're using qb-target. There's also a command available named `registerweapon` but you'll need to uncomment if you want to use it. diff --git a/server/main.lua b/server/main.lua index becc9c29..24babfdb 100644 --- a/server/main.lua +++ b/server/main.lua @@ -2086,3 +2086,55 @@ function generateMessageFromResult(result) message = message .. "Details: " .. details return message end + +if Config.InventoryForWeaponsImages == "ox_inventory" and Config.RegisterWeaponsAutomatically then + exports.ox_inventory:registerHook('buyItem', function(payload) + if not string.find(payload.itemName, "WEAPON_") then return true end + CreateThread(function() + local owner = QBCore.Functions.GetPlayer(payload.source).PlayerData.citizenid + if not owner or not payload.metadata.serial then return end + local imageurl = ("https://cfx-nui-ox_inventory/web/images/%s.png"):format(payload.itemName) + local notes = "Purchased from shop" + local weapClass = "Class" --@TODO retrieve class better + + local success, result = pcall(function() + return CreateWeaponInfo(payload.metadata.serial, imageurl, notes, owner, weapClass, payload.itemName) + end) + + if not success then + print("Error in creating weapon info in MDT: " .. result) + end + end) + return true + end, { + typeFilter = { ['player'] = true } + }) + -- This is for other shop resources that use the AddItem method. + -- Only registers weapons with serial numbers, must specify a slot in ox_inventory:AddItem with metadata + -- metadata = { + -- registered = true + -- } + if Config.RegisterCreatedWeapons then + exports.ox_inventory:registerHook('createItem', function(payload) + if not string.find(payload.item.name, "WEAPON_") then return true end + CreateThread(function() + local owner = QBCore.Functions.GetPlayer(payload.inventoryId).PlayerData.citizenid + if not owner or not payload.metadata.serial then return end + local imageurl = ("https://cfx-nui-ox_inventory/web/images/%s.png"):format(payload.item.name) + local notes = "Purchased from shop" + local weapClass = "Class" --@TODO retrieve class better + + local success, result = pcall(function() + return CreateWeaponInfo(payload.metadata.serial, imageurl, notes, owner, weapClass, payload.item.name) + end) + + if not success then + print("Error in creating weapon info in MDT: " .. result) + end + end) + return true + end, { + typeFilter = { ['player'] = true } + }) + end +end \ No newline at end of file diff --git a/shared/config.lua b/shared/config.lua index e8b35e9d..2d99a865 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -29,6 +29,12 @@ Config.QBBankingUse = false -- However, if you're using a different inventory system, please refer to the "Inventory Edit | Automatic Add Weapons with images" section in ps-mdt's README. Config.InventoryForWeaponsImages = "lj-inventory" +-- Only compatible with ox_inventory +Config.RegisterWeaponsAutomatically = true + +-- Set to true to register all weapons that are added via AddItem in ox_inventory +Config.RegisterCreatedWeapons = true + -- "LegacyFuel", "lj-fuel", "ps-fuel" Config.Fuel = "ps-fuel" From b5db13a18c72424d4bd73b1060b837817648d87b Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Tue, 9 Jul 2024 19:43:33 -0400 Subject: [PATCH 375/381] 2.7.1 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 64d64321..893ab3b1 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.7.0' +version '2.7.1' lua54 'yes' From 96c6cf0d74a766e75671d608fc13a76f2be5e045 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 14 Jul 2024 20:05:13 +0100 Subject: [PATCH 376/381] (Fivemerr) Upload image to MDT (#487) --- client/cl_mugshot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua index 69fe41a9..cf9cafd6 100644 --- a/client/cl_mugshot.lua +++ b/client/cl_mugshot.lua @@ -32,7 +32,7 @@ local function TakeMugShot() }, function(data) local resp = json.decode(data) local link = (resp and resp.url) or 'invalid_url' - print(link) + table.insert(MugshotArray, link) end) end end) From 6258a130795c0712ecdb2d3ae3a0883d88b41657 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 15 Jul 2024 17:58:38 +0100 Subject: [PATCH 377/381] Resolve transient error fix on mugshot upload (#488) * Resolve transient error fix on mugshot upload * Re-adding wait before Mugshot to allow area loading --- client/cl_mugshot.lua | 8 ++++++-- server/main.lua | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua index cf9cafd6..0c3ac329 100644 --- a/client/cl_mugshot.lua +++ b/client/cl_mugshot.lua @@ -43,8 +43,12 @@ local function PhotoProcess(ped) for photo = 1, Config.MugPhotos, 1 do Wait(1500) TakeMugShot() + -- Transient error can occur if we don't wait long enough for the array to be pushed with the new mugshot + -- URL. So we wait until this has happened. + while #MugshotArray == 0 do + Wait(1000) + end PlaySoundFromCoord(-1, "SHUTTER_FLASH", x, y, z, "CAMERA_FLASH_SOUNDSET", true, 5, 0) - Wait(1500) rotation = rotation - 90.0 SetEntityHeading(ped, rotation) end @@ -197,7 +201,7 @@ RegisterNetEvent('cqc-mugshot:client:trigger', function() SetEntityHeading(ped, suspectheading) ClearPedSecondaryTask(GetPlayerPed(ped)) end - TriggerServerEvent('psmdt-mugshot:server:MDTupload', playerData.citizenid, MugshotArray) + TriggerServerEvent('psmdt-mugshot:server:MDTupload', playerData.citizenid, MugshotArray) mugshotInProgress = false end) end) diff --git a/server/main.lua b/server/main.lua index 24babfdb..38ecba18 100644 --- a/server/main.lua +++ b/server/main.lua @@ -588,11 +588,11 @@ end) RegisterNetEvent('psmdt-mugshot:server:MDTupload', function(citizenid, MugShotURLs) MugShots[citizenid] = MugShotURLs local cid = citizenid - MySQL.Async.insert('INSERT INTO mdt_data (cid, pfp, gallery, tags) VALUES (:cid, :pfp, :gallery, :tags) ON DUPLICATE KEY UPDATE cid = :cid, pfp = :pfp, tags = :tags, gallery = :gallery', { + MySQL.Async.insert('INSERT INTO mdt_data (cid, pfp, gallery, tags) VALUES (:cid, :pfp, :gallery, :tags) ON DUPLICATE KEY UPDATE cid = :cid, pfp = :pfp, gallery = :gallery, tags = :tags', { cid = cid, - pfp = MugShotURLs[1], + pfp = MugShots[citizenid][1], + gallery = json.encode(MugShots[citizenid]), tags = json.encode(tags), - gallery = json.encode(MugShotURLs), }) end) From 8d64ff8b3ed0e59206e1080b8196649912930103 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:59:15 -0400 Subject: [PATCH 378/381] Update fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 893ab3b1..551fd97d 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.7.1' +version '2.7.2' lua54 'yes' From c62f9a5aad56745e6e024fa96b8057cd522a150b Mon Sep 17 00:00:00 2001 From: Infinity585 <89676623+Infinity585@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:06:07 +1300 Subject: [PATCH 379/381] Dispatch chat XSS (removed / from messages) (#493) * Dispatch chat XSS (removed / from messages) * Updated sanitize * BlankLines --- ui/app.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index db86ae9f..6098175a 100644 --- a/ui/app.js +++ b/ui/app.js @@ -1138,15 +1138,30 @@ $(document).ready(() => { } }); + function sanitizeInput(input) { + const map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '/': '/', + }; + const reg = /[&<>"'/]/ig; + return input.replace(reg, (match) => (map[match])); + } + $("#dispatchmsg").keydown(function (e) { const keyCode = e.which || e.keyCode; if (keyCode === 13 && !e.shiftKey) { e.preventDefault(); const time = new Date(); + + const message = sanitizeInput($(this).val()); $.post( `https://${GetParentResourceName()}/dispatchMessage`, JSON.stringify({ - message: $(this).val(), + message: message, time: time.getTime(), }) ); From 78202049320422d91e698435b4205673792a72e7 Mon Sep 17 00:00:00 2001 From: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com> Date: Mon, 11 Nov 2024 02:53:58 -0500 Subject: [PATCH 380/381] 2.7.3 --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 551fd97d..4e0ef81c 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'Flawws, Flakey, Idris and the Project Sloth team' description 'EchoRP MDT Rewrite for QBCore' -version '2.7.2' +version '2.7.3' lua54 'yes' From edcdf546650db5225d3d1c4306016128afd22134 Mon Sep 17 00:00:00 2001 From: ItsMuri <88394932+ItzMuri@users.noreply.github.com> Date: Sat, 28 Dec 2024 01:24:58 +0100 Subject: [PATCH 381/381] Updated image link for displaying the map --- ui/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app.js b/ui/app.js index 6098175a..29978f48 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5803,7 +5803,7 @@ center: [0, -1024], maxBoundsViscosity: 1.0 }); // https://upload.versescripts.net/ -var customImageUrl = 'https://files.fivemerr.com/images/a62a84ff-6a1b-4dc4-a199-c7140a216703.jpg'; +var customImageUrl = 'https://files.fivemerr.com/images/60c68fc9-1a7f-4e5a-800a-f760a74186ca.jpeg'; var sw = map.unproject([0, 1024], 3 - 1); var ne = map.unproject([1024, 0], 3 - 1);