summaryrefslogtreecommitdiff
path: root/scripts/enter_exit_session.lua
blob: d720070621a32a5ade846d3a806466c2ab630b1e (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
33
34
35
36
37
-- SLIMax Mgr Lua Script v2
-- Copyright (c)2011-2013 by EK and Zappadoc - All Rights Reserved.
-- Event received when the car enter and exit the session.

-- param = device type (integer - see mDeviceType table)
-- enter session
function enterSessionEvent(devType)
	-- call custom script
	local result = custom_enterSessionEvent(devType)
	if result <= 1 then return result end
	-- if result >= 2 continue

	-- call global custom script
	result = global_custom_enterSessionEvent(devType)
	if result <= 1 then return result end
	-- if result >= 2 continue
	
	-- do nothing
	return 1
end

-- param = device type (integer - see mDeviceType table)
-- exit session
function exitSessionEvent(devType)
	-- call custom script
	local result = custom_exitSessionEvent(devType)
	if result <= 1 then return result end
	-- if result >= 2 continue
	
	-- call global custom script
	result = global_custom_exitSessionEvent(devType)
	if result <= 1 then return result end
	-- if result >= 2 continue

	-- do nothing
	return 1
end