Auto-sync 2026-04-14 21:05
This commit is contained in:
parent
2a5e72e91b
commit
f86aaf4191
@ -23,12 +23,14 @@ OpenDMV = function()
|
||||
license = Config.License
|
||||
})
|
||||
SetNuiFocus(true, true)
|
||||
exports['hex_4_hud']:HideHud(true)
|
||||
TriggerScreenblurFadeIn(500)
|
||||
end)
|
||||
end
|
||||
|
||||
RegisterNUICallback('close', function()
|
||||
SetNuiFocus(false, false)
|
||||
exports['hex_4_hud']:HideHud(false)
|
||||
TriggerScreenblurFadeOut(500)
|
||||
end)
|
||||
|
||||
@ -84,7 +86,7 @@ local function createMissionBlip(coords)
|
||||
SetBlipRoute(blip, true)
|
||||
SetBlipRouteColour(blip, 5)
|
||||
BeginTextCommandSetBlipName("STRING")
|
||||
AddTextComponentString("Prüfungspunkt")
|
||||
AddTextComponentString("Prüfungspunkt")
|
||||
EndTextCommandSetBlipName(blip)
|
||||
currentBlip = blip
|
||||
end
|
||||
@ -117,7 +119,7 @@ local function endPractice(aborted)
|
||||
error = 0
|
||||
|
||||
if aborted then
|
||||
-- Prüfung abgebrochen wegen zu vieler Fehler
|
||||
-- Prüfung abgebrochen wegen zu vieler Fehler
|
||||
ESX.ShowNotification(Config.Lang[Config.Language]["practice_error"])
|
||||
postNUI({ type = "DISPLAY_RISULTATO", errori = errori, failed = true })
|
||||
else
|
||||
@ -144,6 +146,12 @@ SetUpMarker = function()
|
||||
end
|
||||
|
||||
maxSpeed = coords.speedLimit or nil
|
||||
|
||||
-- NEU: Benachrichtigung über das Tempolimit beim Erreichen eines neuen Abschnitts
|
||||
if maxSpeed ~= nil then
|
||||
exports['hex_4_hud']:Notify('Tempolimit', 'In diesem Bereich gilt: ' .. maxSpeed .. ' km/h', 'info', 5000)
|
||||
end
|
||||
|
||||
coords = coords.coordinate
|
||||
|
||||
if not coords then
|
||||
@ -169,15 +177,15 @@ SetUpMarker = function()
|
||||
if vehicle and vehicle ~= 0 then
|
||||
local speed = GetEntitySpeed(vehicle) * Config.SpeedMultiplier
|
||||
|
||||
-- Geschwindigkeitsfehler prüfen
|
||||
-- Geschwindigkeitsfehler prüfen
|
||||
if maxSpeed ~= nil and speed > maxSpeed then
|
||||
sleep = 1000
|
||||
error = error + 1
|
||||
ESX.ShowNotification("~r~Fehler " .. error .. "/" .. Config.MaxErrors .. ": ~w~" .. Config.Lang[Config.Language]["speed_error"])
|
||||
exports['hex_4_hud']:Notify('Fehler', 'Fehler ' .. error .. '/' .. Config.MaxErrors .. ': ' .. Config.Lang[Config.Language]["speed_error"], 'error', 5000)
|
||||
|
||||
-- Prüfung abbrechen bei zu vielen Fehlern
|
||||
-- Prüfung abbrechen bei zu vielen Fehlern
|
||||
if error >= Config.MaxErrors then
|
||||
ESX.ShowNotification("~r~Prüfung abgebrochen! ~w~Zu viele Fehler.")
|
||||
exports['hex_4_hud']:Notify('Prüfung', 'Prüfung abgebrochen! Zu viele Fehler.', 'error', 5000)
|
||||
endPractice(true)
|
||||
break
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user