require("scripts/gugus/sector") function custom_enterSessionEvent(devType) mOldSector = -1 local laps = GetContextInfo("laps") local sector = GetCarInfo("sector") if laps <= 1 then mLastSectors = {0.0, 0.0, 0.0} mBestSectors = {0.0, 0.0, 0.0} end -- type your custom script on session start, here print () print ( "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv") print ("simu : "..GetContextInfo("simulation")) print ("car : "..GetContextInfo("carname")) print ("track : "..GetContextInfo("trackname")) --print ("session: "..GetContextInfo("sessiontype")) print () if GetContextInfo("ospcustom") then print ("has ospcustom") end print ("shiftlightsmethod: "..GetContextInfo("shiftlightsmethod")) print ("ospmethod : "..GetContextInfo("ospmethod")) print ("speedlimitemethod: "..GetContextInfo("speedlimitermethod")) print ("") print ("lap "..laps.." / sector "..sector) return 2 end function global_custom_exitSessionEvent(devType) -- type your custom script on session ending, here if GetContextInfo("ospcustom") then print ("has ospcustom") end print () print ("shiftlightsmethod: "..GetContextInfo("shiftlightsmethod")) print ("ospmethod : "..GetContextInfo("ospmethod")) print ("speedlimitemethod: "..GetContextInfo("speedlimitermethod")) print ( "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^") print () --my_setups=io.open("gus_cars.cfg", "a") --my_setups:write(GetContextInfo("carname"), " shiftligts ", GetContextInfo("shiftlightsmethod"), "\n") --my_setups:write(GetContextInfo("carname"), " speedlimiter ", GetContextInfo("speedlimitermethod"), "\n") --my_setups:close() return 2 end print ( "gugus> + enter exit" )