blob: 463449a3d37e8cd4825d30c806459bfbba14811d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
function custom_gearEvent(gear)
-- manage gear when ´E´
if gear == 69 then
local ignition = 1
if GetContextInfo("simulation") == "rFactor2.exe" then
ignition = GetCarInfo("ignition")
end
local g = GetCarInfo("gear")
--print ( string.format("gear %d/ignition %d" , g, ignition))
toggleAllLed(0)
if ignition == 2 then
SetLeftDigits(" ---- ")
SetRightDigits(" ---- ")
else
SetLeftDigits(" ")
SetRightDigits(" ")
end
if ignition == 0 then
SetGearDigit(" ")
elseif ignition == 1 then
SetGearDigit(GetCurrentGear())
end
SLISendReport(1)
return 1
end
return 2
end
|