Compare commits

...

10 Commits

Author SHA1 Message Date
6535839402 Auto-sync 2026-04-16 12:20 2026-04-16 12:20:01 +02:00
af68b6e7c8 Auto-sync 2026-04-16 12:10 2026-04-16 12:10:01 +02:00
0c60b0ca5b Auto-sync 2026-04-16 06:10 2026-04-16 06:10:01 +02:00
41964636f9 Auto-sync 2026-04-16 00:10 2026-04-16 00:10:01 +02:00
46b2b23373 Auto-sync 2026-04-15 23:55 2026-04-15 23:55:01 +02:00
55c7ded0f0 Auto-sync 2026-04-15 23:50 2026-04-15 23:50:01 +02:00
c7b33907a3 Auto-sync 2026-04-15 23:45 2026-04-15 23:45:02 +02:00
b22b717ab4 Auto-sync 2026-04-15 23:40 2026-04-15 23:40:01 +02:00
3018e3a05a Auto-sync 2026-04-15 23:35 2026-04-15 23:35:01 +02:00
81659adcf1 Auto-sync 2026-04-15 23:10 2026-04-15 23:10:01 +02:00
6 changed files with 56 additions and 3 deletions

View File

@ -28,6 +28,7 @@ files {
'nui/script.js',
'nui/vue.js',
'nui/fonts/*.*',
'nui/vehicle_images.js',
'nui/images/*.*',
'nui/images/logo/*.*',
'nui/images/cars/*.*',

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -314,7 +314,50 @@
</div><!-- /#app -->
<script src="vehicle_images.js"></script>
<script>
// ═══════════════════════════════════════════════════════════════
// MercyV Garage Fahrzeugbilder Konfiguration
// Modellname → Bild-URL (lokal oder extern)
//
// Beispiele:
// 'police3': 'images/cars/police3.png' (lokale Datei)
// 'ambulance': 'https://example.com/amb.png' (externe URL)
// 'gbpolbisonhf': 'images/cars/gbpolbisonhf.png'
// ═══════════════════════════════════════════════════════════════
const VehicleImages = {
// ── Polizei ───────────────────────────────────────────────
'police': 'images/cars/police.png',
'police2': 'images/cars/police2.png',
'police3': 'images/cars/police3.png',
'police4': 'images/cars/police4.png',
'gbpolbisonhf': 'images/cars/gbpolbisonhf.png',
'gbpolbisonstx': 'images/cars/gbpolbisonstx.png',
// ── Ambulanz ──────────────────────────────────────────────
'ambulance': 'images/cars/ambulance.png',
'frogger': 'images/cars/frogger.png',
// ── Eigene Fahrzeuge (hier ergänzen) ──────────────────────
// 'meinauto': 'images/cars/meinauto.png',
};
// Standardbild wenn kein Eintrag gefunden
const DefaultVehicleImage = 'images/defaultimage.png';
/**
* Gibt die Bild-URL für ein Fahrzeugmodell zurück.
* Sucht zuerst nach dem Modellnamen, dann nach dem Anzeigenamen (displayName).
*/
function getVehicleImage(modelname, displayName) {
const model = (modelname || '').toLowerCase().trim();
const display = (displayName || '').toLowerCase().trim();
return VehicleImages[model]
|| VehicleImages[display]
|| DefaultVehicleImage;
}
</script>
<script src="script.js"></script>
</body>
</html>

View File

@ -67,6 +67,15 @@ const app = new Vue({
this.close();
},
getVehicleImage(modelname, carimage) {
if (typeof VehicleImages !== 'undefined') {
return getVehicleImage(modelname, carimage);
}
var model = (modelname || '').toLowerCase().trim();
var display = (carimage || '').toLowerCase().trim();
return 'images/cars/' + (model || display || 'default') + '.png';
},
parkFromPanel() {
if (!this.selectedVehicle || !this.selectedVehicle.nearby) return;
$.post(`https://${GetParentResourceName()}/parkFromPanel`, JSON.stringify({ plate: this.selectedVehicle.plate }));

File diff suppressed because one or more lines are too long

@ -1 +1 @@
Subproject commit fb58059168cf0013f488088909c6c805af3ddbfa
Subproject commit 8ab63766763c990d41a5b38d4b21638ca45aff80