local objects = 
{
	--Maxime
	createObject(3944,1410.9000200,1392.4000200,10.1000000,0.0000000,0.0000000,93.2470000,67), --object(bistro_blok) (4)
	createObject(3944,1410.9000200,1392.1999500,13.0000000,0.0000000,0.0000000,93.2460000,67), --object(bistro_blok,67), (6,67),
	createObject(3944,1428.9000200,1384.5999800,9.7000000,0.0000000,359.0000000,181.2440000,67), --object(bistro_blok,67), (10,67),
	createObject(3944,1429.0000000,1384.5999800,13.2000000,0.0000000,358.9950000,181.2410000,67), --object(bistro_blok,67), (11,67),
	createObject(3944,1418.8000500,1383.3000500,10.0000000,0.0000000,0.0000000,181.2460000,67), --object(bistro_blok,67), (21,67),
	createObject(3944,1413.0999800,1374.5000000,9.3000000,0.0000000,359.0000000,92.9910000,67), --object(bistro_blok,67), (22,67),
	createObject(3944,1413.0999800,1374.4000200,11.4000000,0.0000000,358.9950000,92.9880000,67), --object(bistro_blok,67), (23,67),
	createObject(3944,1416.3000500,1382.3000500,13.0000000,0.0000000,0.0000000,181.2410000,67), --object(bistro_blok,67), (24,67),
	createObject(14838,1411.5999800,1385.4000200,9.2000000,0.2500000,179.0000000,92.5040000,67), --object(int_strip_club,67), (1,67),
	createObject(14838,1411.1999500,1388.1999500,9.2000000,0.2470000,179.2450000,92.4980000,67), --object(int_strip_club,67), (3,67),
	createObject(3944,1423.6999500,1392.1999500,9.7000000,0.0000000,0.0000000,92.4940000,67), --object(bistro_blok,67), (25,67),
	createObject(1536,1415.8000500,1382.4000200,10.2000000,0.0000000,0.0000000,1.0000000,67), --object(gen_doorext15,67), (1,67),
	createObject(14838,1413.4000200,1387.5000000,16.1000000,359.4950000,179.7390000,182.9910000,67), --object(int_strip_club,67), (5,67),
	createObject(2267,1413.5999800,1382.4000200,12.4000000,0.0000000,0.0000000,1.2500000,67), --object(frame_wood_3,67), (1,67),
	createObject(2269,1418.6999500,1382.0000000,12.0000000,0.0000000,0.0000000,1.2500000,67), --object(frame_wood_4,67), (1,67),
	createObject(2802,1418.4000200,1391.6999500,11.1000000,0.0000000,0.0000000,95.0000000,67), --object(castable1,67), (2,67),
	createObject(2723,1413.9000200,1388.0000000,11.1000000,0.0000000,0.0000000,0.0000000,67), --object(lm_stripstool,67), (1,67),
	createObject(14831,1424.8000500,1390.3000500,12.3000000,0.0000000,0.2500000,273.2500000,67), --object(lm_stripbar,67), (1,67),
	createObject(3944,1411.1999500,1391.4000200,10.4000000,0.0000000,0.5000000,0.9860000,67), --object(bistro_blok,67), (31,67),
	createObject(3944,1422.0999800,1390.9000200,12.0000000,0.0000000,0.0000000,272.2440000,67), --object(bistro_blok,67), (34,67),
	createObject(3944,1423.0999800,1386.3000500,16.5000000,0.0000000,0.0000000,92.4940000,67), --object(bistro_blok,67), (37,67),
	createObject(3944,1423.1999500,1383.9000200,16.5000000,0.0000000,0.0000000,92.4940000,67), --object(bistro_blok,67), (38,67),
	createObject(3944,1416.8000500,1399.1999500,9.7000000,0.0000000,0.0000000,1.4960000,67), --object(bistro_blok,67), (40,67),
	createObject(3944,1423.8000500,1391.3000500,10.2000000,0.0000000,359.2500000,92.4940000,67), --object(bistro_blok,67), (42,67),
	createObject(3944,1416.8000500,1398.5999800,10.4000000,0.0000000,0.0000000,2.9940000,67), --object(bistro_blok,67), (43,67),
	createObject(3944,1420.3000500,1408.0000000,10.3000000,0.0000000,0.0000000,93.9970000,67), --object(bistro_blok,67), (44,67),
	createObject(3944,1429.0999800,1398.0000000,11.3000000,0.0000000,0.0000000,359.4960000,67), --object(bistro_blok,67), (45,67),
	createObject(3944,1429.0999800,1398.0000000,10.3000000,0.0000000,0.0000000,359.4950000,67), --object(bistro_blok,67), (46,67),
	createObject(3944,1411.1999500,1392.9000200,10.4000000,0.0000000,0.5000000,2.2330000,67), --object(bistro_blok,67), (50,67),
	createObject(3944,1418.8000500,1383.3000500,6.5000000,0.0000000,0.0000000,181.2410000,67), --object(bistro_blok,67), (51,67),
	createObject(2723,1413.9000200,1386.9000200,11.1000000,0.0000000,0.0000000,0.0000000,67), --object(lm_stripstool,67), (2,67),
	createObject(2723,1413.9000200,1385.9000200,11.1000000,0.0000000,0.0000000,0.0000000,67), --object(lm_stripstool,67), (3,67),
	createObject(2723,1413.9000200,1384.8000500,11.1000000,0.0000000,0.0000000,0.0000000,67), --object(lm_stripstool,67), (4,67),
	createObject(2802,1422.3000500,1389.5999800,11.1000000,0.0000000,0.0000000,180.9990000,67), --object(castable1,67), (3,67),
	createObject(2802,1417.1999500,1387.9000200,11.1000000,0.0000000,0.0000000,2.2490000,67), --object(castable1,67), (4,67),
	createObject(1753,1422.3000500,1384.5000000,10.7000000,0.0000000,0.0000000,184.0000000,67), --object(swank_couch_1,67), (1,67),
	createObject(2315,1420.4000200,1385.6999500,10.7000000,0.0000000,0.0000000,4.0000000,67), --object(cj_tv_table4,67), (1,67),
	createObject(2802,1414.5999800,1391.5999800,11.1000000,0.0000000,0.0000000,94.9990000,67), --object(castable1,67), (5,67),
	createObject(2281,1410.8000500,1388.3000500,12.4000000,0.0000000,0.0000000,92.5000000,67), --object(frame_thick_5,67), (1,67),
	createObject(2279,1410.0000000,1385.5000000,12.5000000,0.0000000,0.0000000,271.5000000,67), --object(frame_thick_6,67), (1,67),
	createObject(1893,1414.9000200,1388.0000000,14.2000000,0.0000000,0.0000000,3.0000000,67), --object(shoplight1,67), (1,67),
	createObject(1893,1411.3000500,1386.6999500,14.2000000,0.0000000,0.0000000,93.2490000,67), --object(shoplight1,67), (2,67),
	createObject(1893,1419.8000500,1388.1999500,14.2000000,0.0000000,0.0000000,2.9990000,67), --object(shoplight1,67), (3,67),
	createObject(3944,1420.8000500,1405.0999800,10.3000000,0.0000000,0.0000000,91.2440000,67), --object(bistro_blok,67), (52,67),
	createObject(14838,1412.1992200,1390.7998000,9.3000000,0.2470000,178.9890000,92.4990000,67), --object(int_strip_club,67), (12,67),
	createObject(3944,1415.0000000,1402.0999800,10.1000000,0.0000000,0.0000000,93.2460000,67), --object(bistro_blok,67), (54,67),
	createObject(1535,1420.0999800,1396.8000500,10.9000000,0.0000000,0.0000000,91.0000000,67), --object(gen_doorext14,67), (1,67),
	createObject(2262,1421.4000200,1399.3000500,12.5000000,0.0000000,0.0000000,180.0000000,67), --object(frame_slim_3,67), (1,67),
	createObject(2185,1416.5000000,1395.9000200,10.9000000,0.0000000,0.0000000,94.0000000,67), --object(med_office6_desk_1,67), (1,67),
	createObject(1721,1415.3000500,1396.6999500,10.9000000,0.0000000,0.0000000,274.0000000,67), --object(est_chair1,67), (1,67),
	createObject(1721,1417.5000000,1397.3000500,10.9000000,0.0000000,0.0000000,115.9990000,67), --object(est_chair1,67), (2,67),
	createObject(1721,1417.5000000,1396.0999800,10.9000000,0.0000000,0.0000000,67.9940000,67), --object(est_chair1,67), (3,67),
	createObject(1829,1415.0999800,1398.5999800,11.3000000,0.0000000,0.0000000,92.0000000,67), --object(man_safenew,67), (1,67),
	createObject(2267,1414.5000000,1396.6999500,12.7000000,0.0000000,0.0000000,92.0000000,67), --object(frame_wood_3,67), (2,67),
	createObject(2200,1419.1999500,1394.0999800,10.9000000,0.0000000,0.0000000,182.5000000,67), --object(med_office5_unit_1,67), (1,67),
	createObject(2200,1419.0999800,1393.5000000,10.9000000,0.0000000,0.0000000,182.4990000,67), --object(med_office5_unit_1,67), (2,67),
	createObject(2200,1417.0000000,1393.4000200,10.9000000,0.0000000,0.0000000,182.4990000,67), --object(med_office5_unit_1,67), (3,67),
	createObject(2200,1416.1999500,1393.4000200,10.9000000,0.0000000,0.0000000,182.4990000,67), --object(med_office5_unit_1,67), (4,67),
	createObject(2200,1422.0000000,1399.1999500,10.9000000,0.0000000,0.0000000,182.4990000,67), --object(med_office5_unit_1,67), (5,67),
	createObject(3943,1449.9000200,1395.5000000,13.2000000,0.0000000,0.0000000,0.0000000,67), --object(mid_staircase,67), (1,67),
	createObject(3943,1451.0000000,1402.0000000,13.2000000,0.0000000,0.0000000,1.7500000,67), --object(mid_staircase,67), (2,67),
	createObject(3943,1439.1999500,1399.0000000,13.1000000,0.0000000,0.0000000,90.9970000,67), --object(mid_staircase,67), (3,67),
	createObject(1535,1443.0000000,1389.4000200,13.0000000,0.0000000,0.0000000,90.7500000,67), --object(gen_doorext14,67), (2,67),
	createObject(1535,1422.6999500,1397.0000000,10.9000000,0.0000000,0.0000000,92.4970000,67), --object(gen_doorext14,67), (3,67),
	createObject(18552,1466.3000500,1386.5999800,9.8000000,0.0000000,0.0000000,270.0000000,67), --object(cunts_ammun,67), (3,67),
	createObject(18552,1441.1999500,1399.9000200,12.8000000,0.0000000,0.0000000,359.7450000,67), --object(cunts_ammun,67), (5,67),
	createObject(18552,1453.6999500,1402.9000200,9.5000000,0.0000000,0.0000000,359.7420000,67), --object(cunts_ammun,67), (6,67),
	createObject(11008,1477.6999500,1336.8000500,16.5000000,0.5000000,0.0000000,1.0000000,67), --object(firehouse_sfs,67), (1,67),
	createObject(11008,1496.4000200,1351.0999800,16.6000000,0.5000000,0.0000000,91.7500000,67), --object(firehouse_sfs,67), (2,67),
	createObject(11008,1476.0996100,1378.0000000,16.6000000,0.4940000,0.5000000,181.2410000,67), --object(firehouse_sfs,67), (3,67),
	createObject(11008,1449.9000200,1357.5000000,16.7000000,359.9950000,0.4950000,272.2460000,67), --object(firehouse_sfs,67), (4,67),
	createObject(8527,1471.8994100,1356.7998000,4.7000000,0.0000000,0.0000000,0.0000000,67), --object(vagbond02_lvs,67), (1,67),
	createObject(1498,1479.0999800,1358.4000200,9.9000000,0.0000000,0.0000000,271.5000000,67), --object(gen_doorext03,67), (1,67),
	createObject(2964,1468.8000500,1355.9000200,9.9000000,0.0000000,0.0000000,90.7500000,67), --object(k_pooltablesm,67), (1,67),
	createObject(338,1469.5999800,1355.5000000,10.8000000,0.0000000,269.0000000,0.0000000,67), --object(1,67),
	createObject(338,1469.4000200,1357.0000000,10.8000000,0.0000000,266.7450000,52.7500000,67), --object(2,67),
	createObject(3106,1469.1999500,1356.0000000,10.8000000,0.0000000,0.0000000,0.0000000,67), --object(k_poolball8,67), (1,67),
	createObject(3105,1469.4000200,1356.5000000,10.8000000,0.0000000,0.0000000,0.0000000,67), --object(k_poolballspt07,67), (1,67),
	createObject(3104,1468.5000000,1356.5000000,10.8000000,0.0000000,0.0000000,0.0000000,67), --object(k_poolballspt06,67), (1,67),
	createObject(3102,1468.5999800,1356.6999500,10.8000000,0.0000000,0.0000000,0.0000000,67), --object(k_poolballspt04,67), (1,67),
	createObject(2637,1474.0000000,1357.1999500,10.3000000,0.0000000,0.0000000,0.0000000,67), --object(cj_pizza_table2,67), (1,67),
	createObject(1720,1474.4000200,1358.0999800,9.9000000,0.0000000,0.0000000,0.0000000,67), --object(rest_chair,67), (1,67),
	createObject(1720,1473.5000000,1358.0999800,9.9000000,0.0000000,0.0000000,0.0000000,67), --object(rest_chair,67), (2,67),
	createObject(1720,1472.6999500,1357.1999500,9.9000000,0.0000000,0.0000000,90.0000000,67), --object(rest_chair,67), (3,67),
	createObject(1720,1473.5000000,1356.4000200,9.9000000,0.0000000,0.0000000,182.0000000,67), --object(rest_chair,67), (4,67),
	createObject(1720,1474.5000000,1356.4000200,9.9000000,0.0000000,0.0000000,182.0000000,67), --object(rest_chair,67), (5,67),
	createObject(1720,1475.1999500,1357.1999500,9.9000000,0.0000000,0.0000000,268.0000000,67), --object(rest_chair,67), (6,67),
	createObject(1753,1467.5000000,1360.1999500,9.9000000,0.0000000,0.0000000,2.2500000,67), --object(swank_couch_1,67), (2,67),
	createObject(1902,1473.8000500,1357.1999500,10.7000000,0.0000000,0.0000000,0.0000000,67), --object(chip_stack08,67), (1,67),
	createObject(1903,1473.6999500,1357.1999500,10.7000000,0.0000000,0.0000000,0.0000000,67), --object(chip_stack09,67), (1,67),
	createObject(1901,1473.8000500,1357.3000500,10.7000000,0.0000000,0.0000000,0.0000000,67), --object(chip_stack07,67), (1,67),
	createObject(1899,1473.1999500,1356.9000200,10.7000000,0.0000000,0.0000000,0.0000000,67), --object(pkr_chp_vlo07,67), (1,67),
	createObject(1911,1474.5000000,1357.0999800,10.7000000,0.0000000,0.0000000,0.0000000,67), --object(chip_stack11,67), (1,67),
	createObject(2147,1471.9000200,1360.5000000,9.8000000,0.0000000,0.0000000,0.5000000,67), --object(cj_kitch1_fridge,67), (1,67),
	createObject(1516,1474.4000200,1360.1999500,10.1000000,0.0000000,0.0000000,0.0000000,67), --object(dyn_table_03,67), (1,67),
	createObject(2103,1474.4000200,1360.1999500,10.6000000,0.0000000,0.0000000,0.0000000,67), --object(low_hi_fi_1,67), (1,67),
	createObject(4889,1471.0000000,1350.6999500,18.4000000,0.0000000,178.7500000,0.0000000,67), --object(dwntwnbit2b_las,67), (1,67),
	createObject(2074,1476.8000500,1357.3000500,13.6000000,0.0000000,0.0000000,0.0000000,67), --object(cj_mlight8,67), (2,67),
	createObject(2074,1469.5000000,1357.3000500,13.5000000,0.0000000,0.0000000,0.0000000,67), --object(cj_mlight8,67), (4,67),
	createObject(2074,1473.6999500,1357.1999500,13.6000000,0.0000000,0.0000000,0.0000000,67), --object(cj_mlight8,67), (5,67),
	createObject(2069,1470.1999500,1360.3000500,10.0000000,0.0000000,0.0000000,0.0000000,67), --object(cj_mlight7,67), (1,67),
	createObject(2287,1467.5000000,1357.3000500,11.7000000,0.0000000,0.0000000,92.0000000,67), --object(frame_4,67), (1,67),
	createObject(2286,1475.6999500,1360.8000500,12.1000000,0.0000000,0.0000000,2.2500000,67), --object(frame_5,67), (1,67),
}

local col = createColSphere(1416.5126953125, 1382.8359375, 11.280016899109 , 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

