Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
14b6274
adding config.lua
LeSiiN Apr 24, 2026
041707f
added Citizens.svelte and Weapons.svelte
LeSiiN Apr 24, 2026
183a7e1
added "weapons_add" into permissions
LeSiiN Apr 24, 2026
8956edc
changed search function to allow spaces/big/small letters
LeSiiN Apr 24, 2026
9c49e0d
added "weapons_add" into permissions
LeSiiN Apr 24, 2026
06d2dc4
added check for fingerprint and dna
LeSiiN Apr 24, 2026
eb4a984
added 'weapons_add' as a new permission
LeSiiN Apr 24, 2026
0b788b3
added 'weapons_add' as a new permission and added new events
LeSiiN Apr 24, 2026
278c2ba
added 'weapons_add' as a new permission
LeSiiN Apr 24, 2026
ae01a2c
added new permission, changed ownership history
LeSiiN Apr 24, 2026
3f43405
removed unwanted console.logs, changed notes and removed weaponOption…
LeSiiN Apr 25, 2026
871589e
added `flags` JSON DEFAULT NULL,
LeSiiN Apr 28, 2026
6a7b918
changes to Weapons.svelte
LeSiiN Apr 28, 2026
3934eda
added RegisterNUICallback
LeSiiN Apr 28, 2026
a20df2a
added ps-mdt:server:saveWeaponFlags
LeSiiN Apr 28, 2026
7bfa485
Added `SAVE_WEAPON_FLAGS` to `NUI_EVENTS.WEAPON`
LeSiiN Apr 28, 2026
eedc11c
changes from files to link, added hover for picture
LeSiiN May 1, 2026
90a68fa
changes stuff in cases.lua (sry)
LeSiiN May 1, 2026
95beb06
added title and images to mdt_reports_evidence database
LeSiiN May 1, 2026
e7b8484
added title and images to mdt_reports_evidence
LeSiiN May 1, 2026
b31a3bc
added profile images as link not file and gallery, removed mugshot
LeSiiN May 1, 2026
c960ae0
added new callbacks
LeSiiN May 1, 2026
6702b32
removed log entry for profile pic
LeSiiN May 1, 2026
2adfc22
added title and images
LeSiiN May 1, 2026
95d01b6
added title and images
LeSiiN May 1, 2026
4aebbba
added title and images, fixed evidence
LeSiiN May 1, 2026
0c54f14
added little icon in vehicles overview and added edit/zoom button
LeSiiN May 3, 2026
c2b4bdb
added mdt_vehicle_image
LeSiiN May 3, 2026
2e9edc0
changed picture to 108x108pxa and also added little icons per gun
LeSiiN May 4, 2026
0c565bb
added notes interactions
LeSiiN May 5, 2026
9696cba
added check for ems
LeSiiN May 5, 2026
af1443c
added callbacks and streetname grabber
LeSiiN May 6, 2026
f15503c
added callbacks and changed some sql stuff to match qbx housing
LeSiiN May 6, 2026
7492cb6
added entire new property modul to showcase info
LeSiiN May 6, 2026
44d06e7
added new events
LeSiiN May 6, 2026
3364275
removed german debug
LeSiiN May 6, 2026
dfcc111
use authorplaintxt with badge instead of author ( citizenid )
LeSiiN May 7, 2026
ea41a63
fixed not allowing callsign changes
LeSiiN May 7, 2026
b356672
changed from property_name to property_id
LeSiiN May 7, 2026
1f131d2
changed from property_name to property_id
LeSiiN May 7, 2026
682783c
changed from property_name to property_id
LeSiiN May 7, 2026
ba2e798
edited correctly
LeSiiN May 7, 2026
41476a6
Merge pull request #7 from LeSiiN/feat/mdt-weapon-picture-improvement
LeSiiN May 7, 2026
b3bc4a9
Merge pull request #8 from LeSiiN/feat/mdt-weapon-tags-improvments
LeSiiN May 7, 2026
960d12a
Merge pull request #6 from LeSiiN/feat/mdt-vehicle-picture-addition
LeSiiN May 7, 2026
1adac21
Merge pull request #5 from LeSiiN/feat/mdt-property-infos
LeSiiN May 7, 2026
50a7656
Merge branch 'full-changes' into feat/mdt-links-not-files-and-gallery
LeSiiN May 7, 2026
72d2983
Merge pull request #4 from LeSiiN/feat/mdt-links-not-files-and-gallery
LeSiiN May 7, 2026
d348443
Merge pull request #3 from LeSiiN/feat/mdt-correct-author
LeSiiN May 7, 2026
b457a88
Merge branch 'full-changes' into feat/mdt-citizen-vehicle-weapon-impr…
LeSiiN May 7, 2026
420ceed
Merge pull request #2 from LeSiiN/feat/mdt-citizen-vehicle-weapon-imp…
LeSiiN May 7, 2026
54c9468
Merge branch 'full-changes' into feat/mdt-citizen-notes
LeSiiN May 7, 2026
15a03c0
Merge pull request #1 from LeSiiN/feat/mdt-citizen-notes
LeSiiN May 7, 2026
71ef6a3
added weapon flags to citizen profil
LeSiiN May 7, 2026
03dcd42
made sure add weapon works as intended
LeSiiN May 7, 2026
2d2679d
made sure add weapon works as intended
LeSiiN May 7, 2026
5afd4e4
fixed ownership history
LeSiiN May 7, 2026
72a88fd
fixed ownership history
LeSiiN May 7, 2026
ab9e97f
changed reports order to show newest at the top
LeSiiN May 7, 2026
4205ef2
fixed bodycam rotation and position
LeSiiN May 8, 2026
ad3a890
fixed bodycam rotation ,position and animation
LeSiiN May 8, 2026
e234bf3
Merge pull request #9 from LeSiiN/feat/mdt-bodycam-fix
LeSiiN May 8, 2026
5b59089
SQL THAT NEEDS TO BE IMPORTED
LeSiiN May 9, 2026
a8837e1
Update README.md
LeSiiN May 10, 2026
4c47f63
Update qbx.sql
LeSiiN May 10, 2026
b5bc8c4
Update qbcore.sql
LeSiiN May 10, 2026
de40792
updates sql for my updates
LeSiiN May 10, 2026
0a3be63
Update qbcore.sql
LeSiiN May 10, 2026
5fc3c47
Add files via upload
LeSiiN May 10, 2026
7324229
Add files via upload
LeSiiN May 10, 2026
f032253
fixed offset
LeSiiN May 10, 2026
2c1459e
added new svelte ( fixed evidence tab and case tab )
LeSiiN May 17, 2026
2e25415
changed in evidence manager
LeSiiN May 17, 2026
99d2502
fixed add fingerprint button
LeSiiN May 17, 2026
29b4d94
fixed fingerprint and cases/evidence tab
LeSiiN May 17, 2026
6c612ba
Add files via upload
LeSiiN May 17, 2026
f6e7491
Add files via upload
LeSiiN May 17, 2026
4d00336
removed german prints
LeSiiN May 17, 2026
8a187a1
added custom placeholder when type changes
LeSiiN May 17, 2026
23be93c
overhaul of vehicle tracking - server side
LeSiiN May 17, 2026
59b70c1
overhaul of vehicle tracking - client side
LeSiiN May 17, 2026
ff231ca
added heading into the map
LeSiiN May 17, 2026
12ba291
removed prints
LeSiiN May 17, 2026
b442162
removed prints
LeSiiN May 17, 2026
203090d
fixed tracking performance
LeSiiN May 18, 2026
e01ea1e
fixed tracking performance - client
LeSiiN May 18, 2026
a6a9b66
fixed tracking performance - svelte
LeSiiN May 18, 2026
412b4c6
Update README.md
LeSiiN May 22, 2026
d1d34ad
Update README.md
LeSiiN May 22, 2026
1f859c2
added new BulletinBoard svelte and changes to SOP
LeSiiN May 22, 2026
267793c
Update config.lua
LeSiiN May 22, 2026
68ae833
added new bulletinboard
LeSiiN May 22, 2026
711f9c9
added new bulletinboard - client
LeSiiN May 22, 2026
e9937f0
changes to bulletin management
LeSiiN May 22, 2026
edab298
changes to a new tab
LeSiiN May 22, 2026
755800e
Add files via upload
LeSiiN May 22, 2026
aa15ae8
Add files via upload
LeSiiN May 22, 2026
1aab034
Add files via upload
LeSiiN May 22, 2026
febe6c9
Add files via upload
LeSiiN May 22, 2026
2cd331c
miss spelling fixed
LeSiiN May 22, 2026
288a1a2
fixed pages
LeSiiN May 24, 2026
ace35d3
fixed vehicle search in report
LeSiiN May 24, 2026
e074640
fixed pages
LeSiiN May 24, 2026
078d4bf
fixed pages
LeSiiN May 24, 2026
91ad335
removed mugshot button and fixed upload photo button
LeSiiN May 25, 2026
dc47641
Update README.md
LeSiiN May 26, 2026
b8d5c8a
Add files via upload
LeSiiN May 26, 2026
5b64a22
Update config.lua
LeSiiN May 26, 2026
fa990e8
Add files via upload
LeSiiN May 26, 2026
70752b3
Add files via upload
LeSiiN May 26, 2026
1dd17c6
Add files via upload
LeSiiN May 26, 2026
2d847bb
Add files via upload
LeSiiN May 26, 2026
71aaa82
Add files via upload
LeSiiN May 26, 2026
d4c6a8f
Add files via upload
LeSiiN May 26, 2026
c7bf4f4
Add files via upload
LeSiiN May 26, 2026
3c0840c
Update README.md
LeSiiN May 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 72 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
DONT FORGET TO BUILT IT
THIS CHANGES NEEDS TO BE DONE:
```lua
CREATE TABLE IF NOT EXISTS mdt_patrols (
id VARCHAR(64) PRIMARY KEY,
name VARCHAR(64) NOT NULL,
color VARCHAR(7) NOT NULL,
sort_order INT NOT NULL DEFAULT 0,
member_ids TEXT NOT NULL DEFAULT '[]'
);

ALTER TABLE mdt_reports_evidence
ADD COLUMN title VARCHAR(255) NOT NULL DEFAULT '' AFTER reportid,
ADD COLUMN images LONGTEXT NULL DEFAULT NULL AFTER stored;

ALTER TABLE `mdt_weapons` ADD COLUMN `flags` JSON DEFAULT NULL;

ALTER TABLE player_vehicles
MODIFY COLUMN mdt_vehicle_status VARCHAR(500) DEFAULT 'valid';

CREATE TABLE IF NOT EXISTS `mdt_bulletin_posts` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`title` VARCHAR(255) NOT NULL,
`content` LONGTEXT NOT NULL,
`author` VARCHAR(100) NOT NULL,
`author_rank` VARCHAR(100) NOT NULL DEFAULT '',
`category` ENUM(
'announcement',
'operations',
'training',
'general',
'warrants'
) NOT NULL DEFAULT 'general',
`priority` ENUM(
'low',
'normal',
'high',
'urgent'
) NOT NULL DEFAULT 'normal',
`pinned` TINYINT(1) NOT NULL DEFAULT 0,
`job` VARCHAR(50) NOT NULL DEFAULT '',
`created_by` VARCHAR(60) NOT NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_job` (`job`),
KEY `idx_category` (`category`),
KEY `idx_pinned` (`pinned`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `mdt_bulletin_settings` (
`key` VARCHAR(64) NOT NULL COMMENT 'Setting key, e.g., bulletin_categories',
`value` LONGTEXT NOT NULL COMMENT 'JSON-encoded value',
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last Change',
PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
COMMENT='MDT – Key-Value-Store for Bulletin-Einstellungen';

INSERT IGNORE INTO `mdt_bulletin_settings` (`key`, `value`)
VALUES (
'bulletin_categories',
'[
{"value":"announcement","label":"Announcements","icon":"campaign"},
{"value":"operations", "label":"Operations", "icon":"local_police"},
{"value":"training", "label":"Training", "icon":"school"},
{"value":"general", "label":"General", "icon":"forum"}
]'
);
```

# ps-mdt v3

Police MDT (Mobile Data Terminal) for FiveM. Built with Svelte 5 and Lua. Works on QBCore and QBX through the ps_lib abstraction layer.
Expand Down Expand Up @@ -305,4 +376,4 @@ We host some of the biggest FiveM servers in the industry such as Prodigy RP, Sm
- Free transfer of files and setup
- Free Windows licenses
- Windows Remote Desktop
- 24/7 Support with ~30 min average ticket response
- 24/7 Support with ~30 min average ticket response
2 changes: 1 addition & 1 deletion client/backend/bodycams.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RegisterNUICallback('viewBodycam', function(data, cb)
local result = ps.callback(resourceName .. ':server:viewBodycam', bodycamId)

if result and result.success then
CloseMDT()
CloseMDT(true)
cb({ success = true })
else
cb({ success = false, message = result and result.error or 'Failed to view bodycam' })
Expand Down
37 changes: 37 additions & 0 deletions client/backend/bulletinboard.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local resourceName = tostring(GetCurrentResourceName())

-- Get all bulletin posts for the officer's department
RegisterNUICallback('getBulletinPosts', function(data, cb)
local result = ps.callback(resourceName .. ':server:getBulletinPosts')
cb(result or {})
end)

-- Create a new bulletin post
RegisterNUICallback('createBulletinPost', function(data, cb)
if not data then cb({ success = false }) return end
local result = ps.callback(resourceName .. ':server:createBulletinPost', data)
cb(result or { success = false })
end)

-- Update an existing bulletin post
RegisterNUICallback('updateBulletinPost', function(data, cb)
if not data or not data.id then cb({ success = false }) return end
local postId = data.id
data.id = nil
local result = ps.callback(resourceName .. ':server:updateBulletinPost', postId, data)
cb(result or { success = false })
end)

-- Delete a bulletin post (soft delete)
RegisterNUICallback('deleteBulletinPost', function(data, cb)
if not data or not data.id then cb({ success = false }) return end
local result = ps.callback(resourceName .. ':server:deleteBulletinPost', data.id)
cb(result or { success = false })
end)

-- Toggle pin on a bulletin post (supervisor only)
RegisterNUICallback('toggleBulletinPin', function(data, cb)
if not data or not data.id then cb({ success = false }) return end
local result = ps.callback(resourceName .. ':server:toggleBulletinPin', data.id)
cb(result or { success = false })
end)
2 changes: 1 addition & 1 deletion client/backend/cameras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RegisterNUICallback('viewCamera', function(data, cb)
local result = ps.callback(resourceName .. ':server:viewCamera', cameraId)

if result and result.success then
CloseMDT()
CloseMDT(true)
cb({ success = true })
else
cb({ success = false, message = result and result.error or 'Failed to view camera' })
Expand Down
22 changes: 16 additions & 6 deletions client/backend/cases.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,22 @@ RegisterNUICallback('addEvidenceItem', function(data, cb)
return
end

local result = ps.callback(
resourceName .. ':server:addEvidenceItem',
data.caseId,
data.evidence
)
cb(result or { success = false })
local payload = data or {}

if payload.evidence then
local result = ps.callback(
resourceName .. ':server:addEvidenceItem',
payload
)
cb(result or { success = false })
else
local result = ps.callback(
resourceName .. ':server:addEvidenceItem',
data.caseId,
data.evidence
)
cb(result or { success = false })
end
end)

RegisterNUICallback('updateEvidenceItem', function(data, cb)
Expand Down
32 changes: 32 additions & 0 deletions client/backend/citizens.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,38 @@ RegisterNUICallback('getMyProfile', function(data, cb)
cb(result or { success = false })
end)

RegisterNUICallback('getProperty', function(data, cb)
if not MDTOpen then cb({ success = false }) return end
if not data or not data.property_id then
cb({ success = false, message = 'Missing property id' })
return
end
local result = ps.callback(resourceName .. ':server:getProperty', data.property_id)
if not result or not result.success then
cb(result or { success = false, message = 'Property not found' })
return
end
if result.property and result.property.coords then
local coords = result.property.coords
local street1, street2 = GetStreetNameAtCoord(coords.x, coords.y, coords.z, 1.0)
local s1 = street1 and GetStreetNameFromHashKey(street1) or nil
local s2 = street2 and GetStreetNameFromHashKey(street2) or nil
if s1 and s1 ~= '' then
result.property.streetName = (s2 and s2 ~= '') and (s1 .. ' / ' .. s2) or s1
end
end
cb(result)
end)

-- setWaypoint: sets a GPS blip on the map from NUI coords
-- The NUI calls fetchNui('setWaypoint', { x, y }) β€” no server round-trip needed.
RegisterNUICallback('setWaypoint', function(data, cb)
cb({})
if not data or not data.x or not data.y then return end
SetNewWaypoint(data.x, data.y)
end)


RegisterNUICallback('getCitizens', function(data, cb)
if not MDTOpen then cb({}) return end
if type(data) ~= 'table' then
Expand Down
26 changes: 26 additions & 0 deletions client/backend/dashboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,32 @@ RegisterNUICallback('deleteBulletin', function(data, cb)
cb(result or { success = false })
end)

RegisterNUICallback('getBulletinCategories', function(_, cb)
local result = lib.callback.await('mdt:server:getBulletinCategories', false)
cb(result or {})
end)

RegisterNUICallback('saveBulletinCategories', function(data, cb)
if not data or not data.categories then
cb({ success = false, message = 'Invalid data' })
return
end

for _, cat in ipairs(data.categories) do
if type(cat.value) ~= 'string' or type(cat.label) ~= 'string' or type(cat.icon) ~= 'string' then
cb({ success = false, message = 'Malformed category entry' })
return
end
if #cat.label > 32 or #cat.icon > 48 then
cb({ success = false, message = 'Category label or icon name too long' })
return
end
end

local result = lib.callback.await('mdt:server:saveBulletinCategories', false, data.categories)
cb(result or { success = false, message = 'Server error' })
end)

-- RECENT REPORTS -------------------------------------

RegisterNUICallback('getRecentReports', function(data, cb)
Expand Down
14 changes: 11 additions & 3 deletions client/backend/reports.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ RegisterNUICallback('saveReport', function(data, cb)
if data.evidence then
for _, item in ipairs(data.evidence) do
table.insert(evidence, {
title = item.title or '',
type = item.type or 'Evidence',
content = item.serial or (item.images and item.images[1]) or item.title or '',
note = item.notes or ''
content = item.serial or '',
note = item.notes or '',
stored = item.stored or 0,
images = item.images or {}
})
end
end
Expand Down Expand Up @@ -312,6 +315,11 @@ RegisterNUICallback('searchVehiclesForReport', function(data, cb)
end

local query = data and data.query or ''
if query == '' then
cb({})
return
end

local result = ps.callback(resourceName .. ':server:searchVehiclesForReport', query)
cb(result or {})
end)
end)
102 changes: 98 additions & 4 deletions client/backend/tracking.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,109 @@
-- client_patrols.lua
local resourceName = tostring(GetCurrentResourceName())

RegisterNUICallback('getTracking', function(_, cb)
-- UI state held in Lua client (survives MDT open/close)
local mapUiState = {
sidebarOpen = true,
officersOpen = true,
patrolsOpen = true,
}

-- ─── Server β†’ NUI ─────────────────────────────────────────────────────────

RegisterNetEvent(resourceName .. ":client:syncPatrols", function(patrols, action, citizenid)
SendNUIMessage({ type = "syncPatrols", data = patrols, action = action, citizenid = citizenid })
end)

RegisterNetEvent(resourceName .. ':client:checkVehicleClass', function(netId, plate, coords, heading)
local veh = NetworkGetEntityFromNetworkId(netId)
if not veh or veh == 0 then return end
if GetVehicleClass(veh) ~= 18 then return end
TriggerServerEvent(resourceName .. ':server:cacheVehicle', plate, coords, heading)
end)

-- ─── UI State ─────────────────────────────────────────────────────────────

-- Call this in client.lua after SendNUI('setVisible', { visible = true })
function SendMapUiState()
SendNUIMessage({ type = "mapUiState", data = mapUiState })
end

RegisterNUICallback("saveMapUiState", function(data, cb)
if type(data.key) == "string" and type(data.value) == "boolean" then
mapUiState[data.key] = data.value
end
cb({})
end)

-- ─── Tracking ─────────────────────────────────────────────────────────────

-- Register only once – always call cb() to prevent timeout
RegisterNUICallback("getTracking", function(_, cb)
if not MDTOpen then
cb({ success = false, message = 'MDT is not open', data = {} })
cb({ success = false, data = { vehicles = {}, bodycams = {} } })
return
end

local tracking = ps.callback(resourceName .. ':server:getTracking')
local tracking = ps.callback(resourceName .. ":server:getTracking")
if tracking then
cb({ success = true, data = tracking })
else
cb({ success = false, message = 'Failed to fetch tracking data', data = {} })
cb({ success = false, data = { vehicles = {}, bodycams = {} } })
end
end)

-- ─── Patrols ──────────────────────────────────────────────────────────────

RegisterNUICallback("getPatrols", function(_, cb)
local result = ps.callback(resourceName .. ":server:getPatrols")
cb({ success = true, data = result or {} })
end)

RegisterNUICallback("createPatrol", function(data, cb)
if not MDTOpen then cb({ success = false }) return end
local id, name, color = data.id, data.name, data.color
if type(id) ~= "string" or type(name) ~= "string" or type(color) ~= "string" then
cb({ success = false }) return
end
TriggerServerEvent(resourceName .. ":server:createPatrol", id, name, color)
cb({ success = true })
end)

RegisterNUICallback("deletePatrol", function(data, cb)
if not MDTOpen then cb({ success = false }) return end
if type(data.id) ~= "string" then cb({ success = false }) return end
TriggerServerEvent(resourceName .. ":server:deletePatrol", data.id)
cb({ success = true })
end)

RegisterNUICallback("renamePatrol", function(data, cb)
if not MDTOpen then cb({ success = false }) return end
if type(data.id) ~= "string" or type(data.name) ~= "string" then
cb({ success = false }) return
end
TriggerServerEvent(resourceName .. ":server:renamePatrol", data.id, data.name)
cb({ success = true })
end)

RegisterNUICallback("assignOfficer", function(data, cb)
if not MDTOpen then cb({ success = false }) return end
if type(data.patrolId) ~= "string" or type(data.citizenId) ~= "string" then
cb({ success = false }) return
end
TriggerServerEvent(resourceName .. ":server:assignOfficer", data.patrolId, data.citizenId)
cb({ success = true })
end)

RegisterNUICallback("reorderPatrols", function(data, cb)
if not MDTOpen then cb({ success = false }) return end
if type(data.ids) ~= "table" then cb({ success = false }) return end
TriggerServerEvent(resourceName .. ":server:reorderPatrols", data.ids)
cb({ success = true })
end)

RegisterNUICallback("removeFromPatrol", function(data, cb)
if not MDTOpen then cb({ success = false }) return end
if type(data.citizenId) ~= "string" then cb({ success = false }) return end
TriggerServerEvent(resourceName .. ":server:removeFromPatrol", data.citizenId)
cb({ success = true })
end)
6 changes: 6 additions & 0 deletions client/backend/weapons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ RegisterNUICallback('getWeaponBolos', function(data, cb)
cb(result)
end)

RegisterNUICallback('saveWeaponFlags', function(data, cb)
local flags = type(data.flags) == 'table' and data.flags or json.decode(data.flags) or {}
local result = ps.callback(resourceName .. ':server:saveWeaponFlags', data.serial, flags)
cb(result or { success = false })
end)

RegisterNUICallback('getWeaponOwnershipHistory', function(data, cb)
if not MDTOpen then cb({}) return end
if not data or not data.serial then
Expand Down
Loading