summaryrefslogtreecommitdiff
path: root/scripts/enter_exit_session.lua
blob: 2a246b5e18b4766107b0a5034a9ed3fe43a6ce36 (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 v3.1
-- Copyright (c)2012-2013 by Zappadoc - All Rights Reserved.
-- Event received when the car enter and exit the session.

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

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

	-- do nothing
	return 1
end

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

	-- call global custom script
	result = global_custom_exitSessionEvent(deviceType)
	if result <= 1 then return result end
	-- if result >= 2 continue

	-- do nothing
	return 1
end