-------- frontzosd Tolls -----
sc_GetTollss = function(speedLimit,speedcam_category)
local sysEntry = nil
local sysPoiVoice = nil
local sysVoice = nil
local sysTexts = nil
local sysPoi = nil
sysTexts = sc_GetSysEntry("tollvalues", "tollvalue_" .. tostring(speedLimit), "!")
sysVoice = sc_GetSysEntry("tollvalues", "tollvalue_" .. tostring(speedLimit) .. tostring("_voice"), "!")
local text = translated_format(m_i18n(sysVoice))
sysPoi = sc_GetSysEntry("poivalues", "poivalue_" .. tostring(speedLimit), "!")
sysPoiVoice = sc_GetSysEntry("poivalues", "poivalue_" .. tostring(speedLimit) .. tostring("_voice"), "!")
if MODEL.lua.SoundSpeedcam() and MODEL.navigation.curr_speedcam.category() == 12 then
if MODEL.lua.tollbooth() == 2 and MODEL.lua.tollpost_distance() then
doDelayed(5, function() sc_Voi(translated_format(m_i18n("in distance")) .. MODEL.navigation.curr_speedcam.distance() .. translated_format(m_i18n(sc_localWorld())) .. translated_format(m_i18n("..")) .. translated_format(m_i18n(sysVoice))) end)
return translated_format(m_i18n(sc_GetSysEntry("tollvalues", "tollvalue_" .. tostring(speedLimit)))) .. L" €"
elseif MODEL.lua.tollbooth() == 1 and MODEL.lua.tollpost_distance() then
return translated_format(m_i18n(sc_GetSysEntry("tollvalues", "tollvalue_" .. tostring(speedLimit)))) .. L" €"
elseif ( MODEL.lua.tollbooth() == 3 and MODEL.lua.tollpost_distance() ) then
doDelayed(5, function() sc_Voi(translated_format(m_i18n("in distance")) .. MODEL.navigation.curr_speedcam.distance() .. translated_format(m_i18n(sc_localWorld())) .. translated_format(m_i18n("..")) .. translated_format(m_i18n("Tolls ahead")) ) end )
elseif (not MODEL.lua.tollpost_distance() and MODEL.lua.tollbooth() == 2 ) then
sc_Voi(translated_format(m_i18n(sysVoice)))
return translated_format(m_i18n(sc_GetSysEntry("tollvalues", "tollvalue_" .. tostring(speedLimit)))) .. L" €"
elseif (not MODEL.lua.tollpost_distance() and MODEL.lua.tollbooth() == 1 ) then
return translated_format(m_i18n(sc_GetSysEntry("tollvalues", "tollvalue_" .. tostring(speedLimit)))) .. L" €"
elseif (not MODEL.lua.tollpost_distance() and MODEL.lua.tollbooth() == 3 ) then
sc_Voi(translated_format(m_i18n("Tolls ahead")) )
end
elseif MODEL.navigation.curr_speedcam.category() == 22 and MODEL.lua.mypoi() == 1 and MODEL.navigation.curr_speedcam.speed_limit() > 0 then
if MODEL.lua.tollpost_distance() then
doDelayed(5, function() sc_Voi(translated_format(m_i18n("in distance")) .. MODEL.navigation.curr_speedcam.distance() .. translated_format(m_i18n(sc_localWorld())) .. translated_format(m_i18n("..")) .. translated_format(m_i18n(sysPoiVoice))) end)
return tostring(sysPoi)
elseif not MODEL.lua.tollpost_distance() then
sc_Voi(translated_format(m_i18n(sysPoiVoice)))
return tostring(sysPoi)
end
end
end
Bookmarks