local objects = 
{
	--Maxime
	createObject(3873,976.6992200,-245.8994100,954.7000100,0.0000000,0.0000000,0.0000000,3), --object(silicon04_sfs,3), (1,3),
	createObject(6871,969.0000000,-279.0000000,1001.0000000,0.0000000,0.0000000,0.0000000,3), --object(courthse_vgn,3), (1,3),
	createObject(6871,943.0000000,-231.0000000,1001.0000000,0.0000000,0.0000000,270.0000000,3), --object(courthse_vgn,3), (2,3),
	createObject(3873,993.0000000,-247.0000000,954.5000000,0.0000000,0.0000000,0.0000000,3), --object(silicon04_sfs,3), (2,3),
	createObject(6871,1024.0000000,-242.0000000,1001.0000000,0.0000000,0.0000000,90.0000000,3), --object(courthse_vgn,3), (3,3),
	createObject(6871,977.5999800,-194.0000000,948.1699800,180.0000000,0.0000000,0.0000000,3), --object(courthse_vgn,3), (4,3),
	createObject(6871,971.7000100,-192.8849900,950.0000000,90.0000000,0.0000000,0.0000000,3), --object(courthse_vgn,3), (6,3),
	createObject(1649,975.0000000,-222.2000000,980.0499900,0.0000000,0.0000000,0.0000000,3), --object(wglasssmash,3), (1,3),
	createObject(1649,981.0000000,-222.1992200,980.0499900,0.0000000,0.0000000,0.0000000,3), --object(wglasssmash,3), (2,3),
	createObject(1649,986.0000000,-222.1992200,980.0499900,0.0000000,0.0000000,0.0000000,3), --object(wglasssmash,3), (4,3),
	createObject(1649,992.0000000,-222.1992200,980.0499900,0.0000000,0.0000000,0.0000000,3), --object(wglasssmash,3), (5,3),
	createObject(2774,978.0000000,-221.8994100,973.0000000,0.0000000,0.0000000,0.0000000,3), --object(cj_airp_pillars,3), (1,3),
	createObject(2774,989.0000000,-221.8994100,973.0000000,0.0000000,0.0000000,0.0000000,3), --object(cj_airp_pillars,3), (2,3),
	createObject(2774,983.5000000,-221.8999900,973.0000000,0.0000000,0.0000000,0.0000000,3), --object(cj_airp_pillars,3), (3,3),
	createObject(1569,979.2999900,-222.2700000,971.6699800,0.0000000,0.0000000,0.0000000,3), --object(adam_v_door,3), (1,3),
	createObject(1569,982.2999900,-222.2700000,971.6699800,0.0000000,0.0000000,180.0000000,3), --object(adam_v_door,3), (2,3),
	createObject(1569,987.6992200,-222.2695300,971.6699800,0.0000000,0.0000000,179.9950000,3), --object(adam_v_door,3), (3,3),
	createObject(1569,984.6992200,-222.2695300,971.6699800,0.0000000,0.0000000,0.0000000,3), --object(adam_v_door,3), (4,3),
	createObject(6871,970.0000000,-165.2998000,1001.0000000,0.0000000,0.0000000,0.0000000,3), --object(courthse_vgn,3), (7,3),
	createObject(3873,992.0996100,-243.0000000,954.2600100,0.0000000,0.0000000,0.0000000,3), --object(silicon04_sfs,3), (13,3),
	createObject(1569,994.2000100,-219.1000100,978.4000200,0.0000000,0.0000000,90.0000000,3), --object(adam_v_door,3), (5,3),
	createObject(1569,994.2000100,-216.1000100,978.4000200,0.0000000,0.0000000,270.0000000,3), --object(adam_v_door,3), (6,3),
	createObject(2773,979.7999900,-234.3999900,972.5700100,0.0000000,0.0000000,80.0000000,3), --object(cj_airprt_bar,3), (1,3),
	createObject(2773,977.4000200,-234.0000000,972.5700100,0.0000000,0.0000000,84.0000000,3), --object(cj_airprt_bar,3), (2,3),
	createObject(2773,982.0000000,-235.2998000,972.5700100,0.0000000,0.0000000,59.9960000,3), --object(cj_airprt_bar,3), (3,3),
	createObject(2773,975.0000000,-234.0996100,972.5700100,0.0000000,0.0000000,99.9980000,3), --object(cj_airprt_bar,3), (4,3),
	createObject(2773,972.5999800,-234.8000000,972.5700100,0.0000000,0.0000000,110.0000000,3), --object(cj_airprt_bar,3), (5,3),
	createObject(1649,978.0000000,-219.8994100,980.0499900,0.0000000,0.0000000,90.0000000,3), --object(wglasssmash,3), (6,3),
	createObject(1649,983.5000000,-219.8994100,980.0499900,0.0000000,0.0000000,90.0000000,3), --object(wglasssmash,3), (7,3),
	createObject(3440,983.5000000,-217.6992200,980.7999900,0.0000000,0.0000000,0.0000000,3), --object(arptpillar01_lvs,3), (1,3),
	createObject(3440,978.0000000,-217.7000000,980.7000100,0.0000000,0.0000000,0.0000000,3), --object(arptpillar01_lvs,3), (2,3),
	createObject(1708,993.9000200,-221.3000000,978.4000200,0.0000000,0.0000000,180.0000000,3), --object(kb_chair02,3), (1,3),
	createObject(2185,981.6992200,-219.7998000,978.3800000,0.0000000,0.0000000,179.9950000,3), --object(med_office6_desk_1,3), (1,3),
	createObject(1714,980.7999900,-220.8000000,978.4000200,0.0000000,0.0000000,180.0000000,3), --object(kb_swivelchair1,3), (1,3),
	createObject(10945,1004.5000000,-283.8994100,914.7230800,0.0000000,90.0000000,0.0000000,3), --object(skyscrap_sfs,3), (1,3),
	createObject(1714,973.9000200,-220.8999900,978.4000200,0.0000000,0.0000000,135.0000000,3), --object(kb_swivelchair1,3), (2,3),
	createObject(2184,975.7000100,-220.6000100,978.3800000,0.0000000,0.0000000,135.0000000,3), --object(med_office6_desk_2,3), (1,3),
	createObject(1708,976.2000100,-219.3000000,978.3800000,0.0000000,0.0000000,300.0000000,3), --object(kb_chair02,3), (2,3),
	createObject(1708,974.5999800,-218.0000000,978.3800000,0.0000000,0.0000000,330.0000000,3), --object(kb_chair02,3), (3,3),
	createObject(1708,991.2000100,-221.3000000,978.4000200,0.0000000,0.0000000,180.0000000,3), --object(kb_chair02,3), (4,3),
	createObject(1516,992.0000000,-221.3000000,978.4000200,0.0000000,0.0000000,0.0000000,3), --object(dyn_table_03,3), (2,3),
	createObject(10945,1004.3994100,-281.5000000,973.1269500,0.0000000,90.0000000,0.0000000,3), --object(skyscrap_sfs,3), (2,3),
	createObject(2207,986.8994100,-220.0996100,978.4000200,0.0000000,0.0000000,135.0000000,3), --object(med_office7_desk_1,3), (1,3),
	createObject(1714,985.2999900,-220.3999900,978.4000200,0.0000000,0.0000000,135.0000000,3), --object(kb_swivelchair1,3), (3,3),
	createObject(2190,985.5000000,-219.0000000,979.1660200,0.0000000,0.0000000,0.0000000,3), --object(pc_1,3), (1,3),
	createObject(2190,974.2000100,-219.6000100,979.1660200,0.0000000,0.0000000,0.0000000,3), --object(pc_1,3), (2,3),
	createObject(1708,980.4000200,-218.6000100,978.3800000,0.0000000,0.0000000,0.0000000,3), --object(kb_chair02,3), (5,3),
	createObject(2247,992.0999800,-221.2000000,979.3499800,0.0000000,0.0000000,0.0000000,3), --object(plant_pot_15,3), (1,3),
	createObject(2816,991.7000100,-221.3000000,978.9299900,0.0000000,0.0000000,270.0000000,3), --object(gb_bedmags01,3), (1,3),
	createObject(2331,992.0000000,-221.5000000,978.7000100,0.0000000,0.0000000,0.0000000,3), --object(cj_bed_furn_1,3), (2,3),
	createObject(11313,971.2597700,-229.5000000,972.9000200,0.0000000,0.0000000,179.9950000,3), --object(modshopdoor_sfse,3), (1,3),
	createObject(1569,995.7500000,-228.8000000,971.3800000,0.0000000,0.0000000,90.0000000,3), --object(adam_v_door,3), (7,3),
	createObject(1569,995.7500000,-225.8000000,971.3800000,0.0000000,0.0000000,270.0000000,3), --object(adam_v_door,3), (8,3),
	createObject(631,993.4000200,-215.0000000,979.2999900,0.0000000,0.0000000,0.0000000,3), --object(veg_palmkb9,3), (1,3),
	createObject(2773,984.0000000,-236.7000000,972.5700100,0.0000000,0.0000000,50.0000000,3), --object(cj_airprt_bar,3), (3,3),
	createObject(1713,990.4000200,-214.6000100,978.4000200,0.0000000,0.0000000,0.0000000,3), --object(kb_couch04,3), (1,3),
	createObject(2239,989.2000100,-214.5000000,978.3900100,0.0000000,0.0000000,0.0000000,3), --object(cj_mlight16,3), (1,3),
	createObject(1808,988.0000000,-214.2000000,978.4000200,0.0000000,0.0000000,0.0000000,3), --object(cj_watercooler2,3), (1,3),
	createObject(638,971.5999800,-245.8000000,972.7000100,0.0000000,0.0000000,0.0000000,3), --object(kb_planter_bush,3), (2,3),
	createObject(638,971.5999800,-238.7000000,972.7000100,0.0000000,0.0000000,0.0000000,3), --object(kb_planter_bush,3), (4,3),
	createObject(638,977.5000000,-250.3999900,972.7000100,0.0000000,0.0000000,90.0000000,3), --object(kb_planter_bush,3), (6,3),
	createObject(638,983.2000100,-250.3999900,972.7000100,0.0000000,0.0000000,90.0000000,3), --object(kb_planter_bush,3), (7,3),
	createObject(638,995.4000200,-240.3000000,972.5000000,0.0000000,0.0000000,0.0000000,3), --object(kb_planter_bush,3), (8,3),
	createObject(638,995.4000200,-246.8999900,972.5000000,0.0000000,0.0000000,0.0000000,3), --object(kb_planter_bush,3), (9,3),


}

local col = createColCuboid(970.115234375, -251.115234375, 970, 26, 40, 13)

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


