Skip to content

Tiltann/TG_MDT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

169 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TG_MDT - Multi-Faction Tablet

Deutsch | English

Status: work in progress. This is a mockup under active development, not a finished script.

Tablet preview: https://tiltann.github.io/TG_MDT/


Deutsch

Ein freies, modulares MDT (Mobile Data Terminal) als Ingame-Tablet für alle Fraktionen - nicht nur Polizei, sondern auch Medic, Mechanic, Justiz und mehr. Jede Fraktion sieht ihre eigenen Daten und kann je nach Rechten auch auf relevante Informationen anderer Fraktionen zugreifen (Medic auf die Krankenakte, Polizei auf die Strafakte und so weiter).

Entstanden als Community-Projekt von Mitgliedern des Tubehosting-Discord. Nicht offiziell mit Tubehosting affiliiert.

Feature-Status

Fertig:

  • Dashboard mit Status- und Aktivitätsübersicht
  • Personenakte (modellbasiert, mit Bild und Notizen)
  • Fahrzeugakte (modellbasiert, inkl. Halter- und Statusdaten)
  • Live-Map (tile-basiert, pro Modul schaltbar)
  • Funk-Mitglieder-Sync im Tablet
  • Live-Chat im MDT
  • Benachrichtigungen
  • Dispatch-System (Live-Calls, Zuweisungen, Verlauf)
  • Fraktions-/Agency-Module (Dispatch und Livemap pro Department steuerbar)
  • Duty-System (Framework-Bridge inkl. Statuswechsel)

In Arbeit:

  • Login per Charakter
  • Berichte (vollständiger Workflow)
  • Strafkatalog / Bußgeldkatalog (vollständiger Workflow)
  • Admin- und Leitungsbereich (Ränge- und Rechte-Verwaltung)

Schnellstart (Server)

  1. Resource sicherstellen: ensure TG_MDT
  2. Web-UI bauen:
    cd web
    bun install
    bun run build
  3. Die Dispatch-Tabellen legt das Script beim Start selbst an.
  4. Ingame mit /mdt öffnen (Standard-Command und Keybind F6 in config/commands.lua).

Startet ein Spieler /mdt direkt nach einem Resource-Restart, kommt der Hinweis "Tablet lädt noch". Der Open-Versuch wird gemerkt und nach dem Client-Init automatisch ausgeführt.

Dispatch-Konfiguration

share_between_jobs akzeptiert:

  • 'all'
  • eine flache Gruppe: { 'police', 'sheriff' }
  • mehrere Gruppen: { { 'pd' }, { 'ems', 'mechanic' } }
  • Jobs und Department-Keys (Agencies) aus Config.MDT.departments

status_codes akzeptiert:

  • label_key mit optionalem label als Fallback
  • Scope pro Status über jobs = { ... } und/oder agencies = { ... }
  • Farben als Name oder Hex (z. B. '#ff6b00')

Leitungszugriff (isBoss) pro Agency/Job

Config.MDT.departments[agency].boss.jobs[job] steuert den Zugriff auf den Leitungsbereich. Pro Job genau eine der folgenden Methoden verwenden, nicht kombinieren:

  • rank_name: exakter Rangname (String oder Liste)
  • min_grade: Rangnummer muss >= sein
  • last: die obersten N Ränge (z. B. 2 = die höchsten zwei)
boss = {
    jobs = {
        police = {
            rank_name = { 'chief', 'captain' },
        },
    },
}

Modulares Akten-Modell (Lua)

Alle Aktenfelder (Personen/Fahrzeuge) und Fahrzeug-Hashnamen liegen zentral in config/akte-models.lua.

  • Config.AkteModels.person.fields - Felder der Personenakte
  • Config.AkteModels.vehicle.fields - Felder der Fahrzeugakte
  • Config.AkteModels.vehicle_model_names - Modell-Hash auf Anzeigename, damit keine "Unknown"-Modelle auftauchen

Jedes Feld unter fields kennt:

  • key - eindeutiger Feldname (DB- und UI-Schlüssel)
  • label_key - Locale-Key für den UI-Text
  • type - text, select oder textarea
  • default - Standardwert
  • editable - true/false; bei false überschreibt der Server das Feld nicht
  • options - nur bei select (Liste aus { value, label_key })

Neue Felder ergänzt man nur in config/akte-models.lua, die UI rendert sie automatisch. Beim Speichern übernimmt der Server ausschließlich Felder mit editable = true. Für unbekannte Fahrzeuge den Hash in vehicle_model_names nachtragen.

Live-Map einrichten

Der Standard-Kartenstil (styleAtlas, ~44 MB) liegt im Repository und ist sofort einsatzbereit - die Live-Map funktioniert ohne weiteren Download.

Die zusätzlichen Stile styleGrid (Koordinatengitter) und styleSatelite (Satellit) sind deutlich größer und nicht im Repository. Wer sie nutzen will, lädt das optionale Tile-Paket herunter und entpackt die Ordner nach web/map/:

  1. Optionales Paket herunterladen: https://drive.proton.me/urls/YZE057HH5G#KN3aoWGvPXb8
  2. Entpacken, sodass die Struktur stimmt:
    web/map/styleGrid/{z}/{x}/{y}.png
    web/map/styleSatelite/{z}/{x}/{y}.jpg
    
  3. Web-UI neu bauen:
    cd web && bun run build

