Skip to content

feat: major overhaul with new features, flags & system improvements#552

Open
LeSiiN wants to merge 105 commits into
Project-Sloth:mainfrom
LeSiiN:full-changes
Open

feat: major overhaul with new features, flags & system improvements#552
LeSiiN wants to merge 105 commits into
Project-Sloth:mainfrom
LeSiiN:full-changes

Conversation

@LeSiiN
Copy link
Copy Markdown
Contributor

@LeSiiN LeSiiN commented May 14, 2026

🚀 Major Update – MDT Improvements & New Features

This is a major update that includes a wide range of improvements, new features, and fixes across multiple MDT sections.

If u want to test this: https://github.com/LeSiiN/ps-mdt/tree/full-changes
Dont forget to BUILT it

🔫 Weapons Tab

  • Added "Add Weapon" button with a new permission to manually register weapons
  • Weapon images are now displayed in the Overview Tab
  • Improved Ownership History:
    • Now includes weapon name and responsible officer
  • Introduced Weapon Flags:
    • Mark weapons as Stolen or Wanted
    • Visible in the Citizen Weapon Tab
    • ⚠️ Requires SQL import

🚗 Vehicles Tab

  • Added profile picture to the Overview Tab
  • Increased vehicle image size + added zoom functionality
  • Images are now set via URL instead of file upload
  • Vehicles can now have notes
  • Added vehicle flags, displayed next to status
    • ⚠️ Requires SQL import

👤 Citizen Tab

  • Larger profile picture with zoom support
  • Profile pictures are now set via URL instead of file upload
  • Removed mugshot system
  • Added a Gallery system:
    • Stores all recorded images of a player
    • Allows manual image uploads
  • Citizens can now have notes
  • Added Property Info Button:
    • Shows position (with waypoint), owner, and keyholders
  • Displays all recorded weapons, including flags
  • Added license hover details
  • Fingerprint & DNA search is now supported

📝 Reports Tab

  • Reports are now sorted from NEWEST → OLDEST
  • Author is now displayed as CALLSIGN + OFFICER NAME
  • Fixed Evidence system:
    • Title, serial number, and notes are now saved correctly
    • Images are properly stored
  • Evidence images now support zoom
  • Evidence images are now added via URL instead of file upload
  • Fixed Add Fingerprint button when fingerprints are already there
  • Added Switchable Placeholder for Each Evidence Type

🔫 Cases/Evidence Tab

  • Removed last File Import and switched to Links for all
  • Fixed Create Evidence Button
  • Fixed Open Stash Button
  • Alle Images can be zoomed again

📡 Surveillance

  • Map now shows accurate officer positions
  • Vehicles will be tracked aswell on the Map
  • Added Heading to Bodycam,Officer and Vehicle
  • Fixed bodycam positioning

🧩 Database Changes (SQL Required)

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"}
    ]'
);

Make sure to remove readme note when Merging this

LeSiiN added 30 commits April 24, 2026 13:44
- Config.Weapons is new. ( Which Weapons should be allowed to be registered manually )
- Added fingerprint and dna fields to the Citizen interface
- Both fields included in client-side filter and searchCitizens SQL query via JSON_EXTRACT from players.metadata
- Extended SQL WHERE clause (8 params instead of 6), with explicit Lua loop mapping for fingerprint/DNA
- Normalized vehicle plate search: whitespace stripped and uppercased on frontend and DB side (REPLACE/UPPER)
- Split plateTerm and nameTerm in searchVehiclesForReport for correct case handling
- Added minimum query length guard (< 2 chars) to vehicle search input
added "weapons_add" as a new permission
changed search function to allow spaces/big/small letters
added "weapons_add" into permissions
added fingerprint and dna into getCitizens callback
added 'weapons_add' as a new permission
added 'weapons_add' as a new permission and added new events
added 'weapons_add' as a new permission
added new permission, changed ownership history
…s (now in config)

removed unwanted console.logs, changed notes and removed weaponOptions (now in config)
added   `flags` JSON DEFAULT NULL,
changes to Weapons.svelte
added RegisterNUICallback
added ps-mdt:server:saveWeaponFlags
Added `SAVE_WEAPON_FLAGS` to `NUI_EVENTS.WEAPON`
changes from files to link, added hover for picture to make it bigger
changes stuff in cases.lua (sry)
added title and images to mdt_reports_evidence database

ALTER TABLE mdt_reports_evidence
  ADD COLUMN title VARCHAR(255) NOT NULL DEFAULT '' AFTER reportid,
  ADD COLUMN images LONGTEXT NULL DEFAULT NULL AFTER stored;
added title and images to mdt_reports_evidence
added profile images as link not file and gallery, removed mugshot
profile images as links not files
gallery to add picture manually usage of mdt_citizen_gallery
remove mugshot button ( broken rn )
added new callbacks
removed log entry for profile pic
- fivemanage doesnt support links, only base64, so removed check for fivemanageupload
added title and images, fixed evidence in reports
added title and images, fixed evidence
added title and images, fixed evidence
added little icon in vehicles overview and added edit/zoom button
added this to UpdateVehicle:
 
   if payload.image ~= nil then
        updates[#updates + 1] = 'mdt_vehicle_image = ?'
        values[#values + 1] = payload.image
    end
changed picture to 108x108pxa and also added little icons per gun
added notes interactions
LeSiiN added 30 commits May 17, 2026 13:48
removed german prints
added custom placeholder when type changes
overhaul of vehicle tracking - server side
overhaul of vehicle tracking - client side
added heading into the map:
- since we already push the data into svelte, we could use it
fixed tracking performance
fixed tracking performance - client
fixed tracking performance
changed refreshticking from 2000 to 4500, added tabvisible check to stop when not shown
added new BulletinBoard svelte and changes to SOP
added new bulletinboard
added new bulletinboard
changes to bulletin management
changes to a new tab
miss spelling fixed
fixed pages
fixed vehicle search in report
fixed pages
removed mugshot button and fixed upload photo button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant