local objects = 
{
	--Maxime
	createObject ( 18024, 1424.40002, -2442.3999, 15.7 ,0, 0, 0 ,38),
	createObject ( 3037, 1416.09998, -2452.30005, 14.8, 0, 0, 90  ,38),
	createObject ( 3037, 1428.59961, -2452.2998, 14.8, 0, 0, 90  ,38),
	createObject ( 1495, 1432.09998, -2441.19995, 12.7 ,0, 0, 0 ,38),
	createObject ( 14782, 1430.90002, -2449, 13.7, 0, 0, 90  ,38),
	createObject ( 11392, 1424.19995, -2438.19995, 12.6, 0, 0, 180  ,38),
	createObject ( 927, 1414.5, -2451.3999, 13.9, 0, 0, 90  ,38),
	createObject ( 2653, 1414.90002, -2437.3999, 18.7, 0, 180.005, 0  ,38),
	createObject ( 2653, 1414.89941, -2448.5, 18.7, 0, 180, 0  ,38),
	createObject ( 930, 1415.30005, -2438, 13.5 ,0, 0, 0 ,38),
	createObject ( 2991, 1416.40002, -2433.5, 13.7 ,0, 0, 0 ,38),
	createObject ( 2991, 1416.40002, -2433.5, 14.8 ,0, 0, 0 ,38),
	createObject ( 944, 1415.2998, -2436.09961, 13.9, 0, 0, 90  ,38),
	createObject ( 920, 1431.19922, -2445.19922, 13.1 ,0, 0, 0 ,38),
	createObject ( 13647, 1425.5, -2420, 13.2, 0, 179.995, 90  ,38),
	createObject ( 13647, 1427.5, -2420, 13.2, 0, 180, 90  ,38),
	createObject ( 964, 1420.5, -2434.2998, 12.6 ,0, 0, 0 ,38),
	createObject ( 13647, 1425.5, -2457.8999, 7.73, 0, 196.433, 270  ,38),
	createObject ( 13647, 1427.5, -2457.8999, 7.73, 0, 196.43, 270  ,38),
	createObject ( 2986, 1415.19922, -2449.2998, 17.99 ,0, 0, 0 ,38),
	createObject ( 1778, 1433.80005, -2445.30005, 12.8, 0, 0, 89.022  ,38),
	createObject ( 2009, 1433.7998, -2446.5, 12.8, 0, 0, 179.995  ,38),
	createObject ( 1671, 1432.59961, -2446.69922, 13.2, 0, 0, 57.541  ,38),
	createObject ( 2607, 1429.09961, -2446.89941, 13, 0, 0, 90  ,38),
	createObject ( 2961, 1431.89941, -2445, 14.3 ,0, 0, 0 ,38),
	createObject ( 3077, 1414.89941, -2443, 12.5, 0, 0, 270  ,38),
	createObject ( 3017, 1429.09998, -2447.6001, 13.42 ,0, 0, 0 ,38),
	createObject ( 14680, 1424, -2438.1001, 15.1 ,0, 0, 0 ,38),
	createObject ( 14680, 1424.19922, -2445.59961, 15.1 ,0, 0, 0 ,38),
	createObject ( 14680, 1433.69922, -2445.59961, 15.1 ,0, 0, 0 ,38),
	createObject ( 14680, 1424.09998, -2453.1001, 15.1 ,0, 0, 0 ,38),
	createObject ( 14680, 1417.7998, -2445.59961, 15.1 ,0, 0, 0 ,38),
	createObject ( 2518, 1414.90002, -2447.30005, 12.6, 0, 0, 90  ,38),
	createObject ( 14578, 1428.19922, -2452.09961, 17.9 ,0, 0, 0 ,38),
	createObject ( 14882, 1437.09961, -2445.2998, 14.6, 0, 0, 92.082  ,38),
	createObject ( 3029, 1423, -2452.1001, 12.5, 0, 0, 90  ,38),
	createObject ( 3576, 1433, -2439.5, 14.3, 0, 0, 180  ,38),
	createObject ( 3084, 1433.69995, -2443, 14.2, 0, 90, 270  ,38),
	createObject ( 1025, 1429.59998, -2449.80005, 15.5, 0, 0, 180  ,38),
	createObject ( 1098, 1429.59998, -2450.8999, 16.6, 0, 0, 180  ,38),
	createObject ( 1097, 1429.59998, -2447.6001, 15.5, 0, 0, 179.995  ,38),
	createObject ( 1082, 1429.59998, -2446.5, 15.5, 0, 0, 179.995  ,38),
	createObject ( 1083, 1429.59998, -2448.69995, 15.5, 0, 0, 179.995  ,38),
	createObject ( 1084, 1429.59998, -2448.69995, 14.4, 0, 0, 179.995  ,38),
	createObject ( 1085, 1429.59998, -2449.80005, 14.4, 0, 0, 179.995  ,38),
	createObject ( 1096, 1429.59998, -2450.8999, 15.5, 0, 0, 179.995  ,38),
	createObject ( 1079, 1429.59998, -2449.80005, 13.3, 0, 0, 179.995  ,38),
	createObject ( 1077, 1429.59998, -2450.8999, 13.3, 0, 0, 179.995  ,38),
	createObject ( 1081, 1429.59998, -2450.8999, 14.4, 0, 0, 179.995  ,38),
	createObject ( 1080, 1429.59998, -2448.68994, 13.3, 0, 0, 179.995  ,38),
	createObject ( 1075, 1429.59998, -2449.80005, 16.6, 0, 0, 179.995  ,38),
	createObject ( 1074, 1429.59998, -2446.5, 16.6, 0, 0, 179.995  ,38),
	createObject ( 1073, 1429.59998, -2447.6001, 16.6, 0, 0, 179.995  ,38),
	createObject ( 1076, 1429.59998, -2448.69995, 16.6, 0, 0, 179.995  ,38),
	createObject ( 13639, 1426.5, -2436.19995, 7.4, 315, 0, 0  ,38),
	createObject ( 10789, 205.60001, -120.2, 50.4 ,0, 0, 0 ,38),
	createObject ( 10789, 1439.59998, -2419.1001, 14.9, 0, 0, 270  ,38),
}

local col = createColSphere(1422.083984375, -2451.73828125, 13.5546875 ,20)

local function watchChanges( )
	if getElementDimension( getLocalPlayer( ) ) > 0 and getElementDimension( getLocalPlayer( ) ) ~= getElementDimension( objects[1] ) and getElementInterior( getLocalPlayer( ) ) == getElementInterior( objects[1] ) then
		for key, value in pairs( objects ) do
			setElementDimension( value, getElementDimension( getLocalPlayer( ) ) )
		end
	elseif getElementDimension( getLocalPlayer( ) ) == 0 and getElementDimension( objects[1] ) ~= 65535 then
		for key, value in pairs( objects ) do
			setElementDimension( value, 65535 )
		end
	end
end
addEventHandler( "onClientColShapeHit", col,
	function( element )
		if element == getLocalPlayer( ) then
			addEventHandler( "onClientRender", root, watchChanges )
		end
	end
)
addEventHandler( "onClientColShapeLeave", col,
	function( element )
		if element == getLocalPlayer( ) then
			removeEventHandler( "onClientRender", root, watchChanges )
		end
	end
)

-- Put them standby for now.
for key, value in pairs( objects ) do
	setElementDimension( value, 65535 )
end

for index, object in ipairs ( objects ) do
    setElementDoubleSided ( object, true )
	--setElementCollisionsEnabled ( object, true )
end