Der Build kopiert alle vorhandenen Stile aus web/map/ nach public/map/ und schreibt eine styles.json. Die UI liest diese Datei und blendet nur die tatsächlich vorhandenen Stile ein - fehlende Stile fallen auf den Atlas zurück. Nach dem Build die Resource neu starten.

Die Karten-Tiles stammen aus RiceaRaul/gta-v-map-leaflet. Alle Credits gehen an RiceaRaul und die Mitwirkenden.

Standards

Coding- und Design-Standards stehen in STANDARDS.md. Bitte vor Beiträgen lesen.

Support

Support läuft ausschließlich über GitHub Issues. Keine Anfragen per Discord, DM oder Mail.


English

A free, modular MDT (Mobile Data Terminal) as an in-game tablet for every faction - not only police, but also medic, mechanic, judiciary and more. Each faction sees its own data and, depending on permissions, can reach relevant information from other factions (medic to medical records, police to criminal records, and so on).

Built as a community project by members of the Tubehosting Discord. Not officially affiliated with Tubehosting.

Feature status

Done:

  • Dashboard with status and activity overview
  • Person records (model-driven, photo and notes support)
  • Vehicle records (model-driven, owner and status fields)
  • Live map (tile-based, toggleable per module)
  • Radio member sync inside the tablet
  • Live chat inside the MDT
  • Notifications
  • Dispatch system (live calls, assignment, history)
  • Agency module controls (dispatch and livemap per department)
  • Duty system (framework bridge with status handling)

In progress:

  • Character login
  • Reports (full workflow)
  • Penalty / fine catalog and lawbook (full workflow)
  • Admin and leadership area (rank and permission management)

Quick start (server)

  1. Ensure the resource: ensure TG_MDT
  2. Build the web UI:
    cd web
    bun install
    bun run build
  3. The script creates the dispatch tables itself on startup.
  4. Open in-game with /mdt (default command and keybind F6 live in config/commands.lua).

If a player runs /mdt right after a resource restart, they get a "tablet still loading" message. The open action is queued and runs automatically once the client has initialized.

Dispatch configuration

share_between_jobs accepts:

  • 'all'
  • a flat group: { 'police', 'sheriff' }
  • multiple groups: { { 'pd' }, { 'ems', 'mechanic' } }
  • both job names and department keys (agencies) from Config.MDT.departments

status_codes accepts:

  • label_key with an optional label fallback
  • per-status scope via jobs = { ... } and/or agencies = { ... }
  • colors as a name or hex (for example '#ff6b00')

Leadership access (isBoss) per agency/job

Config.MDT.departments[agency].boss.jobs[job] controls access to the leadership area. Use exactly one of these per job, do not combine them:

  • rank_name: exact rank name (string or list)
  • min_grade: rank number must be >= this value
  • last: the top N grades (for example 2 = the highest two)
boss = {
    jobs = {
        police = {
            rank_name = { 'chief', 'captain' },
        },
    },
}

Modular record model (Lua)

All record fields (persons/vehicles) and vehicle hash-name mappings live in one place: config/akte-models.lua.

  • Config.AkteModels.person.fields - person record fields
  • Config.AkteModels.vehicle.fields - vehicle record fields
  • Config.AkteModels.vehicle_model_names - model hash to display name, so you don't get "Unknown" models

Each field under fields understands:

  • key - unique field name (DB and UI key)
  • label_key - locale key for the UI label
  • type - text, select, or textarea
  • default - default value
  • editable - true/false; when false, the server never overwrites the field
  • options - for select only (array of { value, label_key })

To add a field, edit config/akte-models.lua only; the UI renders it automatically. On save the server applies only fields marked editable = true. For unknown vehicles, add the hash to vehicle_model_names.

Setting up the live map

The default map style (styleAtlas, ~44MB) ships with the repository and works out of the box - the live map needs no extra download.

The extra styles styleGrid (coordinate grid) and styleSatelite (satellite) are much larger and are not in the repository. If you want them, download the optional tile pack and extract the folders into web/map/:

  1. Download the optional pack: https://drive.proton.me/urls/YZE057HH5G#KN3aoWGvPXb8
  2. Extract so the structure matches:
    web/map/styleGrid/{z}/{x}/{y}.png
    web/map/styleSatelite/{z}/{x}/{y}.jpg
    
  3. Rebuild the web UI:
    cd web && bun run build

The build copies whatever styles exist in web/map/ into public/map/ and writes a styles.json. The UI reads that file and only offers the styles that are actually present - missing styles fall back to the atlas. Restart the resource after building.

Map tiles originally from RiceaRaul/gta-v-map-leaflet. All credit goes to RiceaRaul and contributors.

Standards

Coding and design standards are in STANDARDS.md. Please read it before contributing.

Support

Support is handled through GitHub Issues only. Please don't send support requests via Discord, DM, or email.


License

See LICENSE.

Disclaimer

This is a community project and is not affiliated with, endorsed by, or connected to Tubehosting. Dieses Projekt ist ein Community-Projekt und ist nicht mit Tubehosting affiliiert, von Tubehosting unterstützt oder verbunden.

About

A free, community-driven MDT developed by members of the Tubehosting Discord. Not affiliated with Tubehosting.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages