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
|
license = Config.License
|
||||||
})
|
})
|
||||||
SetNuiFocus(true, true)
|
SetNuiFocus(true, true)
|
||||||
|
exports['hex_4_hud']:HideHud(true)
|
||||||
TriggerScreenblurFadeIn(500)
|
TriggerScreenblurFadeIn(500)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
RegisterNUICallback('close', function()
|
RegisterNUICallback('close', function()
|
||||||
SetNuiFocus(false, false)
|
SetNuiFocus(false, false)
|
||||||
|
exports['hex_4_hud']:HideHud(false)
|
||||||
TriggerScreenblurFadeOut(500)
|
TriggerScreenblurFadeOut(500)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -84,7 +86,7 @@ local function createMissionBlip(coords)
|
|||||||
SetBlipRoute(blip, true)
|
SetBlipRoute(blip, true)
|
||||||
SetBlipRouteColour(blip, 5)
|
SetBlipRouteColour(blip, 5)
|
||||||
BeginTextCommandSetBlipName("STRING")
|
BeginTextCommandSetBlipName("STRING")
|
||||||
AddTextComponentString("Prüfungspunkt")
|
AddTextComponentString("Prüfungspunkt")
|
||||||
EndTextCommandSetBlipName(blip)
|
EndTextCommandSetBlipName(blip)
|
||||||
currentBlip = blip
|
currentBlip = blip
|
||||||
end
|
end
|
||||||
@ -117,7 +119,7 @@ local function endPractice(aborted)
|
|||||||
error = 0
|
error = 0
|
||||||
|
|
||||||
if aborted then
|
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"])
|
ESX.ShowNotification(Config.Lang[Config.Language]["practice_error"])
|
||||||
postNUI({ type = "DISPLAY_RISULTATO", errori = errori, failed = true })
|
postNUI({ type = "DISPLAY_RISULTATO", errori = errori, failed = true })
|
||||||
else
|
else
|
||||||
@ -144,6 +146,12 @@ SetUpMarker = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
maxSpeed = coords.speedLimit or nil
|
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
|
coords = coords.coordinate
|
||||||
|
|
||||||
if not coords then
|
if not coords then
|
||||||
@ -169,15 +177,15 @@ SetUpMarker = function()
|
|||||||
if vehicle and vehicle ~= 0 then
|
if vehicle and vehicle ~= 0 then
|
||||||
local speed = GetEntitySpeed(vehicle) * Config.SpeedMultiplier
|
local speed = GetEntitySpeed(vehicle) * Config.SpeedMultiplier
|
||||||
|
|
||||||
-- Geschwindigkeitsfehler prüfen
|
-- Geschwindigkeitsfehler prüfen
|
||||||
if maxSpeed ~= nil and speed > maxSpeed then
|
if maxSpeed ~= nil and speed > maxSpeed then
|
||||||
sleep = 1000
|
sleep = 1000
|
||||||
error = error + 1
|
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
|
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)
|
endPractice(true)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user